Script to Find, occurence of field in user Tables
Enter the name of the field you want to search, in the varchar variable @fieldname al the tables having this particular field will be listed
2002-10-09
277 reads
Enter the name of the field you want to search, in the varchar variable @fieldname al the tables having this particular field will be listed
2002-10-09
277 reads
This stored procedure does a quick table comparison between 2 databases that are supposed to be the same. Tables found on either db but missing from the other are reported as are record count differences for matching tables. Establish a linked-server with appropriate permissions to compare across servers. Compile in master.
2002-10-09
136 reads
Returns database user information as a runnable script for the specified database. The default is master. Great for restoring user access and permissions after a restore to a development server. Run prior to the restore and save the output to an sql file.
2002-10-09
1,077 reads
This script returns the table count for all non-system dbs on the server it is run against.
2002-10-09
300 reads
This Procedure generates 3 triggers (for Insert, Update & delete). The purpose of these triggers is to keep a SIMPLE audit trail. Create the table and the procedure in the database to which you want to have the auditing facility. To include a table for auditing run the procedure with Table Name as the parameter.
2002-10-09
1,210 reads
My stored procedure, sp_dbsettings, allows you to view, in a cross-tabular format, all the common options and their values for all the databases on your server. Optionally, you can pass a database name as an argument if you just want to view the settings for one database (i.e., EXEC sp_dbsettings 'Northwind'). Otherwise it shows info […]
2002-10-09
663 reads
I submit this script as an example of how one might go about generating 'Alter Table' statements that find and replace specific column constraints. In my case I had to find all occurrences in a production db of suser_name() as a column constraint and replace it with suser_sname(). This script is only an example and […]
2002-10-08
278 reads
Get All the Table Details in a Database in a Second By Running sp_table_info. This procedure will give the No. of row , reserved space , data space , index space and Unused space. Compile the Procedure in Master Database and access it from any other database. We can use it for a single table […]
2002-10-08
510 reads
After going through development and test cycles it can be laborious to have to go and reset identity properties on tables (Yawn!!) So I wrote a script to do it. It has two parameters database name and identity start value. It basically checks the identity value with the number of rows in the table. if […]
2002-10-06
347 reads
The usual practice, when we need some test data, is to employ the pseudo-random built-in function RAND(). We usually use it to produce a random value in some range and it produces these values with the same probabilities. Sometimes we need more "realistic" data when some values are more probable than others are. In this […]
2002-10-04
293 reads
A RAG pipeline that answers questions in the demo is not the same thing...
By Steve Jones
“A multitude of bad ideas is necessary for one good idea” – from Excellent...
Yesterday I gave a talk for MSSQLTips called “Building a DBA Agent for Your...
Telp/WA 62 821-8200-203 Menara Bidakara, Jl. Gatot Subroto No.Kav.71-73 Lt. Lobby dan Lt. 1,...
Telp/WA 62 821-8200-233 Jl. Melawai Raya No.Blok B, RT.7/RW.5, Kramat Pela, Kec. Kby. Baru,...
Telp/WA 62 821-8200-174 Wisma BCA Pd. Indah, Jl. Metro Pondok Indah No.10, RT.3/RW.17, Pd....
What types of secondary replicas are available for the Azure SQL Database Hyperscale edition?
See possible answers