Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Changing Owner or Mirrored DBs Expand / Collapse
Author
Message
Posted Thursday, July 7, 2011 7:44 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, July 24, 2014 6:10 PM
Points: 98, Visits: 297
How would I go about changing owners of a database that are within a mirror?

Jonathan
Post #1138140
Posted Thursday, July 7, 2011 7:51 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, July 24, 2014 6:10 PM
Points: 98, Visits: 297

Would I have to remove mirroring then change the owner then setup mirroring back?
Post #1138147
Posted Friday, July 8, 2011 5:55 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 9:57 AM
Points: 6,304, Visits: 13,601
exec sp_changedbowner at the principal

-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs"
Post #1138823
Posted Friday, July 8, 2011 7:32 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, July 24, 2014 6:10 PM
Points: 98, Visits: 297
I tried this at the owner but did not have any luck.
So I just ended up removing the mirroring, changing the owner then going back and setting backup the mirroring.

Jonathan
Post #1138904
Posted Friday, July 8, 2011 7:43 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 9:57 AM
Points: 6,304, Visits: 13,601
what was the command you used to do this

-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs"
Post #1138910
Posted Friday, July 8, 2011 7:51 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, July 24, 2014 6:10 PM
Points: 98, Visits: 297
exec sp_changedbowner 'sa'
Post #1138915
Posted Friday, July 8, 2011 7:54 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 9:57 AM
Points: 6,304, Visits: 13,601
Jonathan Marshall (7/8/2011)
exec sp_changedbowner 'sa'


as you're not using a USE statement, what database focus did you have set for the query window?

also did the user account exist on the mirror server, you need to ensure accounts are synchronised between the 2 instances?


-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs"
Post #1138916
Posted Friday, July 8, 2011 7:55 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, July 24, 2014 6:10 PM
Points: 98, Visits: 297
Error message
Msg 954
The database x cannot be opened because it is acting as a mirror database
Post #1138919
Posted Saturday, July 9, 2011 4:01 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 9:57 AM
Points: 6,304, Visits: 13,601
Jonathan Marshall (7/8/2011)
Error message
Msg 954
The database x cannot be opened because it is acting as a mirror database

i am able to change the owner at the principal with no issues, however this does not filter through to the mirror. failover manually and change the owner is how i did it eventually

That error leads me to believe you ran the command against the mirror database


-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs"
Post #1139318
Posted Saturday, July 9, 2011 6:27 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, July 24, 2014 6:10 PM
Points: 98, Visits: 297
My apologies if I was not clear but I meant on the mirrored databases I could not change the ownership.

Jonathan
Post #1139331
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse