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»»

Restoring a databse with replication Expand / Collapse
Author
Message
Posted Wednesday, July 16, 2003 12:32 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Thursday, July 10, 2014 10:06 PM
Points: 423, Visits: 534
Hi
I have made a backup of database with replication and restored on to another server with warm standby. However I am now unable to change the state of the database,restore over it, detach or remove replication.

Any ideas?




Post #14226
Posted Wednesday, July 16, 2003 4:12 PM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: Moderators
Last Login: Yesterday @ 2:51 PM
Points: 6,790, Visits: 1,902
I restore frequently on the same server with different name, haven't had problems. Is the db accessible at least?

Andy
http://www.sqlservercentral.com/columnists/awarren/




Andy
SQLAndy - My Blog!
Connect with me on LinkedIn
Follow me on Twitter
Post #70801
Posted Wednesday, July 16, 2003 4:56 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Thursday, July 10, 2014 10:06 PM
Points: 423, Visits: 534
The DB is read only. However replication is preventing me from
restoring a full standby, applying differentials or applying alter database to make it read/write. Also I am unable to stop replication because the database is read only and so cannot change the replication settings.



Edited by - growl on 07/17/2003 12:13:11 AM



Post #70802
Posted Thursday, July 17, 2003 4:53 AM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: Moderators
Last Login: Yesterday @ 2:51 PM
Points: 6,790, Visits: 1,902
Read only on purpose? Have you tried sp_dboption to remove the read only setting? Also the published attribute.

Andy
http://www.sqlservercentral.com/columnists/awarren/




Andy
SQLAndy - My Blog!
Connect with me on LinkedIn
Follow me on Twitter
Post #70803
Posted Thursday, July 17, 2003 9:43 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Thursday, July 10, 2014 10:06 PM
Points: 423, Visits: 534
[quote]
Hi Andy thanks but I get the following message

Server: Msg 5063, Level 16, State 1, Line 1
Database 'nab_pcs' is in warm standby. A warm-standby database is read-only.
Server: Msg 5069, Level 16, State 1, Line 1
ALTER DATABASE statement failed.
sp_dboption command failed.




Post #70804
Posted Friday, July 18, 2003 4:08 AM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: Moderators
Last Login: Yesterday @ 2:51 PM
Points: 6,790, Visits: 1,902
Try this:

RESTORE DATABASE mydb
WITH RECOVERY


Andy
http://www.sqlservercentral.com/columnists/awarren/




Andy
SQLAndy - My Blog!
Connect with me on LinkedIn
Follow me on Twitter
Post #70805
Posted Monday, July 21, 2003 6:25 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Thursday, July 10, 2014 10:06 PM
Points: 423, Visits: 534
Hi Andy I am unable to use this command as I do not have exclusive access to the database.
I have tried setting single user. But still the database is locked?
Can the replication settings be causing this?




Post #70806
Posted Tuesday, July 22, 2003 9:51 AM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: Moderators
Last Login: Yesterday @ 2:51 PM
Points: 6,790, Visits: 1,902
Should not be replication. Query sysprocesses to see anything connected to that db.

Andy
http://www.sqlservercentral.com/columnists/awarren/




Andy
SQLAndy - My Blog!
Connect with me on LinkedIn
Follow me on Twitter
Post #70807
Posted Wednesday, July 23, 2003 2:08 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Thursday, July 10, 2014 10:06 PM
Points: 423, Visits: 534
Hi Andy,
I checked the dbid by looking in sysdatabases and did
select * from sysprocesses where dbid = '30'
Nothing.





Post #70808
Posted Wednesday, July 23, 2003 7:07 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Sunday, October 19, 2014 10:25 PM
Points: 992, Visits: 1,662
What about setting Category field for this database to 0 in master..sysdatabases table?
This will fool the server, so it will think, that database is not for replication.
/* did this, when moving logs for dbs with replication to another disk */




Post #70809
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse