Row count of all tables
Quick and accurate method to get the row count of each table in a given database. Execution time is dependent on the number of rows in each table.-- Girish (gvphubli)
2007-07-20
1,359 reads
Quick and accurate method to get the row count of each table in a given database. Execution time is dependent on the number of rows in each table.-- Girish (gvphubli)
2007-07-20
1,359 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,371 reads
This script will delete the duplicate records without using cursor
2007-07-18
665 reads
Show line of code executing - more details than dbcc inputbuffer
2007-07-18 (first published: 2006-10-16)
906 reads
2007-07-17 (first published: 2006-10-12)
459 reads
I have written stored procedure which simply read each row one by one and update the some column in same table.SP is running fine in SQL Server 2000 and completed within 5 minutes (around 5 million rows)But same SP in SQL Server 2005, its taking around more than one hour (for same number of rows)Note: […]
2007-07-16
518 reads
Sometimes you need to calculate a running sum. Uses of this include adding a Month-To-Date column to a query of recent orders. I haven't seen anyone publish how to do this before (using this method).This query works by using the Row_Number() function and recursive query capability of SQL 2005.
2007-07-16
543 reads
Hope this is helpful to someone. This script will create a table and a stored procedure in the master database to gather and store table info for all datbases. The sp uses a temp table to hold the results returned by sp_spaceused, then transfers the information to the permanent table DatabaseTableSizes and adds the database […]
2007-07-16 (first published: 2006-10-11)
287 reads
2007-07-13 (first published: 2006-10-11)
133 reads
I have a requirement deploy transactional replication for an existing database which wasn't designed with replication in mind. I need to script/deploy based upon PK's, identity columns and timestamp columns. This query allows me to gather and save the information enabling me to generate the various scripts to replicate my database, replication through T SQL […]
2007-07-12 (first published: 2006-10-10)
794 reads
By HeyMo0sh
In the realm of software development and content creation, the deployment pipeline serves as...
By Vinay Thakur
I wrote about TempDB Internals and understand that Tempdb plays very important role on...
Comments posted to this topic are about the item A Quick Restore
Comments posted to this topic are about the item Guarding Against SQL Injection at...
I have a quick question on Ola Hallengren Index Optimize Maintenance . Do we...
While doing some testing of an application, I wanted to reset my environment after doing some testing with this code:
USE DNRTest BACKUP DATABASE DNRTest TO DISK = 'dnrtest.bak' GO /* Bunch of stuff tested here */RESTORE DATABASE DNRTest FROM DISK = 'dnrtest.bak' WITH REPLACEWhat happens if this runs, assuming the "bunch of stuff" isn't anything affecting the instance. See possible answers