February 19, 2002 at 2:46 pm
We have a situation where we restored a database to another server (for development). The original database was set for transactional replication. The restored database, for whatever reason, continues to think its still replicating. Is there a way for me to remove the "replication" from the restored database because I would like to alter some columns in this database. It is currently telling me that it cannot drop the table due to replication, but we aren't using it. We are using SS2K.
Thanks,
Peter Lee
CorSolutions Medical, Inc.
February 19, 2002 at 3:08 pm
Try sp_removedbreplication 'yourdatabasenamehere'
February 20, 2002 at 8:58 am
I tried that and it seemed successful, but I am still unable to alter the column. The tables in the database thinks that it is marked for publication, but the database does not. Any other suggestions?
quote:
Try sp_removedbreplication 'yourdatabasenamehere'
February 20, 2002 at 10:07 am
See if this doesn't do the trick. From SQL BOL:
sp_restoredbreplication
Removes replication settings if restoring a database to the non-originating server, database, or system that is otherwise not capable of running replication processes. When restoring a replicated database to a server or database other than the one where the backup was taken, replication settings cannot be preserved. On the restore, the server calls sp_restoredbreplication directly to automatically remove replication meta data from the restored database.
Syntax
sp_restoredbreplication [ @srv_orig = ] 'original_server_name'
, [ @db_orig = ] 'original_database_name'
[ , [ @keep_replication = ] keep_replication ]
Arguments
[@srv_orig =] 'original_server_name'
The name of the server where the back up was created. original_server_name is sysname, with no default.
[ @db_orig = ] 'original_database_name'
The name of the database that was backed up . original_database_name is sysname, with no default.
[@keep_replication =] keep_replication
For internal use only.
Remarks
sp_restoredbreplication is used in all types of replication.
Permissions
Only members of the sysadmin fixed server role or the db_owner fixed database role can execute sp_restoredbreplication.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy