-->
SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

SQLStudies

My name is Kenneth Fisher and I am Senior DBA for a large (multi-national) insurance company. I have been working with databases for over 20 years starting with Clarion and Foxpro. I’ve been working with SQL Server for 12 years but have only really started “studying” the subject for the last 3. I don’t have any real "specialities" but I enjoy trouble shooting and teaching. Thus far I’ve earned by MCITP Database Administrator 2008, MCTS Database Administrator 2005, and MCTS Database Developer 2008. I’m currently studying for my MCITP Database Developer 2008 and should start in on the 2012 exams next year. My blog is at www.sqlstudies.com.

Archives: February 2017

Queries with optional parameters

These are those queries where you are pulling for, let’s say, a first name, a last name, a state, and/or a city. Simple enough, until you notice that or. We might only get a first name, or a state and the query still needs to work. These queries are… Read more

10 comments, 2,834 reads

Posted in SQLStudies on 27 February 2017

What’s in my backup file?

Restoring a backup file is pretty easy right?

RESTORE DATABASE [Test] FROM DISK = 'C:\backups\backup.bak';

Ok, but what if more than one database backup is stored in that single backup file? Didn’t know you could do that?
Yep. You can.

BACKUP DATABASE [Test] TO DISK = 'C:\backups\backup.bak';
BACKUP DATABASE [AdventureWorks2014]…

Read more

0 comments, 480 reads

Posted in SQLStudies on 22 February 2017

Penny wise, pound stupid

Growing up my mother used this phrase quite a bit. Penny wise, pound stupid. (In case you didn’t know the pound is the British equivalent of the dollar.) Basically, it means paying attention to the small stuff at the expense of the big stuff. My favorite example of this… Read more

0 comments, 194 reads

Posted in SQLStudies on 20 February 2017

Deadlock on ALTER DATABASE

I had an interesting problem recently. A database was stuck in single user mode. How exactly was it stuck you ask? Well, 4-5 system sessions were holding locks on the database (and blocking each other). Which meant I wasn’t able to get exclusive use of the database which is required… Read more

5 comments, 1,123 reads

Posted in SQLStudies on 16 February 2017

Server level database permissions

Sometimes you have a requirement to grant permissions to every database on an instance. Historically this has required creating a user (database level principal) on each database and granting it the correct permission. And making sure to grant those permissions to the model database so that future databases have the… Read more

4 comments, 494 reads

Posted in SQLStudies on 14 February 2017

Deadlock priority

Everyone deals with deadlocks from time to time. But sometimes we need to control who’s the deadlock victim and who isn’t. For example, I’m doing a big delete on a table in a 24×7 environment, I can’t afford downtime to do it so I’m doing my delete in small… Read more

5 comments, 2,338 reads

Posted in SQLStudies on 8 February 2017

SQL Connectivity issues: A guided walk through

The SQL Tiger Team (t) has recently put out a guided walkthrough for SQL Connectivity issues.

Announcement
Walk Through

If you look at the bottom of the announcement you’ll also notice links to walkthroughs for

Troubleshooting Always On Issues
Troubleshooting connectivity issues with Microsoft Azure SQL Database

I’m… Read more

0 comments, 252 reads

Posted in SQLStudies on 6 February 2017

Changing what SSMS opens on startup

When you open SSMS a connection window automatically comes up. Then once you pick your server, connection type, username and password (if needed) you get an object explorer connection.

But what if that isn’t what you want?

In my second ever post (way back in August of 2012) I… Read more

0 comments, 408 reads

Posted in SQLStudies on 1 February 2017