2007-04-30 (first published: 2007-04-03)
1,679 reads
2007-04-30 (first published: 2007-04-03)
1,679 reads
Since it is not possible to script only the primary keys of all tables with the SQL Server 2005 Management Studio, here a small script to get the create scripts for all existing primary keys of the current database.
2007-03-28 (first published: 2007-03-09)
4,231 reads
When AUTOSTATS is used in a database, we can sometimes use these automatically generated statistics to find columns where SQL Server has built statistics on non-indexed columns that may benefit from an index. This script finds these columns and displays the selectivity of them. This script can be useful in troubleshooting poorly performing databases by […]
2007-04-09 (first published: 2007-02-20)
1,740 reads
Most DBAs are constantly looking for ways to tune their servers to run better. Joe Doherty brings us the second part of his series on indexes with an in depth look at how the indexes are stored in your database.
2007-12-13 (first published: 2006-12-20)
14,343 reads
This script will drop and recreated all indexes in a database within a transaction. The script will also add standard nameing conventions to the index names. Any duplicated indexes are removed.
2007-07-20 (first published: 2006-10-24)
1,361 reads
Most of the time even after executing dbcc dbreindex script on database you won't see much improvement in application/DB performance. Thats because dbreindex creates statistics for all tables but it executes sp_updatestats which is like sample statistics. To get the maximum performance we had to execute Update statistics with fullscan on table. This simple will […]
2006-12-22 (first published: 2006-10-23)
19,640 reads
The below command will rebuild all indexes on a database.We need to run the below command in the context of each database that is of interest.
2007-02-21 (first published: 2006-10-23)
1,214 reads
the following scripts helps in finding top 5 missing indexes using the new feature of DMV available in SQl Server 2005
2007-07-19 (first published: 2006-10-23)
5,356 reads
In real world production tuning sometimes a "quick fix" is required. This script will generate index create scripts for any column ending ID which doesn't have an index. It's dirty and its quick but you might just be amazed by the results when run against your database!
2007-07-11 (first published: 2006-10-10)
487 reads
This script lists all the foreign keys ,the referenced and the referencing tables , along with the column information.
2007-07-09 (first published: 2006-10-04)
312 reads
By Will Assaf
I recently reviewed, worked on, and added a similar example to the DATETIMEOFFSET Microsoft...
Database administrators (DBAs) are the backbone of data-driven organizations. If you're looking to break...
By Brian Kelley
Another security fundamentals topic is authentication versus authorization. For those who have a clear...
I have a SQL Server 2019 Enterprise Edition on CU 25. It has in-memory...
Experts, I am learning some skills so I can troubleshoot some performance-related issues. I...
What happens when I run this code:
SELECT p.ProductName , p.ProductCategory FROM dbo.Product AS p WITH (NOLOCK, TABLOCK);See possible answers