Tag Archives for " Script "

Jun 12

Stop Jobs That Run Too Long

By Lori Brown | Helpful Scripts , Jobs , SQL Administration , SQL Server

Since I seem to run across lots of questions about how to make sure that no jobs get in the way of ETL or other stressful data loads, I thought that I should post some ways you can stop jobs. https://learn.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-stop-job-transact-sql?view=sql-server-ver16 I have always done this by having a monitoring job that executes on a […]

Continue reading
Aug 16

Find the Last Time Databases or Logs were Restored

By Lori Brown | Backup and Restore , Helpful Scripts , Log Shipping , SQL Administration , SQL Maintenance , SQL Server

I have a client that uses a lot of disconnected log shipping on a few servers.  They do this because they want to have a copy of their database that is actually hosted by software vendors for reporting purposes.  So, disconnected log shipping it is!  We pull down files that have been FTP’d to the […]

Continue reading
May 04

List Partitioned Tables And Other Info About Them

By Lori Brown | Beginner , Helpful Scripts , Partitions , SQL Administration , SQL Server , Tip of the Month

Here is a good way to find out if any of your tables are partitioned in your database using the query below. It is important to know so that you can find out how the tables are partitioned. — Partitioned Tables SELECT DISTINCT t.name AS ParitionedTables FROM sys.partitions p INNER JOIN sys.tables t ON p.object_id […]

Continue reading
1 2 3
>