Script to DB Schema
This SP gets all the table names with the column names and data types, datalength. All the existing constrains on the table and column levels along with the Primary and foreign keys and table references
2004-06-01
239 reads
This SP gets all the table names with the column names and data types, datalength. All the existing constrains on the table and column levels along with the Primary and foreign keys and table references
2004-06-01
239 reads
Captures all SQL Logins at the server level with password and spid unchanged into a sql script. Nothing fancy just needed it to do a server move and load into QA.
2004-05-25
2,053 reads
If we give SP_HELP , we'll know to which File Group the table belongs.If we give SP_HELPFILEGROUP , we'll know the logical and physical file names along with other information that belong to the given File Group. But have you ever tried that, given a file group, how to find all the tables that belong […]
2004-05-10
140 reads
This script can be used as a trigger to limit the number of versions for a particular document
2004-05-07
111 reads
This procedure, sp_who3, is based on the system-supplied sp_who2, but is modified to return the actual text of the commands executed by each spid. Very helpful for troubleshooting! In addition, I have added a @hostname parameter to allow the user the option of viewing activity originating from only one computer, if desired.
2004-05-06
648 reads
While the other methods for calculating holidays ect use a table to store the holidays, this inline UDF goes the opposite route, by returning 1 if the given date is a weekday that also does not fall on a number of holidays. Examples shown allow for easy extension to other holidays as deemed necessary.
2004-05-02
201 reads
For greater information of this tool can obtain it inhttp://www.dimac.net/Mail in format HTML or TEXT can be sent can be sent attached archives. It is a tool to send and to receive electronic mail from any PC or SERVER without the use of a program of mail or a mail server as Eudora, Exchange or […]
2004-04-20
1,391 reads
This script backs up all databases or a specified database to a disk location. Databases can be explicitly excluded from backup as well. Can be used for Full, Differential or Transaction Log Backups. Can also dynamically create sub directories for each database, as well as perform DBCC and restore verify operations. Includes LiteSpeed support for […]
2004-04-15
1,487 reads
This script will get the name of each database from master..sysdatabases, then use each database's Information Schemata to get the tables and columns in each of the databases. Several recent requests for assistance have used this to answer their needs. I ran it across 245 databases and pulled back 1.4 million results in about 30 […]
2004-04-15
1,332 reads
Script via OLE Automation and Export via BCP. Check for existance of object, checks count of table with count of exported file (reads BCP output). Will do DBCC UPDATEUSAGE if at first the SQL record count does not match BCP count. Full options for scripting (with w/o indexes, Referential integrity, etc). REQUIRES ADMIN ACCESS - […]
2004-04-15
2,502 reads
By gbargsley
In SQL Server environments where transactional replication runs alongside Always On Availability Groups (AGs),...
Disable the sa login in SQL Server (and sleep better)If you run SQL Server...
By Chris Yates
Change is inevitable. What separates thriving organizations from those that falter is not the...
Comments posted to this topic are about the item Create an HTML Report on...
Comments posted to this topic are about the item Be Wary of Data
Comments posted to this topic are about the item Locking Hierarchies
You have a table [dbo].[orders] without a Clustered Index (Heap). The table does not have any other nonclustered indexes! You rund the following command in Read Committed Isolation Level:
SELECTo_orderdate, o_orderkey, o_custkey, o_storekey FROMdbo.orders WHEREo_orderkey = 3877;