This script will give you the facility to search for Particular Data in the Database, To know where exactly that data store(Table Name and Field Information)You Have to Just chage the Name of the Database and the Search String....
2006-09-29 (first published: 2006-09-13)
673 reads
This script will create two views and select the data from the TableReferences view. This view will give list of all the foreignkeys of the selected database with its constraint name, the table name and column name(s) on which the constraint is created and the referencing table name and column name(s).
2006-09-25 (first published: 2006-08-25)
595 reads
Below script will Get SQL job status for all servers running on the same network. All you have to do is create a linked server with msdb on local machine. Executing this script will give you all job status on any number of servers. Good for an environment where a DBA had to see job […]
2006-09-20 (first published: 2006-08-25)
744 reads
Often in development environment you want to truncate all the tables to insert new data from production, but you cannot do easily as there were a bumch of Foreign Keys and triggers. Dropping all triggers and FK's and then recreating them again is a tedious job. That to dropping and recreating FK's in a particular […]
2006-09-19 (first published: 2006-08-31)
243 reads
Often the RAND() function is predictable based on the seed. This stored procedure generates a pretty good random integer because the seed itself is quite unpredictable. You can’t put this in a UDF since it is indeterminate due to the RAND and GETDATE() functions used.
2006-09-15 (first published: 2006-09-06)
603 reads
Stored procedure to return the list of columns of the primary key for a table. The name of the column for the result set is the name of the primary key for the table.
2006-09-14 (first published: 2006-09-07)
690 reads
For those that do not have SQL 2005 Management Studio, this utility reads from or writes to the SQL Enterprise Manager configuration. It can handle a Server Group hierarchy up to 5 levels deep. Usage instructions are included in the script.Run with cscript.exe.NOTE: Server registrations using SQL (not Windows) authentication write out the password in […]
2006-09-13 (first published: 2006-09-12)
213 reads
Troubleshooting intermitten connectivity issues can be difficult. One approach is to repeatedly test connecting to SQL Server outside of an existing application in order to verify if a server-wide intermitten issue is occurring. This script is used to test remote connectivity to a SQL Server. The script loops in one minute intervals (adjust as needed). […]
2006-09-04 (first published: 2006-08-08)
1,426 reads
to get information about tables+columns+primarykeys+foreignkeys+identity, i firstly used SQL server built-in INFORMATION_SCHEMA.xxx. however, my company have various DBAs and each of them owns objects. when using INFORMATION_SCHEMA.xxx, it retrieves data based on current login (version 2005 resolves this schema v.s. object owner problem already... yeah) , which bring me a great trouble. if you want […]
2006-08-30 (first published: 2006-07-25)
564 reads
This Script is used to reset the Identity coloumn to whatever the value we required. We need to compile this procedure in the database where we required to ressed the Identity coloumns of every table. After compiling we need to execute this procedure with a parameter of integer value. Then it will reseed the Identity […]
2006-08-29 (first published: 2006-07-26)
204 reads