Database user and programming tips
In order to do accurate performance testing between multiple runs of a SQL Server command or scripts you need to remember to clean the buffer, procedure and system cache between each test run.
Have you ever wanted to know who made a schema change to your database? If so, read on to learn how.
Have you ever wondered how to find the worst performing TSQL queries on your instance? If you have, you are not alone.
Greg Larsen shows you how to determine if you are running the standard, enterprise, or developer edition of SQL Server.
Have you ever had a need to place some simple row level security on a SQL Server table? Well now you can do that in SQL Server 2016 by using row level security.
If you are using row level security in SQL Server 2016 you might find users are updating or inserting rows of data that keep them from seeing the row after they have performed the update or insert statement. If you want to prevent this from occurring, you can use a blocking predicate.
Finding the nightly job failures is just one of a DBA's morning rituals. It is fairly easy to scan all the email with a number of creative search criteria, but what if you would like a more automated approach? Read on to learn how to find and report all job failures using a script.
Is your msdb database growing bigger every day? If so you might want to consider purging some of the history records from the msdb database. If you are sending email using database mail and you are not periodically purging email information, then you might find out this is one of the reasons your msdb database is growing bigger.
Putting the output of a stored procedure into a table provides you multiple options for parsing and using the output with other TSQL commands. Read on to learn more.
During the development cycle, indexes will be placed on SQL Server tables to speed up performance when searching for records. Lots of thought probably has gone into creating just the right mix of indexes based on how developers think customers will use the system. But how do you tell if all the indexes are being used once your database has been implemented into production?
SQL Server’s undocumented extended stored procedure, called “xp_readerrorlog”, can read both the SQL Server ERRORLOG and the SQL Agent log files. Read on to learn more.
There are times when you might want to read backup/restore history information to identify a backup’s start and finish date/time, the location where the backup was written, the size of the database backup, etc. Greg Larsen shows you how to do this in SQL Server.
SQL Server provides a couple of different ways to delete backup and restore history. If you want to remove backup and restore information for all databases based on a date you can use the sp_delete_backuphistory system stored procedure. Or you can use the system stored procedure named sp_delete_database_backuphistory if you want to remove all backup and restore history for a specific database.
There are times when you want some users to see part of a column value but not the whole thing, but you want other users to see the complete column value without any masking. The new SQL Server 2016 Dynamic Data Masking feature will allow you to define these different kinds of masking rules.
Database User and Programming Tips Archives