List All Databases, Sizes and Properties
This script will list all the databases on your server (SQL2000 only) as well as their sizes and some key properties.Β Very useful for keeping rogue developers under control π
2003-05-17
789 reads
This script will list all the databases on your server (SQL2000 only) as well as their sizes and some key properties.Β Very useful for keeping rogue developers under control π
2003-05-17
789 reads
This script forms a temporary table containing database and object names and IDS as well as object types for all databases for the server on which this scrip is executed.Β It is intended to serve as an interim step for additional server wide analysis.
2003-05-16
145 reads
This simple script shows how to easely grant rights to user objects (tables,stored procedure,user-defined functions) to a role (public in example), in SQL Server 2000.The script can be used to grant rights to a specific NT /sql login account by replacing [public] with the desired name.
2003-05-16
446 reads
This script obtains the fragmentation in all databases on a SQL Server 2000 database server.You must firt create a table(Fragmentacion) on a database (Sistemas) to store the information obtained.
2003-05-16
435 reads
This function will evaluate an input string and convert it to title-case format. It uses the delimchars parameter to determine what are the triggering characters to indicate capitalization of the subsequent character.I am using it in a DTS package to convert data in CAPS to Title/Proper case as I output the data to an Excel […]
2003-05-15
416 reads
This script takes 2 samples over a 10 second period to identify what spids are using most resources. It's probably not 100% accurate but it's helped me out a few times.
2003-05-15
512 reads
If you have environment where you restrict access to database objects based on user roles and if you have a lot of databases on different servers in the same domain.Β The following script can generate roles from a given database in a format that can be used to create roles on different servers where the […]
2003-05-14
183 reads
Mod to Find the Nth Occurence of a characterFixes when you are looking for the third character and there is only one, was setting @pos back to 0 if there was only 1 of the characters. Also provided for the @occurence to be 0.
2003-05-13
371 reads
This script identifies the blocking locks at the top of the blocking chain and kills them. Specifically, it reports what the top blocking spids are doing, kills them, waits three seconds and then reports on current blocking status.Β If you have a situation where single connections are causing a huge blocking chain and you want […]
2003-05-12
4,333 reads
This is a followup to the script submitted by srallapalli. One can return a record set of all tables in a database using the following:USE MyDatabaseSELECT so.name AS TableName, sc.name AS ColumnName,Β st.name AS ColumnDatatype,Β convert(int, sc.length) AS ColumnLength FROM syscolumns sc, sysobjects so , systypes st WHERE so.type='U' AND OBJECTPROPERTY(so.id,'ismsshipped') = 0 AND sc.id=so.id […]
2003-05-10
142 reads
By Steve Jones
ochisia β n. the fear that the role you once occupied in someoneβs life...
This is a quick blog post, mainly so I have the code available if...
Praise whatever deity you believe in, because itβs finally here, a tenant switcher for...
I've read lots of the horror stories about nested views in databases where they're...
Hello! How do I grant a user to read-write to a single database and...
When building statistics, there is the concept of density that refers to the duplicates in a table. How is this calculated?
See possible answers