This procedure will give the list of columns included in the primary key for a given table of given database on given server.For. e.g.Get_PrimaryKey 'vrs-118','Demo_StDB','IMAGEREPOSITORY'
2007-02-14 (first published: 2006-08-25)
945 reads
As we all know, BINARY_CHECKSUM ignores columns of data type TEXT.This code is 100% compatible with MS original. That is, the result is identical.You can use it "as is", or you can use it to see that MS function does not produce that unique values one could expect.
2007-02-13 (first published: 2006-08-24)
175 reads
Perl script that reports SQL Server AD accounts which are now longer valid by verifying the output of sp_validlogins system stored procedure against SID stored in AD. This is done to ensure only accounts that do not exist are reported since sp_validlogins will only check the name and not SID against AD. Accounts that are […]
2007-02-12 (first published: 2006-08-08)
243 reads
This script is used to find out the free space in database filegroups and store output into a text fileInputs: database name, threshold value in percent, output file.
2007-02-09 (first published: 2006-07-01)
302 reads
This script will list out database(s) which has Unallocated space in negative and also generate script for correcting these.DBA needs to run the generated script to correct problem.
2007-02-07 (first published: 2006-07-27)
213 reads
This is another type of split function which disects 8000 byte varchar with given delimeter and returns table with disected values.It does that with single select statement (internally looped), without using explicit while loop.Works pretty fast
2007-02-06 (first published: 2006-08-18)
390 reads
Use this script ot be able to create DB Maintenance Plans fast. If you need to create the plans on servers similarly set up, edit the required parameters once, and when you create a new plan, you will only need to specify a database name and one task start time, run the script and the […]
2007-02-05 (first published: 2006-08-07)
972 reads
This script cycles through a chosen selection of databases, and grants permissions to all tables, views and stored procedures to a user or role.To use, change the ###text### to control which databases, permissions and the user/role concerned.
2007-02-02 (first published: 2006-07-14)
911 reads
Usage -Populate @list variable below with account(s),comma delimited list to script. -Save output to recreate:Login,Default DB,Server Roles,DB Access,DB Roles,DB Object Permissions. -- NOTE: -Stored procedures are created in Master, but are deleted -to limit by database see section /*Get a table with dbs where login has access*/ and change the where clause -to script all […]
2007-02-01 (first published: 2006-08-02)
4,431 reads
2007-01-31 (first published: 2006-05-03)
223 reads