Archives: April 2016
Oh Noes! I have a job that requires me to run an SSIS package, cmdshell script, etc. And I need them to have specific file level permissions! What do I do! I know I need to run my job/job step as a specific AD/Windows user but I don’t see how… Read more
I’m a big fan of certifications as a training exercise. However not everyone has the same interests. With the new MCSA (well new 6-8 years ago) we were required to take the data exam (70-461), the admin exam (70-462) AND the BI exam (70-463). I know a number… Read more
Me: I think I’m going create a new playground instance.
Myself: Make sure you use a case sensitive (CS) collation when you install it!
I: You mean a collation that forces us to pay attention to the case of the variable names (for example)? So that something like this returns… Read more
Everyone makes mistakes right? And sometimes you create an object and decide later that you messed up and need to rename it.
EXEC sp_rename 'OldName','NewName'
I love this somewhat obscure mathematical operator. All it does is return the remainder of a division statement but even though it’s pretty basic most people I talk to have never heard of it. The format is
dividend % divisor = remainder
DECLARE @remainder INT DECLARE @dividend INT = 10…
It’s T-SQL Tuesday again and this month we are hosted by Jens Vestergaard (b/t) who want’s us to talk about our favorite SQL Server feature. Great topic, but a really difficult choice. There are so many great features of SQL Server.
Some of my favorites include: Read more
This is one of those frequently ignored best practices.
When you create an object, specify the schema where it will be created.
I should also point out
When you reference an object (in a query for example), specify it’s schema.
I know I have a tendency to forget this myself.… Read more
Typically it’s considered best to run your queries without an ORDER BY and let the application do any sorting needed. Sometimes though it’s faster and easier to let SQL handle the sorting for you. And that’s fine. SQL is very good at sorting.
Simple sorts are pretty easy. In the… Read more
I’ve playing around with AdventureWorks and managed to found some hidden code! Truly odd stuff. I’m so shocked I couldn’t wait until the time I usually post.
So if you take the x character of the first character column of each table (where x is object_id % len(column) ), merge… Read more