A temper, soft skills, and almost losing a job : T-SQL Tuesday #170
SQL Studies
by Kenneth Fisher
2M ago
It’s T-SQL Tuesday again! In fact, it’s the first of the year and our intrepid host is Reitse Eskens (blog|twitter). Inspired by Buck Woody (blog|twitter) he’d like to hear about failed projects and what we’ve learned from them. Very near the very beginning of my career I screwed up. One of our biggest clients was Novell (if you’re old enough you’ll know who they are) and I was the lead for any of the technical work related to them. This meant I dealt with the customer directly, at least on occasion. Our contact, let’s call her Amy, had a pet project that she was really proud of, and it was a ..read more
Visit website
A temper, soft skills, and almost losing a job : T-SQL Tuesday #170
SQL Studies
by Kenneth Fisher
2M ago
It’s T-SQL Tuesday again! In fact, it’s the first of the year and our intrepid host is Reitse Eskens (blog|twitter). Inspired by Buck Woody (blog|twitter) he’d like to hear about failed projects and what we’ve learned from them. Very near the very beginning of my career I screwed up. One of our biggest clients was Novell (if you’re old enough you’ll know who they are) and I was the lead for any of the technical work related to them. This meant I dealt with the customer directly, at least on occasion. Our contact, let’s call her Amy, had a pet project that she was really proud of, and it was a ..read more
Visit website
SELECT FORMAT(COUNT(1),’N’) FROM TableName WITH (NOLOCK);
SQL Studies
by Kenneth Fisher
2M ago
Alternate title: How do I tell how far I am on that command? This little command (frequently with a WHERE clause) is a great way to tell how far along you are on any given command. Specifically, I’ve been running a bunch of DELETEs recently. I’ve got something like 5-50 million rows of data to delete and I’d like to know how far along I am. A common way to do this would be just a simple count. SELECT COUNT(1) FROM TableName WHERE ToBeDeleted = 1; Unfortunately, while the DELETE is running I’m not going to get a result. Blocking is a thing, which makes this one of the few times where NOLOCK ..read more
Visit website
Can you take a differential backup of master?
SQL Studies
by Kenneth Fisher
2M ago
In one of the sessions I attended during the Pass Data Community Summit the speaker asked “If master is in the simple recovery model can I take a differential backup of it?” And I of course thought “Yes, of course you can.” Turns out I was wrong. BACKUP DATABASE master TO DISK = 'NUL' WITH DIFFERENTIAL; Msg 3024, Level 16, State 0, Line 3 You can only perform a full backup of the master database. Use BACKUP DATABASE to back up the entire master database. Msg 3013, Level 16, State 1, Line 3 BACKUP DATABASE is terminating abnormally. Ignore the fact that I took the backup to NUL. That was jus ..read more
Visit website
Baby Steps and Continuous Improvement
SQL Studies
by Kenneth Fisher
3M ago
It’s the last Friday of the year and I’ve been struggling to think of a good way to close things out. So here’s a thought for you as we cross into the next glorious year of the 2020’s. You don’t have to make big changes. In fact, I will go so far as to say don’t make big changes. Make small ones. Baby Steps. Not only are the easier to complete, but easier to maintain. And in the end, enough baby steps and you’ll get where you wanted to be anyway. Sometimes you’ll look back over the last month (or year) and wonder where it went. But can you say it, whatever it is to you, is better now? Are thin ..read more
Visit website
SELECT FORMAT(COUNT(1),’N’) FROM TableName WITH (NOLOCK);
SQL Studies
by Kenneth Fisher
3M ago
Alternate title: How do I tell how far I am on that command? This little command (frequently with a WHERE clause) is a great way to tell how far along you are on any given command. Specifically, I’ve been running a bunch of DELETEs recently. I’ve got something like 5-50 million rows of data to delete and I’d like to know how far along I am. A common way to do this would be just a simple count. SELECT COUNT(1) FROM TableName WHERE ToBeDeleted = 1; Unfortunately, while the DELETE is running I’m not going to get a result. Blocking is a thing, which makes this one of the few times where NOLOCK ..read more
Visit website
Can you take a differential backup of master?
SQL Studies
by Kenneth Fisher
3M ago
In one of the sessions I attended during the Pass Data Community Summit the speaker asked “If master is in the simple recovery model can I take a differential backup of it?” And I of course thought “Yes, of course you can.” Turns out I was wrong. BACKUP DATABASE master TO DISK = 'NUL' WITH DIFFERENTIAL; Msg 3024, Level 16, State 0, Line 3 You can only perform a full backup of the master database. Use BACKUP DATABASE to back up the entire master database. Msg 3013, Level 16, State 1, Line 3 BACKUP DATABASE is terminating abnormally. Ignore the fact that I took the backup to NUL. That was jus ..read more
Visit website
Making Extended Events a bit more usable : T-SQL Tuesday #166
SQL Studies
by Kenneth Fisher
5M ago
Running a bit late this month for T-SQL Tuesday (it’s not exactly Tuesday is it!) but that’s Grant Fritchey’s (blog|twitter) fault! Yes, he’s the host this month and he ran a bit late with the invitation. I probably should have gotten this done earlier but I’m blaming Grant and you can’t stop me. Grant would like us to talk about Extended Events. I’ve posted a few things in the past about Extended Events such as featuring a video of Grant’s that helped me understand the Extended Events Viewer quite a bit better, and an Extended Events session that catches errors that occur. That said, I still ..read more
Visit website
SQL Homework – September 2023 – Time for temporal tables.
SQL Studies
by Kenneth Fisher
5M ago
Recently I needed to use temporal tables. And not just for the job history table in a managed instance. In the vein of try it before you need it, (well, maybe a bit late for me I guess) let’s play with them a bit this month. Create a new table with a temporal table. (15pts) Run some inserts, updates, and deletes on the table (0 points, this is way too easy ) Review the data in the temporal table (5pts) Create a table on a high-activity table in a test environment (or a regular table and use a tool or some scripts to create high activity) and monitor the temporal table during the activity (20 ..read more
Visit website
One job to rule them all
SQL Studies
by Kenneth Fisher
5M ago
Three batch jobs that run all night. Seven for the DBAs to maintain and protect. Nine quick little jobs run by the app. One to avoid on-call In the middle of the night when DBAs are sleeping One job to manage them all, One job in case they hang, One job to check, and in case of problems end them. In the middle of the night when DBAs are sleeping ..read more
Visit website

Follow SQL Studies on FeedSpot

Continue with Google
Continue with Apple
OR