This script will document tables (including constraints and triggers, row counts, sizes on disk), views (including all used fields), stored procedures (including used fields and parameters), database users, database settings and server settings.This script has been cobbled together from several others found on this site, so they deserve the recognition, not me πSimply execute it […]
2005-09-16 (first published: 2004-09-02)
378 reads
Use this script to navigate your recordset a page at a time containing a specific number of records and in a specified order.I use the supplier table of the northwind Database to demonstrate thisReturn List of suppliers, ordered by supplier desc, 10 records at a timeexecute prc_lov_SUPPLIERS "", "Suppliers", 1, 1 ''Page oneexecute prc_lov_SUPPLIERS "", […]
2005-09-08 (first published: 2002-05-02)
245 reads
Quando vocΓͺ restaura um banco ou 'atacha' ao seu servidor de outro servidor, pode ocorrer de o usuΓ‘rio que existe no banco nΓ£o sincronizar com o login do SQL server anteriormente criado com DBO desse banco, entΓ£o esse script faz exatamente isso, pega o SID do SQL e dΓ‘ um UPDATE no SID do usuΓ‘rio […]
2005-09-06 (first published: 2005-08-30)
364 reads
This might not be the fastes script, in the world but it takes care of the McDonalds, O'Brian's, MacPherson's and the Jens-Michael's of the world.
2005-09-05 (first published: 2005-08-31)
302 reads
Many users during the process of insert or update get the following warning issued by SQL ServerWarning: The table 'TABLE NAME' has been created but its maximum row size (XXXX) exceeds the maximum number of bytes per row (8060). INSERT or UPDATE of a row in this table will fail if the resulting row length […]
2005-09-02 (first published: 2005-08-25)
336 reads
An easy script that gives you the information of all non-system databases, its size and all the configuration options that you can get individually with DATABASEPROPERTYEX function.
2005-09-01 (first published: 2005-08-25)
1,120 reads
There are many ways to format dates, and rather that reinvent the wheel each time I've found it helpful to have a user defined function always available. As a function it of courses processes on each row, and to enable the most flexibility the formatting style is passed simply as a parameter. Year month and […]
2005-08-31 (first published: 2005-08-25)
475 reads
This script helps you synchronizing ALL orphaned database users to syslogins of the new database server. To run it, pass the target database name in on the first line.
2005-08-29 (first published: 2005-08-27)
695 reads
I made this Query because we fix databases localy on a workstation (we have no sql server) but when backup up the server they need to be deleted localy that could sometimes take a while.U can run this Query from the QA or ad it as a Job it's possible to run it from an […]
2005-08-26 (first published: 2005-08-19)
519 reads
This procedure will COPY an Enterprise Manager SINGLE DIAGRAM object between databases on a given SQL Server.This procedure takes in a source DB name, a Dest DB name, and the Diagram name.(Exec diagram_copy 'SOURCE_DB', 'DEST_DB', 'DIAGRAM NAME')This procedure DOES NOT have to be placed in either of the databases, you may run it from a […]
2005-08-25 (first published: 2005-08-22)
199 reads