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…
Author: sqlkitty
Just a short update. I haven’t blogged since May, and that’s because I’ve been presenting. Now, I have a publishing contract, so that’s keeping me busy. I want to get back to blogging once I’m done with the book. If you love database auditing as…
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…
There are three ways to get into bash in a docker container: docker exec -it containername bash docker exec -it containername “bash” docker exec -it containername /bin/bash Once you run those from the command line, it brings you to the top level of the file…
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:
Run psql in docker exec docker exec -ti NAME_OF_CONTAINER psql -U YOUR_POSTGRES_USERNAME