Rodrigo Acosta

Technical Article

For SQL 2000.Scan all indexes for fragmentation

This script creates an error message with a valid error number, and alert associated with the error message. (everything when it doesn't exists). Then captures all the user indexes in the database and executes DBCC ShowContig for each one. It calculates the % of fragmentation on leaf level and fires the alert when is fragmented.Then […]

5 (1)


2,283 reads

Technical Article

Show valuable info from sysindexes

This sp (sp_sysindexes) captures important columns from the table sysindexes and translates the numeric values into text. It shows the owner.object, the filegroup which it belongs to, the type of index, the total number of pages for tables/clustered indexes and non clustered indexes. It also shows the status, the indid and the type of object.You […]

3.5 (2)


3,647 reads

Technical Article

SP to import to a file

Is a SP that imports a table to a file. You just put the table name, the path and the sa password and then you have it. It is important that it parse the table inserted (pubs.dbo.sales for example) and checks that the db, the table with the owner exists


1,671 reads

Technical Article

Automatic Backups

Creates the backup devices where sql server is installed, creates an error message above 50001, an alert, and an adittional job in case the scripts fails. In the first time backups all databases and then backups the logs until two days past from the last full backup. Then backups the databases again and so on. […]

2 (1)


1,212 reads


The Effectiveness of Solar Estimation


We added a solar system to the ranch as a way to hedge against...

How do I tell if identity_insert is turned on and if so what table?


TLDR; The code to do this is below but it’s a bit hokey and...

Daily Coping 24 Jun 2022


I started to add a daily coping tip to the SQLServerCentral newsletter and to...

Read the latest Blogs


Shared Work Spaces: Hell, Heaven, Both?

By Grant Fritchey

Comments posted to this topic are about the item Shared Work Spaces: Hell, Heaven,...

T-SQL : Slicing time Islands and gaps

By MrRobot

Hello, Consider the following table that gives the validity dates of an item :...

Migrate the SSIS Catalog in Just a Few Clicks

By Kunal Rathi

Comments posted to this topic are about the item Migrate the SSIS Catalog in...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers