SansSQL

Friday, September 13, 2013

Uninstalling SQL Server Service Pack or Hotfix

Prior to SQL Server 2008, if you had to rollback a Service pack or hotfix installation, it was a long and hectic process as it involves rebuilding the SQL Server and restoring the user and system databases and setting up jobs, logins,etc... And in the meantime if you have missed backing up something then you are gone!
Starting from SQL Server 2008, Service Pack 1, microsoft has introduced an option to uninstall the service pack or an hotfix. It is as simple as uninstalling an application from your computer.
To uninstall an SQL Server service pack or hotfix,
Go to "Control panel" --> "Uninstall a Program" --> Click on "view installed updates" on left hand side
Choose the update you want to uninstall and click "Uninstall" option.

Tuesday, September 10, 2013

How to Restore model and msdb database

Unlike master database, restoring model and msdb is simple and follows the same procedure as restoring any other user database. However we have to be very cautious while restoring system databases as it will have sensitive data which is important for SQL Server to function without any issues.

Monday, September 9, 2013

How to Restore Master database

Before restoring master database, make sure
  1. The build versions of the both instances (Current instance and the instance where backup is generated) should be the same.

Sunday, September 8, 2013

The backup of the system database on the device <backupPath> cannot be restored because it was created by a different version of the server <version> than this server <version>

While I was trying to restore the backup of master database taken in SQL Server 2008 on to an SQL Server 2008 R2 instance, I was presented with the below error.
Msg 3168, Level 16, State 1, Line 1 The backup of the system database on the device D:\Backup\master.bak cannot be restored because it was created by a different version of the server (10.00.1600) than this server (10.50.1600). Msg 3013, Level 16, State 1, Line 1 RESTORE DATABASE is terminating abnormally.

Wednesday, August 28, 2013

Backup databases with COPY_ONLY using Maintenance Plans - SQL Server 2012

Prior to SQL Server 2012, we were not allowed to take COPY_ONLY backups using the Maintenance Plans. We could use this option only with the Backup Database GUI or using T-SQL scripts.
In SQL Server 2012, this is one of the new option that allows us to take COPY_ONLY backups using the Maintenance Plans.

Ads