I love keyboard shortcuts. I recently mapped a keyboard shortcut to Change Connection and thought I would share some of my other favorites.
- Shft+Arrow keys (sometimes + Ctrl): Highlight blocks of code. Adding in the control key moves you a word at a time rather than a single character.…
I’ve been doing a lot of research recently for my permissions session and for a project at work. During said research I came across three great sets of posters about permissions. I’m going to list them here and on my Study and Reference Materials
Last year Kirsten Benzel(b/t) and Argenis Fernandez(b/t) did this amazing thing. They organized a campaign and raised over $13,000 for Doctors Without Borders. The campaign was called #ArgenisWithoutBorders. The idea was that Argenis would wear this really amusing (and… Read more
A few weeks ago I saw a tweet about Kendra Little’s (b/t) new SQL Server Quizzes. Of course I had to give them a shot and while I was somewhat disapointed in my scores on a few over all they were a lot of fun.… Read more
Yes, you heard me right. SSMS 2015. No I’m not one of those crazy recruiters who keep asking for 10 years of experience with SQL 2013. Well, technically it’s a preview of a separate install of SSMS for SQL 2016.
There are supposed… Read more
Defaults. This is subject with a huge breadth and depth. Which as it happens, makes it a great T-SQL Tuesday subject.… Read more
What is the database property Compatibility Level? I don’t get asked to write about specific subjects very often but in this case not only did I have someone ask me to write about it but had a co-worker ask me what it is. I’ve always thought this was pretty… Read more
I love keyboard shortcuts. I’d rather keep my hands on the keyboard than move back and forth to the mouse. Not that I won’t use the mouse, but only when I have to. One frequent (and annoying) task that I haven’t been able to find a keyboard shortcut for is… Read more
Blocking and deadlocking are not things you typically want to do deliberately. But sometimes you need to test error handling or prove a point and then you need to do the unusual.
A few months ago I wrote a post about the fact that I had actually submitted a session to PASS Summit. Well as I’m sure you are aware the selected sessions have been announced. They were officially announced Friday but I actually received my result email on Thursday evening.… Read more
Earlier this week I was scripting out a table with some legacy columns (InsertDate and InsertBy for example). If you have created these type of columns before you have probably put a default on each. InsertDate is pretty easy, probably something like GETDATE() or GETUTCDATE(). But what do you… Read more
I got my first real world experience with a TDE (transparent data encryption) database recently. For those who don’t know TDE encrypts all of the data at rest. So the database files are encrypted and the backup is encrypted. The data is automatically decrypted as you read it and encrypted… Read more
Recently Adam Machanic (b/t) was telling me about an interesting effect of the top operator. When I asked for an example he pointed me to a few of his sessions from various Pass Summits. They are amazing and I recommend watching them, but they… Read more
Renaming a database isn’t something you do frequently but it does have bit of a gotcha. First of all let’s go over how you actually rename the database. It’s pretty simple.
Right click on the database name in the object explorer and select rename or highlight the name and… Read more
TLDR; Search for and modify the sqlfile.sql file.
During a recent T-SQL Tuesday Boris Hristov (b/t) taught me about SET NOEXEC ON in his post Teaching and Learning. The NOEXEC Thing. When this setting is turned on queries in the current window are compiled but not… Read more
It’s the second Tuesday of the month and that means T-SQL Tuesday time! T-SQL Tuesday is a blog party started by Adam Machanic (b/t) over 5 years ago. Each month a different blogger will present an idea to blog on. Side note: If you are having… Read more
Recently we have been doing a number of instance moves as part of a large upgrade project. And as anyone who’s done many of these types of moves knows, orphans are a big pain. You backup your database from one server and restore it to another and all of a… Read more
I blogged in the past about two simple commands that can be a big help in performance tuning SET STATISTICS IO and SET STATISTICS TIME. Well I learned a new one recently. Client Statistics Unfortunately there is no t-sql command to turn it on but it’s not terribly difficult.
Query->Include… Read more
A question came up at work the other day, mostly as a mind game, but you never know it might actually come up at some point. So here is the idea.
- UserA is a member of Group1, Group2 and Group3.
- Group1 is set up as a server principal with a…
The default database is one of the options when creating a login in SQL Server. This is the initial database that the login will connect to when logging in. Unless of course you specify a different database in your connection string.
-- Creating a login with a…