Tag Archives for " Script "

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
Apr 13

List Tables That May Be Over Indexed

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

While not having enough indexes can be bad for query performance, having too many indexes can also be just as bad. Use the query below to get a list of tables in your database that has more than 10 indexes. — Tables with large number of indexes select t.name as TablesWithLargeNumInx, count(i.name) as CountIndexes from […]

Continue reading
1 2 3
>