Post patching

--Post Patching Steps

--step1: Verify installation from summary.txt file
--step2: Connect to the instance and verify the patch information
       select  serverproperty('productlevel')
       select @@VERSION
--step3: Restart the system
--step4: Check that all dbs has come online
       select  name,state_desc from sys.databases
--step5: Take backup of all system dbs.
       --master, model, msdb, resource
       backup database master to disk='master.bak'
--step6: Verify that all dbs are consistant
       dbcc checkdb(master)
--step7: Allow the appl team/Testing team to check connectivity from appls.
--step8: Make the instance available to the appls by enabling TCP/IP of the instance.
--step9: To check complete information
SELECT
SERVERPROPERTY('ProductLevel') AS ProductLevel,
SERVERPROPERTY('ProductUpdateLevel') AS ProductUpdateLevel,
SERVERPROPERTY('ProductBuildType') AS ProductBuildType,
SERVERPROPERTY('ProductUpdateReference') AS ProductUpdateReference,
SERVERPROPERTY('ProductVersion') AS ProductVersion,
SERVERPROPERTY('ProductMajorVersion') AS ProductMajorVersion,
SERVERPROPERTY('ProductMinorVersion') AS ProductMinorVersion,
SERVERPROPERTY('ProductBuild') AS ProductBuild
GO

How to Reverse Log Shipping Roles in SQL Server

There are times when you may need to reverse the roles of a primary and standby server.  This is common when you need to patch the primary server and still need to allow users access to the data.  When using database mirroring or SQL clustering as your SQL Server high availability option, reserving the roles of the primary and standby servers is quite easy.  With log shipping, however, it is not as straight forward.

You can always bring the standby database online, create a full backup of it, and restore onto the (previously) primary database to initialize it for log shipping.  However, this approach can be cumbersome especially if the database is large. The following steps will allow you to reverse log shipping roles without the need to initialize the (new standby) database.
  • Disable the log shipping backup job on the primary server.
  • On the standby server, run the log shipping copy and restore jobs to restore any remaining transaction log backups.
  • Disable the log shipping copy and restore jobs on the secondary server.
  • On the primary server, create on last transaction log backup using the NORECOVERY option.
  • On the standby server, restore this transaction log backup using the RECOVERY option.
  • On the standby server (which will now be the primary server), right click on the database and select Properties -> Transaction Log Shipping.  Enable the database to become the primary database and configure the backup and secondary server settings.

.NET Unhandled Exception error when running installing SQL Server 2012

Error when launching setup.exe for SQL Server 2012:

"Unhandled exception has occurred in your application.  If you click Continue, the application will ignore this error and attempt to continue.  If you click Quit, the application will close immediately."


This was resolved by deleting the following folder:

C:\Users\%username%\appdata\local\Microsoft_Corporation