RSOD – Red Screen of Death! No, I’m not kidding.

So there is actually a red screen of death. Microsoft does have an RSOD, it is very rare to see these days. As a matter of fact, it was only visible in a beta version of Windows Vista. Seen here:

Windows Vista Red Screen of Death
Windows Vista Red Screen of Death

There is another RSOD, HP has one too and I saw it first hand today:

HP Red Screen of Death

This error indicates a problem with your SAS Controller. A firmware upgrade from HP might be able to fix your problem.

Either error is not good, my sympathies.

How To: Review Saved Perfmon (aka Performance Monitor) Binary Log (BLG) Files

Alright so this isn’t really obvious  in Perfmon.  This is what you do to review a log file.

Step 1: Right mouse click on Performance Monitor (figure 1).

Step 2: Select Properties.Step 3: Select Source then connect to the file, database, etc. (figure 2).

SQL Server DAC (Dedicated Administrator Connection)

SQL Server DAC (Dedicated Administrator Connection)

Have you ever had a query go rogue? CPU at pegged at 100%? This will help!

Note: This is only for SQL Server 2005 and later…

There is some groundwork to do.

Setting up the DAC

Run these statements as an administrator:

sp_configure 'remote admin connections',1
GO
RECONFIGURE
GO

This will enable the ability to connect to the server.

Using DAC When IT Matters!

You can do two things use sqlcmd to connect to the SQL Server or a query window (not the Object Browser). The trick is before the name of the server prefix the name of the server with admin:.

Example:

admin:servername

A note of interest, you are limited by what you can do in this mode. Nothing that needs to store temporary tables and things like that. You can even use this if you do something terrible like corrupt the master or tempdb databases.

I hope you never need this!

More on SQL Server Denali!

This guy has a great blog article on high availability on the latest version of SQL Server. I highly recommend reading it. Unlike previous versions, you can query all the nodes and you aren’t limited to a two node configuration like before! I have another article, a very terse one, here: http://wp.me/p175D9-3o

SQL Server Denali: HADRON ROCKS. | Brent Ozar – Too Much Information | Brent Ozar – Too Much Information.

IIS Frontpage Extensions – You are not authorized to view this page

If you get this error something changed with your environment that is forcing anonymous login to the server. Here is what to do:

Within IIS Manager, right click on the site in which you need access to. Click on the directory security tab. Click on the edit button within Authentication and Access control. Click on Integrated Windows Authentication.

Enjoy! Of course your account will actually need rights to the site in question.

SQL Server News – Denali!!!

If you are interested in taking a look at the latest and greatest…Denali is found here: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=6a04f16f-f6be-4f92-9c92-f7e5677d91f9

What’s new?

Column based query acceleration is greatly improved. Computed values and aggregates are calculated much, much faster (at least by a factor of 10 according to Microsoft).

Improved performance for FileStream. FileStream was a technology that was introduced in SQL Server 2008.

BI has also been greatly improved with a lot more functionality.

Better programming interfaces.

A workflow approach has been included for better integration.

It now uses Visual Studio 2010 for its interface!

There is now an actual dashboard that is more responsive, a nice bell or whistle (whichever you prefer).

The official Microsoft page for all future versions of SQL Server is here:

http://www.microsoft.com/sqlserver/en/us/product-info/future-editions.aspx

SQL – Turning Several Result Sets into a Single Result Set

In case you need to get several result sets through a single result set, for whatever reason. In my case I have program that works on one result set at a time that needed some aggregate data displayed at the end of the report. Here is what you do:

Create a temporary table to store the table with the most fields in your result set. Everything will use this table for its data. Be sure create a primary key using an int identity(1,1). Without creating a primary key the data will not be stored in any order.

Order the data the way you need it to display and insert it into the temporary table. Then add following result sets to this table.

Note: Data types are important in getting this to work and character/string based data types tend to work the best.

Computers Blogs
Computers

SQL Server – Restore Master Database

I have been working toward a SQL Server certification (70-432). This has resulted in me getting quite a good knowledge of how things work. Here is something interesting I have learned:

Steps (this only works if you have a good backup of Master)

1. Stop the SQL Server instance.

2. From a command prompt (must be running the command prompt as administrator), go into the Binn directory of the SQL Server instance and run “sqlservr -m”. This will start up a special single user mode.

3. Start another command prompt as administrator. Run sqlcmd and then perform the restore, something to the effect of: restore database master from backupdevice if you are using preprogrammed backup devices (something that is recommended).

4. Start SQL Server up normally.

5. Restore MSDB, then Model if necessary.

If you don’t have a valid backup, shame on you! But you can run setup again which will rebuild Master but you have to reattach all databases.

 

PowerGUI – Powershell Remote Installed Hotfixes & Patches

Here is a Node Script to get the installed patches or hotfixes on a remote computer:

[System.Reflection.Assembly]::LoadWithPartialName(‘Microsoft.VisualBasic’) | Out-Null
$name = [Microsoft.VisualBasic.Interaction]::Inputbox(“Enter the IP or Name of the server:”)
Get-WmiObject Win32_QuickFixEngineering -ComputerName “$($name)” | Where-Object{$_.HotFixID -ne “File 1”} | Write-Output

I also have a system monitor to keep track of disk space and CPU/Memory Usage…Click here!

If you found this useful, subscribe.

SQL Server Maintenance Plans vs. Powershell Scripts

I have been working on maintenance plans for some time now and while they are very powerful I am starting to wonder if Powershell might be a better platform to perform my server maintenance. I am starting to lean towards Powershell and here is why. Keep in mind that this is up for debate and I am sure this could stir up some controversy. 

With Powershell it is easier to get access to the OS.  With maintenance plans it gets a little more complicated. Maintenance plans are built for SQL DBAs, not for the person who owns the whole box. Sometimes DBAs have limited access to the server, so for those people Powershell isn’t the best choice. Also if you don’t have a programming background, Powershell might not be for you although you might want to consider it since there are some very simple scripts that can get some serious information to you very quickly, but I digress.

Scripts are highly portable. SSIS packages are as well but you can’t edit them easily without BIDS. Notepad is all you need for Powershell.

I am going to keep you all posted as I am making changes to my scripts.  Once I make a really good script I will post it.