I have set up a transactional replication to replicate data from database A to B. As the data in database A is just a temporary db, I need to clean up periodically. I have already replaced the delete command in the stored procedure so that delete action will not triggered in subscriber database when I use delete command in publisher database.
However, using delete command in publisher db will generate a huge txn log that make my drive out of disk space. I can't use 'truncate table' function as the table is participated in replication.
Anyone has a good idea how to clean up the publisher database?
thanks,
PWell...the only option I can think of will be to backup/truncate the log whenever you do batch-deletes.
BACKUP LOG MyNwind
WITH TRUNCATE_ONLY
Be aware though that when doing this the log not be recoverable! Hope this works for you...
Showing posts with label replicate. Show all posts
Showing posts with label replicate. Show all posts
Thursday, March 29, 2012
Delete data in publisher database
Sunday, March 25, 2012
Delete a Database which was previously Replicated
Hello,
I have a database which i used to replicate it to a subscriber, but i
deleted subscriber and publication and everything that related to it.
I don't know why, when i want to delete it, i get the following error message:
"Error 3724: Cannot drop the database xxxxxx because it is being used for
replication"
Thanks in advance for your help !!!!!!!!
Mathew
Matthew,
please use sp_removedbrepication on the database.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
I have a database which i used to replicate it to a subscriber, but i
deleted subscriber and publication and everything that related to it.
I don't know why, when i want to delete it, i get the following error message:
"Error 3724: Cannot drop the database xxxxxx because it is being used for
replication"
Thanks in advance for your help !!!!!!!!
Mathew
Matthew,
please use sp_removedbrepication on the database.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
Labels:
database,
delete,
ideleted,
microsoft,
mysql,
oracle,
publication,
related,
replicate,
replicated,
server,
sql,
subscriber
Subscribe to:
Posts (Atom)