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)
240 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)
358 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)
288 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)
321 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,103 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)
464 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)
692 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)
508 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)
188 reads
This scripts creates a view which will returns all the indexes and columns covered in the index for all the tables in a database.It returns only the user created indexes. Removes the statistics created on table (where indid > 0).
2005-08-24 (first published: 2005-08-23)
196 reads