This script will remove all the spids from a particular and allow you restore a database to a different location. The path of dump can be local or remote. It is very useful for quickly restoring a copy of production for testing purposes.
2005-08-22 (first published: 2005-08-16)
966 reads
Pads a string on either with either leading or trailing characters. You specify the direction, the tolal string length and the character to pad with.Error conditions return null
2005-08-19 (first published: 2005-08-10)
2,035 reads
Pulls relevant information including col. names, keys, and the description (if the description field is filled out).This makes a good source for a data dictionary report.
2005-08-17 (first published: 2005-08-12)
480 reads
Ever need to disable some foreign key during the load of new data in some tables? (Eq: for a snapshot). The following just does that using a parameter (0 for disable and 1 for enable)
2005-08-15 (first published: 2005-08-05)
1,246 reads
This Procedure is used to generate the datadistionary for a database.It gives following columns : table_id, table_name,column_order,column_name, column_description Usage: Create the Procedure in the database where the datadisctionary need to be generated.Call : Execute Generate_getDataDictionary Return the result in Tabular format.
2005-08-12 (first published: 2005-08-05)
545 reads
So many times I do not remember the name of table or stored procedure I have created, and it becomes time consuming to search object by firing query on sysobjects or search using Enterprise Manager.It is a simple Stored Prodeure where the Parameter is the Hint of the Object name and Object Type.It will fetch […]
2005-08-11 (first published: 2005-07-26)
140 reads
This is a simple script which would list sp_helpindex information for all the tables in the database. You dont have to provide any table name or anything. Just run it on the database from which you want to retrieve the information.This is helpful when you have several servers running the same form of DB, and […]
2005-08-10 (first published: 2005-07-26)
189 reads
Through this script we can fetch on regular index information with whole database. Here i am use temporary tebale concept show no procedure so its run quickly and also fetch information from production database in uptime. No sytem generate index information not send me.
2005-08-09 (first published: 2005-07-27)
198 reads
There was a script here not too long ago which showed how to 'truncate' a number to two decimal places without rounding. This used a lot of casts to varchars and back.The solution worked, but I knew there had to be a way of doing exactly this without having to go back and forth between […]
2005-08-08 (first published: 2005-07-27)
1,391 reads
usp_ToggleDatabases is a simple procedure that will switch the names of two databases.One of the main problems with using sp_renamedb to switch databases is that the procedure will wait until the database is free before the rename can be completed. If the new live database is also in use then there is a likelyhood that […]
2005-08-04 (first published: 2005-07-28)
486 reads