I needed to import a list of all Active Directory user accounts into a table in SQL Server for a recent project. This project also gave me a perfect opportunity to learn a little bit of powershell. Below chronicles the script that I built. I’m going to skip over a lot of the powershell basics [Keep reading...]

SQL Tuesday #028 – Jack of All Trades, Master of None

This month’s TSQL Tuesday is hosted by Argenis Fernandez.  This month’s topic:  ”blog about your experience. Tell us why you specialized, or why you’d like to specialize. If you don’t think that specialization is a good thing, tell us why. Discuss. Argue your point(s).” ================================================= My first job out of college was a Network Administrator for [Keep reading...]

This is a quick one today as a follow-up to my previous post on using the SSMS Template explorer.  While I do like the convenience of using the template explorer to store frequently used scripts, one of my biggest  complaints was the fact that all the scripts are buried several directories down under the C:\users directory (windows [Keep reading...]

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...]

© 2012 Suffusion theme by Sayontan Sinha