Scripting out SQL Server Logins

I regularly move logins between servers.  Mostly this is between production and our DR site.  I’ve used the code in KB246133 [http://support.microsoft.com/kb/246133] many, many times but it’s pretty limited.  I started with that and wrote the script below. * There is a user-defined function…

Lessons from a SAN Failure

At 1:10AM Sunday morning the main SAN at one of my clients suffered a “partial” failure.  Partial means that the SAN was still online and functioning but the LUNs attached to our two main SQL Servers “failed”.  Failed means that SQL Server wouldn’t start and the MDF and…

SQL Server Blogs I Read

Peter Larsson [http://weblogs.sqlteam.com/peterl/] recently scrubbed his laptop but didn’t bring over his favorites and made a plea for interesting SQL Server related blogs [http://weblogs.sqlteam.com/peterl/archive/2010/02/03/The-impossible-thing-happened.aspx] .  My reading list of SQL Server blogs and sites is up…

SQL Server Links - 19 January 2010

The Bit Bucket (Greg Low): IDisposable : Stored Procedures - Time for a real contract? [http://sqlblog.com/blogs/greg_low/archive/2010/01/19/stored-procedures-time-for-a-real-contract.aspx] [sqlblog.com/blogs/greg_low/] Interesting case of watching log file growth during a perf test [http://www.sqlskills.com/BLOGS/PAUL/post.aspx?…

SQL Server Links - 8 Dec 2009

I’ve been posting links to interesting blog posts in the SQLTeam.com Newsletter [http://www.sqlteam.com/newsletter.aspx] for over a year now.  I going to try posting them here also. Oh what job was it? A procedure to search your jobs for a particular string [http://www.…

Cost to Compile a Query

It’s pretty easy to determine the CPU and disk resources that a given query or stored procedure will use.  It’s more difficult to determine the resources that were used to compile that query plan.  You can start by looking at sys.dm_exec_cached_plans.  It has a…

SQL Server sites I visit

Google Reader just introduced functionality to create “bundles” of feeds [http://googlereader.blogspot.com/2009/05/life-is-great-bundle-of-little-things.html] .  I subscribe to roughly 60 SQL Server blogs that I read on a regular basis.  You can download an OPML [http://www.google.com/reader/public/subscriptions/user%2F06009164286782170095%2Fbundle%2FSQL%20Server%…