Common SQL Tasks I Do and Scripts

Common SQL Tasks I Do and Scripts 

Restore a database from Backup :

Run Multiple SQL Files using Management Studio :
I find this little used option very handy.Enable SQLCMD Mode in Management studio.

How do I read SQL Server ErrorLog :

How do I switch Primary / Secondary on Switch Mirroring Databases ( Swap Primary / Secondary ):
When the automatic failover is setup , the Primary / Secondary gets swapped during maintenance tasks.
To swap back the Primary/Secondary , connect to the server which’s primary and run the following command.

Leave a Reply

Your email address will not be published. Required fields are marked *