GetSizeOfAllTables
Gives you a list with name of all the tables, number of rows, row length of each table, total reserved space, space used by data, space used by index and unused space.
2003-04-02
183 reads
Gives you a list with name of all the tables, number of rows, row length of each table, total reserved space, space used by data, space used by index and unused space.
2003-04-02
183 reads
Use this script to create a warm standby database server for all your user database. This new version has a new feature to allow the standby database to be in a ready-only mode so that users can access it. You can change the job schedule to suit your requirement. One bug has been fixed that […]
2002-10-31
285 reads
New feature to relocate files on the secondary server has been added to this script. If you don't need this feature please use my other script that is posted on this website.Run this script on a secondary SQL Server to replicate the data of all the user databases from the primary server every 15 minutes. […]
2002-08-09
287 reads
This script monitors your errorlogs every 3 hours for the past 3 hours. It notifies you by email for all types of errors and by pager for all critical errors with severity type > 16. Saves lot of time when you have to monitor several servers every day 24x7. Run this script on a dedicated […]
2002-08-09
1,186 reads
This script will do a full backup and transaction log backup of all the user database on the primary server and restore it over to the secondary server. The full backup/restore runs once every day and the transaction log backup/restore runs every minutes. Just provide the name of the primary and the secondary server and […]
2002-07-12
489 reads
You might come accross a situation where you want to retrieve the values of all the rows concatenated and stored in one variable. Here is the solution. Lets say you have a table called tblCustomerOrders which has CustID and OrderID. You now want all the OrderIDs for a particular Customer to be stored in one […]
2002-07-02
1,069 reads
Set the Autoclose database option to True and perform a cold backup of your data files without even shutting down the SQL Server Services.
2002-04-25
925 reads
By Patrick
SQL Server Audit is an efficient way to track and log events that occur...
I presented at SQL Saturday Pittshburgh this past weekend about populating your data warehouse...
By Steve Jones
A customer was asking recently about the RPO for their estate, and I showed...
From this link - https://stackoverflow.com/questions/22005698/how-to-find-all-the-dependencies-of-a-table-in-sql-server I can find all the child dependencies starting from my...
The average height for a man in India is approximately 5 feet 5 inches...
Limb lengthening surgery in India is a specialized orthopedic procedure aimed at increasing the...
CREATE TABLE t0 ( id INT PRIMARY KEY , field1 VARCHAR(1000) , field2 VARCHAR(MAX)); INSERT INTO t0 SELECT gs.value , REPLICATE ('X', 1000) , REPLICATE ('Y', 1000) FROM generate_series(1, 10, 1) gs; GO
select STRING_AGG(field1, ';') within group (order by id) from t0;
select STRING_AGG(field2, ';') within group (order by id) from t0;