published on SQL Server Central https://www.sqlservercentral.com/articles/standards-matter At first, this was going to be a technical article about an index maintenance horror story. I received an off-hours page. The index maintenance job was running for a long time on a big table. I have an agent…
Category: sql server administration
We have a fair number of pretty large databases, and I was having a hard time scheduling full integrity checks to run at least once a week. For a long time, I only ran physical_only with my fingers crossed, but finally, I got a new…
This came up because a user had db_owner perms and it was only reading from a database and creating a table variable from it. I created a new user (on a test system) with read only permissions to test if the code would still work.…
I wanted to find out what data types SQL Server auditing was using, so I put the auditing file results into a temp table and executed tempdb..sp_help on that temp table to get the schema. This will give you the following results: Here’s the expanded…
This is a super simple way to retain the data and settings that you create and change on your SQL Server Docker instance. There’s a lot of talk about attaching databases after you recreate your Docker container, but I found that you just have to…
I want the ability to search through all the SQL Server logs without having to know how many log files there are, so I created this script to do that:
The main reason for creating this script was to compare user permissions when someone came to me saying “I need the same permissions as so and so,” and then I would scratch my head trying to figure out how to get this quickly and easily.…
Yes, a database on SQL Server can be owned by no one! This is a NULL value as the owner. Apparently, this can happen because the login that owned it no longer exists. I discovered this when I was going through databases owned by users…
This came up because we had many sql agent jobs that DBA’s don’t want to be alerted to like sql agent jobs that run SSIS packages. Those alerts need to be sent to the database developers instead. We use Idera Diagnostic Manager to send failed…
When migrating to managed instance from SQL Server, most features are supported, but you need to assess your SQL Server and the databases you want to migrate to ensure there aren’t any features enabled that aren’t supported. You can do this with the Data Migration…