Monthly Archives: December 2012

2012 Blog in Review

The WordPress.com stats helper monkeys prepared a 2012 annual report for this blog.

Here’s an excerpt:

600 people reached the top of Mt. Everest in 2012. This blog got about 11,000 views in 2012. If every person who reached the top of Mt. Everest viewed this blog, it would have taken 18 years to get that many views.

Click here to see the complete report.

Books that I Read in 2012

The year 2012 was a great year for me in many regards, but today I want to acknowledge that I read fifty books this year!  Reading is great for your mind and your soul so this year I made a concerted effort to read more and I believe this is the most books that I have ever read in a year.

There was a few books on the list that I have read before, but they were read so long ago that it was great to re-read them and experience them all over again especially the Hobbit and A Stranger in a Strange Land.  I read and enjoyed them as a child.  In addition, a few of the Star Wars books I read in my younger days but I would like to read the entire Expanded Universe and I thought it was a great refresher to read them all at once.  Enjoy!

Title Author
The Associate John Grisham
Star Wars Fate of the Jedi  – Outcast Aaron Allston
Atlas Shrugged Ayn Rand
Star Wars Fate of the Jedi  – Omen Christie Golden
Star Wars Fate of the Jedi – Abyss Troy Denning
Star Wars Fate of the Jedi – Backlash Aaron Allston
Star Wars Fate of the Jedi – Allies Christie Golden
Star Wars Fate of the Jedi – Vortex Troy Denning
Star Wars Fate of the Jedi – Conviction Aaron Allston
Star Wars Fate of the Jedi – Ascension Christie Golden
Star Wars Fate of the Jedi – Apocalypse Troy Denning
Star Wars Cloak of Deception James Luceno
A Stained White Radiance James Lee Burke
Star Wars Darth Maul Shadow Hunter Michael Reaves
Star Wars Episode I : The Phantom Menace Terry Brooks
Tales of the Jedi: Dark Lords of the Sith Adult Comic
Star Wars Rogue Planet Greg Bear
Star Wars Darth Plagueis James Luceno
Star Wars Outbound Flight Timothy Zahn
A Stranger In A Strange Land Robert Heinlein
In the Electric Mist with Confederate Dead James Lee Burke
Star Wars The Approaching Storm Alan Dean Foster
Star Wars Episode II: Attack of the Clones R. A. Salvatore
Dixie City Jam James Lee Burke
Burning Angel James Lee Burke
Cadillac Jukebox James Lee Burke
Star Wars Shatterpoint Matthew Stover
Cestus Deception Steven Barnes
MedStar I: Battle Surgeons Steve Perry & Michael Reaves
MedStar II: Jedi Healer Steve Perry & Michael Reaves
Jedi Trial David Shermann
Yoda: Dark Rendezvous Sean Stewart
Labyrinth of Evil James Luceno
Han Solo Trilogy: The Paradise Snare A.C. Crispin
Star Wars Episode III: Revenge of the Sith Matthew Stover
The Rise of Darth Vader James Luceno
Han Solo Trilogy: The Hutt Gambit A.C. Crispin
Han Solo Trilogy: Rebel Dawn A.C. Crispin
The Awakening Kate Chopin
Their Eyes Were Watching God Zore Neale Hurston
A Good Man is Hard To Find Flannery O’Connor
The Ballad of the Sad Café Carson McCullers
The Color Purple Alice Walker
The Testament John Grisham
The Hobbit J.R.R. Tolkien
Star Wars Dark Forces: Soldier for the Empire William C. Dietz
Star Wars Episode IV: A New Hope George Lucas
Swimsuit James Patterson
Heir to the Empire (Thrawn Trilogy Book 1) Timothy Zahn
Dark Force Rising (Thrawn Trilogy Book 2) Timothy Zahn

SQLSat86 Session Review: Andy Warren’s ‘Building a Professional Development Plan’

The most popular blog post for 2012, enjoy!

SQL Swampland

Before we begin, I must first admit that when I saw ‘Building a Professional Development Plan’ in the SQL Saturday 85 Schedule in Orlando back in September, I was not enthusiastic about attending this session as I thought it was more for consultants or for those looking to start their own business.  Quite simply, I was thinking business plan and not individual plan.  In hindsight, I wish I had attended this session back then, but I digress.

