Find Db space used using SQL-DMO
Use SQL-DMO to find database size used for more than one sql server in your enviroment.
2003-11-10
189 reads
Use SQL-DMO to find database size used for more than one sql server in your enviroment.
2003-11-10
189 reads
Sometimes it's necessary to strip non-numeric characters from the string, so you can convert to integer without error. Often it happens when you want to use stored procedure, especially system procedures. The output there can be already with some characters (MB, KB and such), but you want this result to be used for your own […]
2003-11-10
1,332 reads
This will make a comma seperated list from a column using 2 select statements.
2003-11-07
212 reads
This stored proc notify the user(s) if the data/log file grew. When you execute it for the first time it will get the data/log files sizes and inserts in a table. Next time when you run the script if will compare the current size with the previous files size. This script must need sqlmail configured […]
2003-11-07
1,511 reads
We can use this sp to clear data in tables. I mainly created this sp for two reason. 1.This is useful to commence the testing from scratch. 2.Whenever we ask the database backup from our customer. They hesitant to give the production database because of confidential. I have used Delete and Truncate statement to clear […]
2003-11-06
186 reads
sp_ExecVBScript allows you to execute either a .vbs file or an ad-hoc VBScript command within a T-SQL batch. Note that the command (whether it be ad-hoc or contained in the .vbs file) cannot have any code that requires user input (such as Input Boxes or Message Boxes).
2003-11-05
7,705 reads
Not my script but a guy a work with (Bruce Canaday). This will restore all databases in a given directory. It will also create the data and log directories if they don't exist. A DR Drill dream :).
2003-11-05
3,032 reads
I modified mbenothmane's script..plz refer to "Paged data without temp table and without cursor(http://www.sqlservercentral.com/scripts/contributions/947.asp)"
2003-11-03
136 reads
Need a comma seperated list of a particular column in a table. This will do the trick.
2003-11-03
613 reads
Not my script, but this script will transfer the logins to a new server or help you restore the in a DR situation with their correct passwords (encrypted).
2003-11-03
1,162 reads
A RAG pipeline that answers questions in the demo is not the same thing...
By Steve Jones
“A multitude of bad ideas is necessary for one good idea” – from Excellent...
Yesterday I gave a talk for MSSQLTips called “Building a DBA Agent for Your...
ALAMAT : Jl. Jend. Yani Jl.Pahlawan No.99, Ardirejo, Kepanjen, Kec. Kepanjen, Kabupaten Malang, Jawa...
Comments posted to this topic are about the item Adding new column with DEFAULT
I've got a web application for my side business. I've added a SQL Server...
Which number will the COUNT() return after executing the following statements:
DROP TABLE IF EXISTS #test; CREATE TABLE #test (id INT) INSERT INTO #test (id) SELECT * FROM GENERATE_SERIES(1, 3) AS gs ; ALTER TABLE #test ADD flag BIT CONSTRAINT DF_#test_flag DEFAULT 0; go UPDATE #test SET flag = 0 WHERE id = 1 UPDATE #test SET flag = 1 WHERE id = 2 INSERT INTO #test (id) VALUES (4) SELECT COUNT(*) FROM #test AS t WHERE flag = 0See possible answers