-->
Click here to monitor SSC
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.

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, 94 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, 84 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

3 comments, 932 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, 194 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, 1,593 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, 127 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, 203 reads

Posted in SQLStudies on 1 February 2017

Azure quick start

In case you hadn’t noticed, I love built in help. DBCC HELP, the script button in SSMS, even BOL. Well here’s another one.

Throughout the Azure portal you will find buttons called Quick Start. You won’t find it everywhere but I’ve found it in the Resource… Read more

0 comments, 117 reads

Posted in SQLStudies on 30 January 2017

My SQL logins don’t work. Again.

My recent post on why SQL logins aren’t working has generated a couple of follow up posts. The first one was on how to create a connect item and then this one. It was pointed out to me that the errors in the log have quite a bit more information… Read more

0 comments, 1,575 reads

Posted in SQLStudies on 25 January 2017

Creating a connect entry.

I recently wrote a blog about how to tell why your SQL login isn’t working. There were a lot of good comments and several of them suggested that I create a connect entry to make the error easier to understand. There was also a question of how to create… Read more

4 comments, 743 reads

Posted in SQLStudies on 23 January 2017

Lead Blocker

Blocking is just part of life I’m afraid. Because we have locks (and yes we have to have them, and no, NOLOCK doesn’t avoid them) we will have blocking. Typically it’s going to be very brief and you won’t even notice it. But sometimes you get a query or… Read more

7 comments, 153 reads

Posted in SQLStudies on 18 January 2017

What is COPY_ONLY?

You’ll frequently hear that you should add the COPY_ONLY clause when taking an ad-hoc full backup to avoid messing up the backup chain. Just in case you haven’t: You should add the COPY_ONLY clause when taking an ad-hoc full backup to avoid messing up the backup chain.

But you may… Read more

2 comments, 1,872 reads

Posted in SQLStudies on 16 January 2017

Why won’t my SQL Logins work?

I recently had an interesting time getting the SQL Auth logins on a new instance working. I was doing a side by side upgrade and the only server principals used by the application were SQL Server authenticated logins. I tried over and over again but kept getting the same error. Read more

10 comments, 406 reads

Posted in SQLStudies on 12 January 2017

Connect suggestion to add included columns to sp_helpindex

I’m a big fan of the sp_help system stored procedures, which is why I’ve been a bit disappointed that the sp_helpindex stored procedure is rather badly flawed. It doesn’t have the included columns from the index. This seems a bit strange to me since included columns first appeared in… Read more

0 comments, 165 reads

Posted in SQLStudies on 10 January 2017

A detailed view into your Azure resources

I’ve been studying Azure recently and came across a really interesting Azure site.

resources.azure.com

To give you an idea why I find this view so interesting I’m going to drill down to a SQL Database that I have.

Up front, you can see some interesting information. The location, status, service… Read more

0 comments, 1,048 reads

Posted in SQLStudies on 5 January 2017

sp_refreshsqlmodule_internal – The user does not have permission to perform this action.

Honestly, I’m only posting this because I had a hard time finding anything posted on this error and I found it somewhat unclear. Here is a quick walk through to produce the error:

-- Create server principal.
CREATE LOGIN SQLTest WITH PASSWORD = 'SQLTest';
GO
-- Create a database principal…

Read more

0 comments, 191 reads

Posted in SQLStudies on 28 December 2016

A semester’s worth of Backup and Recovery blogs – The TSQL Tuesday 85 Rollup

I was thrilled to host TSQL Tuesday #85, the last TSQL Tuesday of 2016. My subject was backup and recovery and I was pleased to see this line of my invitation quoted several times.

Backups are one of the most common things DBAs discuss, and they are at once one…

Read more

0 comments, 196 reads

Posted in SQLStudies on 26 December 2016

sp_helptext vs object_definition()

I’ve been using sp_helptext for years. Honestly I probably end up using it at least once a day. But I was recently exposed to object_definition() which has a similar output. There are, however, a few differences.

sp_helptext

This system function returns the text of any (T-SQL) code based object. I.e.… Read more

3 comments, 185 reads

Posted in SQLStudies on 21 December 2016

:OUT :OUT darn results!

Years ago I worked for a company that had a rather cool way of handling requests. When we ran the request the query we used and the output were saved to a directory on the network. This way if there were any questions about what had been done we had… Read more

2 comments, 154 reads

Posted in SQLStudies on 19 December 2016

An interview with me

The other day I received an email asking for some help with a school project. Would I please answer some questions about my career and industry. Well after some due diligence I answered the questions. But the questions were rather interesting and the answers turned out pretty well (IMHO) so… Read more

6 comments, 190 reads

Posted in SQLStudies on 15 December 2016

Older posts