Database count using system tables
An easy way to created a quick record count of all the tables within a sql server database.
2007-09-18
706 reads
An easy way to created a quick record count of all the tables within a sql server database.
2007-09-18
706 reads
Many times with work with unknown databases, most of the time there is not a clear documentation of the relations between tables, however, with this script we are able to find the parent child relations in just a few seconds
2007-09-18
1,004 reads
2007-09-17 (first published: 2007-05-18)
646 reads
The following script performs log, differential or full backups of a single, or all databases on your SQL Server. It then copies or moves the file(s) over to a network share drive. It also removes old backups from both locations if needed. Don't forget to set the local drive path and network share for each […]
2007-09-14 (first published: 2007-05-16)
19,167 reads
We can use this function to combine multiple rows into single one. Generally to create comma separated list for each unique item. So this can create comma separated product list for any given category. The same can be used to make a list of items in a given order.ThanksMohit Nayyarhttp://mohitnayyar.blogspot.com/
2007-09-14
3,822 reads
This script was designed to restore a backup of a SQL Server 2000 database from disk file to SQL Server 2005.Unfortunatelly the RESTORE will leave land mines for you to find the hard way, this script was updated to fix all that I have found:Change CONCAT_NULL_YIELDS_NULL ON, PAGE_VERIFY CHECKSUM, Compatibility level to 90, remove the […]
2007-09-14
4,530 reads
This is a simple script that when used by command-line OSQL/ISQL can help you locate a stored procedure.How many times have you been looking for stored procedure code and could not find it? This is a simple method to locate lost code.When you manage many database servers this can become a common problem. The scenario […]
2007-09-14
2,091 reads
Quite often I need to cut off the first (or last) few characters of a string. To do just that I created two functions LSTR() and RSTR().Syntax: LSTR( @stringtocut, @length )Note: @stringtocut is trimmed in the functionWhen @length is equal or larger than zero, this function performs the same as LEFT( LTRIM(RTRIM(@stringtocut)), @length ).When @length […]
2007-09-13
1,595 reads
2007-09-13 (first published: 2007-05-16)
334 reads
Hi this is my first post on sql....The below procedure will check the current errorlog(past one hour errorlog will be scanned)for the keyword "error" (you can include your own key word) .. If you run the procedure it will look for keyword error in the past one hour... it will be use full for some […]
2007-09-12 (first published: 2007-05-06)
746 reads
Most apps that call an LLM send every request to the same model. That...
By Steve Jones
“The foundation of maturity: Just because it’s not your fault doesn’t mean it’s not...
By James Serra
Originally published April 2022; substantially updated July 2026. This post is a complete replacement...
Hello everyone , I am planning to migrate a database from SQL Server 2014...
Comments posted to this topic are about the item SQL Agent Job Automated Change...
Comments posted to this topic are about the item Another Model, More Data Loss
Where do I check for the existence of a Database Master Key (DMK) in SQL Server 2025?
See possible answers