-
Enable xp_cmdshell in SQL Server 2008
Enable xp_cmdshell with a few lines of T-SQL. Fast and Easy!
-
SQL Server Combine MDF Files – The Easy Way
Do you need to combine or merge two data files (MDF or NDF)? There are a number of complicated options available or you can use the two lines of code below to do the trick… It’s up to you. This method works with both SQL Server 2005 and SQL Server 2008.
-
SQL Server Rebuild Indexes – The Fastest Way
Want to rebuild all the indexes in your MS SQL database? The script below will rebuild all the indexes in your SQL Server 2008 or SQL Server 2005 (SP2) database and offers a number of enhancements that make this the best SQL Server index rebuild script in all the land and the first choice of […]
-
SQL Server Update Stats – The Fastest Way (with FULLSCAN)
The following script is the fastest way to update stats on all your tables with the FULLSCAN option. Developed and tested by SQL Server Consultants.
-
Find All Tables Without A Primary Key
SQL script to find all the tables in a database which are missing a primary key.
-
Finding SQL Server Foreign Keys – The fast way
Need a list of Foreign Keys in your database. This simple query will deliver quickly and efficiently.
-
SQL Server Read Committed Snapshot – Is it on?
How do you check whether read committed snapshot is on or off for a particular SQL Server database using SQL Server Management Studio? We’ve never been able to find it but this quick T-SQL query will show you the answer. (Also check out our post on checking whether Snapshot Isolation is on):
-
SQL Server Snapshot Isolation – Is it on?
How do you know whether snapshot isolation is on in SQL Server? A quick T-SQL query will show you the answer.
-
SQL Server Row Count – The Fastest Way
What’s the fastest way to get the number of rows in a table on SQL Server 2005 or SQL Server 2008? Use the code the pros use.