Graph multiple databases growth using SSMS only
Easily graph your storage needs based on msdb backup data recorded automatically, no matter what your backup solution is.
2020-03-17 (first published: 2020-03-10)
1,716 reads
Easily graph your storage needs based on msdb backup data recorded automatically, no matter what your backup solution is.
2020-03-17 (first published: 2020-03-10)
1,716 reads
This script will find all orphaned users on all databases on an instance, and generate a script to drop each user. Simply execute, copy the values from the DropScript column to a new SSMS window and execute. There are two risks with this script. Use with caution: This script attempts to take into account users […]
2020-03-16 (first published: 2020-03-13)
1,398 reads
The script searches through every column of every record in a database to find a value. It works with numbers too. Simply assign a value to @MyString. Indicate what datatype(s) you wish to search through, and indicate if you want wildcards, and execute. The search is smart and will only search through columns where @MyString is […]
2020-03-05 (first published: 2020-03-02)
1,185 reads
This script finds auto created statistics that duplicate existing stats generated by indexes, and may help to speed up your statistics maintenance. Copy the results from the DropScript column to a new SSMS tab and execute.
2020-02-21
534 reads
Dropping database in RDS follows different method than dropping the database in local SQL Server. Below is the command to DROP the database in Amazon RDS EXECUTE msdb.dbo.rds_drop_database N'demodb' GO However when the SQL Server is configured with Multi-zone mirroring, then you need to set the partner to OFF and drop all active connections and […]
2020-01-17
3,839 reads
2019-12-20 (first published: 2019-12-10)
2,118 reads
T-SQL script to purge all the tables including foreign key references. The script has been made smart enough to use TRUNCATE wherever there is no foreign key reference and to use DELETE wherever there is foreign key reference.
2019-12-10
2,625 reads
An alternative for Microsoft's STRING_SPLIT function that will work on SQL Server 2012 and higher.
2019-12-05 (first published: 2019-02-28)
26,347 reads
This script converts hierarchical adjacency into nested json rows which contain the recursive "downlines" of each node. The table-valued function treats each row in the original adjacency as the root node in a recursive common table expression.
2019-11-24
840 reads
I am teaching a database class at Queens College. The project entails the truncation of all of the data and loading new data into the existing database "BIClass" from a single of the flattened data. One of the tasks of the project was to add these three additional columns to each of the tables (AlterTableAddColumnsUserAuthorizationKeyAndTwoTimeStamps): […]
2019-11-18 (first published: 2019-11-10)
1,026 reads
By Brian Kelley
Here is a short emotional intelligence (EI) post for today, courtesy of Seth Godin....
By Steve Jones
I was recently trying to handle a simple task with a few AI tools...
A nightly load into sales_fact fails. Ask an orchestrating agent to break down the...
I have a really stupid question... Is there an easy way to search for...
Comments posted to this topic are about the item How to Work with On-Premises...
Comments posted to this topic are about the item Escaping Strings
The STRING_ESCAPE() function requires 2 parameters in SQL Server 2025. The first is a string of text and the second is the type of escape rules being used. What are the options for the second parameter?
See possible answers