As most everyone knows, Andy Warren is the father of SQL Saturday and his status in the SQL community is legendary.  With that being said I will now list the things that I learned from this session.

        • Generally we do not like setting goals as there is an inherit risk of failure.
        • The professional development plan, or PDP, is essentially your business plan as you are essentially a business with a plan.
        • The PDP…

        View original post 322 more words

        The second most popular blog post for 2012, enjoy!

        SQL Swampland

        We take the term multitasking for granted these days.  Everyone is multitasking all day long.  We are checking our cell phones for e-mail while we are driving or in the restroom.  We talk on the cell phone while driving or watching television.  This has accelerated society to a break-neck speed.  I am no different from anyone else as I used to take great pride in boasting in my ability to complete several tasks at the same time.  Being a computer guy, it is only normal that I operate like my machines, multithreading!

        However, it is at this stage in my career when I have realized the fallacy of this whole philosophy.  Technically, it is not possible to multitask most operations unless one of those items does not require any active input.  For example, talking while driving or walking and chewing gum.  Driving for most of us has become automatic and only…

        View original post 230 more words

        Creating a Red Gate Backup Pro “Virtual Restore” Job Automatically (Part 9)

        If you have been playing along at home this month then you know about some of the struggles that I have faced with automating the Red Gate Backup Pro automatically.  Well, with the help of Red Gate and some rewriting of their provided script, I now have a script that will work automagically!  When I say automagically, I mean that I want the script to run forever without any more interference from me in the same manner that our Ola Hallengren backup scripts work.

        If you are not familiar, this tool is excellent for many reasons but one of the reasons that we like it is for the simple fact that if a new database is created, it will be maintained automagically.  I do not have to create any maintenance plans or agent jobs each time I add a database to a server.  We have several servers that get new small databases all the time and this is a time saver as well as a life saver.  Now this scripts will do the same, it will iterate through the database names and restore the latest backup set as a new database with the name ‘_Restored’ tacked on the end of the existing name and place the data and log file in a separate directory to avoid overwriting your existing databases.

        Do not worry about failure reporting with the job as Red Gate will send you an error for each database, pass or fail.  If you wish to see only the failures then change ‘MAILTO’ to ‘MAILTO_ONERRORONLY’ in the script.

        –This script will restore multiple databases where each database has it’s own Full Backup to be restored.
        USE master

        DECLARE @dbname NVARCHAR(260)
        — Add any databases in that you want to exclude
        DECLARE cdatabases CURSOR FOR
        SELECT name
        FROM   sysdatabases
        WHERE  name != ‘tempdb’
        AND name != ‘master’
        AND name != ‘msdb’
        –Set @restorepath to be the path of where your backups are located, in my example this is ‘D:\Backup\’
        DECLARE @restorepath VARCHAR(500)
        –@filename will need to be modified depending how the backup files are named
        DECLARE @filename VARCHAR(500)
        DECLARE @restorestring VARCHAR(1000)
        –Not needed if running in a SQL job
        DECLARE @exitcode INT
        DECLARE @sqlerrorcode INT

        OPEN cdatabases

        FETCH next FROM cdatabases INTO @dbname

        WHILE @@FETCH_STATUS = 0
        BEGIN
        SET @restorepath = ‘D:\SQLVMDEV10\’ + @dbname + ‘\Full\’
        — @filename will need to be modified depending how the backup files are named
        SET @filename = @restorepath + ‘SQLVMDEV10_’ + @dbname + ‘_FULL_*.sqb’
        SET @restorestring = ‘-SQL “RESTORE DATABASE [‘ + @dbname + ‘_Restored] FROM DISK = ”’ + @filename
        + ”’ SOURCE = ”’ + @dbname + ”’ LATEST_FULL WITH MAILTO = ”ed@sqlgator.com”, RECOVERY, DISCONNECT_EXISTING, MOVE DATAFILES TO ”G:\VirtualRestore”, MOVE LOGFILES TO ”G:\VirtualRestore”, REPLACE, ORPHAN_CHECK, CHECKDB = ”ALL_ERRORMSGS, DATA_PURITY, EXTENDED_LOGICAL_CHECKS”, DROPDB” -E’
        –If you wish to apply additional backup, remember to change the WITH RECOVERY to WITH NORECOVERY,
        EXEC master..Sqlbackup
        @restorestring,
        @exitcode output,
        @sqlerrorcode output

        –IF (@exitcode <>0) OR (@sqlerrorcode <> 0)
        —  BEGIN
        —    RAISERROR (‘SQL Backup job failed with exitcode: %d  SQL error code: %d’, 16, 1, @exitcode, @sqlerrorcode)
        —  END
        FETCH next FROM cdatabases INTO @dbname
        END

        CLOSE cdatabases
        DEALLOCATE cdatabases 

        This will generate multiple entries in Red Gate Monitor, as mentioned in Part 4 of our journey.  In order to prevent these setup a maintenance window on your monitoring tool and run this script only during the maintenance window ensuring that no other jobs run during that time so that you do not miss any important alerts from those maintenance jobs.  Here is a link from Red Gate detailing how to set the maintenance windows in Monitor.  Enjoy!

        Migrating SQL Server Database Logins with sp_help_revlogin

        The third most popular blog post for 2012! Enjoy!

        SQL Swampland

        You’ve migrated your database to a new box, with no problems.  You created the login that goes with this database, and all is right in the world.  However, when your user goes to connect to it they get the dreaded error 18456, login failed.  But wait, I created the login, right?

        Not so fast there, accidental DBA.  You are going to need the help of a nifty stored procedure called sp_help_revlogin.  This stored procedure, provided by Microsoft in the link below, will generate a T-SQL script that will copy the logins, their passwords and their corresponding SIDs (or security identification number, which is usually the culprit here).  This is also a great utility when the database has numerous users with various security levels and passwords.  Really now, who wants to write all of that down and recreate it?  Even with screenshots, it can turn into a large, fat-fingering and time consuming event. …

        View original post 70 more words

        Personal Development Plan Part Dos….

        The fourth most popular post from 2012 on SQLGator.com

        SQL Swampland

        Having posted yesterday about my Personal Development Plan, I read a blog post from Neil Hambly regarding his 2012 goals.  Now, I realize that my goals were somewhat vague and easy to worm out of.  Here are the goals that I had mentioned yesterday:

        1. I want to dedicate time everyday to this blog and giving back to the SQL community that has helped me so much over the years.
        2. I want to continue to dedicate time to the SQL community in social media.
        3. I want to attend at least ten events this year consisting of SQL Saturdays, training, code camps, and possible SQL Rally and/or SQL PASS.

        Let’s revise those goals to the following:

        1. I will post daily to this blog in order to give back to the SQL community that has helped me so much over the years.
        2. I will spend time daily helping people on twitter, SQL blogs…

        View original post 453 more words

        SQL Nexus, Read Trace Errors Resolved!

        The fifth most popular blog post for 2012!

        SQL Swampland

        Last Monday we started our SQL Nexus journey together in order for me to refresh my knowledge of  this awesome tool.  Near the end of last week, the blog series was delayed due to an error with the ReadTrace and its corresponding report.  Yesterday and again today, I am troubleshooting our attempt to resume our journey but with little hope for correcting the error.  I have posted the error on CodePlex and am awaiting a response.

        Yesterday, I referenced a “ReadTrace exit code: -2” error in the ReadTrace log file.   I did find one page out there on SQL Server Central where Grant Fritchey (Twitter | Blog) had encountered the problem.  After contacting, Grant he told me that the problem that he had was a simple one, he did not have the file and path name correct which corresponded with the file not found error higher up in the ReadTrace log.  However, when cutting…

        View original post 251 more words

        Red Gate Backup Restore of the Master Database (Part 8)

        One of the errors I encountered with the Red Gate Backup Pro tools discussed extensively this month, was in running the DBCC CHECKDB command on a temporarily restored backup.  It gave errors about the consistency which did not appear in the actual master database.  The following are some interesting blog articles in response to this issue:

        1. Response from Red Gate.
        2. Response from Paul Randal and Kimberly Tripp on SQL Server Pro magazine.

        Basically you will need to do the master database separately.  I run an integrity check weekly against the system databases.  It is a good idea to follow the recommendations from Red Gate listed in the link above.  Enjoy!

        Day Off

        Today begins my six-day holiday, the blog will return to its hard-core SQL action after Christmas.  Enjoy!