The topic for this month’s TSQL Tuesday, hosted by Allen White, is an invitation to share your tricks.  Before I get into my trick to share, I wanted to mention that Allen is a pretty awesome speaker too.  I got to see his session “Gather SQL Server Performance Data with Powershell” at the SQL Saturday [Keep reading...]

Fixing orphaned users

Whenever I restore a production database to a development server, I often end up with orphaned users. You can see in the screen shot below that username matt has no login associated with it. An account becomes orphaned when there is a user account with security rights in the database that is not linked to [Keep reading...]

T-SQL Tuesday #23: Fixing Joined Views

This month’s TSQL Tuesday topic, hosted by Stuart Ainsworth, is Joins.  I am going to share a story of a performance improvement that I made with joined views. One of the main vendor-built applications that I support has views built on top of tables.  Unfortunately that’s not the end of the story.  These views are [Keep reading...]

Today I am continuing from my introduction to SSMS Template Explorer.  Part 2 today is a quick look at creating your own templates.  I mentioned in the previous post that if you delete one of the Microsoft provided templates, it will be recreated when you next launch SSMS.  Another thing of note: if you make [Keep reading...]

T-SQL Tuesday #22 Data Presentation

This month’s TSQL Tuesday topic: Data Presentation. I am not going to show any code this month, and I am also going to veer off the topic of SQL server slightly. My company does a lot of reporting though Cognos.  The nice thing about Cognos is that it is platform independent.  Once a connection is [Keep reading...]

In my current job, I have a MySQL database server that I am responsible for.  We also run some reporting through Cognos against this server.  I ran across a problem while testing reports on an upgrade to Cognos 10.  I thought I would share the solution here in case it helps someone else out someday. [Keep reading...]

SSMS Template explorer

I have used several different methods for collecting SQL scripts (both that I have written, and have borrowed from others) to reuse.  A few that come to mind include: 1. saving the scripts in individual .sql files somewhere on my hard drive, 2. storing the scripts as an individual page in Microsoft Onenote. 3. saving [Keep reading...]

Just a quick funny for today. For my daily to do list, I generally work off of a half sheet of paper on my desk.  I keep a running list and it feels good to physically scratch a done item off.  This morning I added to my list: “Update SSMS tools on <server name removed [Keep reading...]

Jen McCown from midnightdba.com started a useful (to me anyways) set of homework assignments called Applied SQL.  Each post has a homework assignment for us.  This first one has been useful to me in order to make myself read Books Online and understand where information comes from, rather than just running a script when I [Keep reading...]

System tables have lots of interesting and useful information stored on all facets of SQL server.  Generally speaking, whenever I find a script that shows useful information, I store that script away for future use.  I then run the script whenever I need the information without really thinking about it.  Jen McCown from midnightdba.com started [Keep reading...]

© 2012 Suffusion theme by Sayontan Sinha