Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mirroring...

Status
Not open for further replies.

brage98

IS-IT--Management
Sep 8, 2010
27
CA
We have a little powershell script to take care of this.
To make the script more robust so we can re-run it and re-use it,
I'm trying to check to see if the database I'm trying to mirror already has a partner...
Something like:
Code:
IF (Principal Database has Partner) 
Alter Database [TheDataBase] SET PARTNER OFF

Then I can go on through the rest of the code and setup the servers and databases for mirroring.

My question is, how do I perform the:
IF (Principal Database has Partner) check?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top