SansSQL

Tuesday, October 8, 2013

Unable to start SQL Server Service on a cluster instance

When you try to bring online the SQL Server cluster service, it might fail with the error "Login timeout expired".

In my case the SQL Server version was SQL Server 2005 and when I failover to Node1 it was working fine, however when I failback to Node2, it was failing with this error.

This is unusually right?
It works on one node but not on the other node.

Monday, October 7, 2013

SQL Server Agent Could not be started (reason: Error creating new session) - Error 15247

Recently, I was working a server which is newly built and when I tried to start the SQL Server Agent, it failed saying that the Agent service could not be started on the local computer.
When I investigate more in the event viewer i found a message which says "SQL Server Agent Could not be started (reason: Error creating new session)".

Friday, October 4, 2013

Change SQL Server Collation without rebuilding system databases

How many of you want to change the SQL Server Collation without rebuilding the system databases?

In this post, I will explain a method using which the server collation can be easily changed and is through a undocumented start up parameter.
Since this is undocumented, I highly recommend to use this with extra care and with your own risk.

Saturday, September 28, 2013

Restore master database on a cluster instance

Below is the sequence for restoring master database on a cluster instance
  1. Take SQL Server Service Offline from Cluster Admin
  2. Login to the active node of the cluster
  3. Start the SQL Server service in single user mode
    net start "SQL Server (InstanceName)" /c /m /T3608
  4. Login to the instance using sqlcmd
  5. RESTORE master database
    RESTORE DATABASE master FROM DISK = '<BackupLocation>' WITH REPLACE
    
  6. Once the master database is restored, the SQL Service will be shutdown automatically
  7. Start SQL Server Service from Cluster Admin

Friday, September 27, 2013

Restore fails with error "The media set has 2 media families but only 1 are provided. All members must be provided."

When you try to restore a backup, it might fail with the below error.
Msg 3132, Level 16, State 1, Line 1 
The media set has 2 media families but only 1 are provided. All members must be provided. 
Msg 3013, Level 16, State 1, Line 1 
RESTORE DATABASE is terminating abnormally.


This means that the backup file provided for restore is not a complete one.

Okay, now what does "is not a complete one" mean?

This error pops up when the database is backed up into different files using the split backup technique.
In this case, the database backup was split into 2 files and while restoring the database only one file was mentions.
To fix this issue, you have to specify the complete list of backup files which were part of the backup procedure.

Ads