Groups | Blog | Home
all groups > sql server replication > july 2006 >

sql server replication : Replication Housekeeping


Steven Faull
7/13/2006 9:04:46 AM
I'm running snapshot Oracle 9i to SQL 2005 replication, where my SQL 2005
box acts as the distributor and subscriber.

Each morning, when replication runs, the snapshot creates a new folder
shared replication folder (REPLDATA) that contains the scripts required to
populate my SQL database.

Is there a setting, property, job etc that will automatically remove these
files after a certain number of days? These files are large and if not
removed will eventually fill up the disk drive.

Thanks

Paul Ibison
7/13/2006 4:04:52 PM

Do you have anonymous subscribers set up? If so, the snapshot files will
hang around until the distribution retention period. If not, then check the
history of the snapshot cleanup agent and see that it is running correctly -
the files should be removed once read by all subscribers. (I'm assuming that
things in this setup are much the same as a normal publisher setup here :)).

Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

Steven Faull
7/18/2006 2:42:02 AM
Paul

I did have anonymous subscribers set up - I have now set this value to false.
I have set transaction and history retention to 24 hours. I'll check
tomorrow to see if the snapshots created after the change are deleted. I'll
let you know how it goes.

Thanks for the reply - I really appreciate it.
Paul Ibison
7/20/2006 12:00:00 AM
Steven,
just to double-check, when you run sp_helppublication, what is the value of
"allow_anonymous"?
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com

Steven Faull
7/20/2006 1:32:01 AM
I'm still having issues here - the snapshot folders are not being removed.

I do not have a 'snapshot cleanup agent' job but I do have a
'Distribution clean up: distribution' and a
'Agent history clean up: distribution' job both of which run without any
errors.

It seems these jobs take care of the distribution database but do not remove
old snapshot folders.

I don't know if this is relevant, but here is the text from one of the
'Distribution clean up: distribution' jobs

Executed as user: ABCD\sqlagnt. Deactivated initial snapshot for anonymous
publication(s). New subscriptions must wait for the next scheduled snapshot.
[SQLSTATE 01000] (Message 21077) Removed 1 replicated transactions
consisting of 127 statements in 0 seconds (0 rows/sec). [SQLSTATE 01000]
(Message 21010). The step succeeded.

This refers to anonymous subscriptions but I have set anonymous
subscriptions to false.

Any help on this appreciated

Steve







Steven Faull
7/20/2006 6:17:02 AM


Paul

sp_helppublication does not return any rows, just a 'Command(s) completed
successfully.' message. I have tried running the sp on various databases on
the SQL server but no rows are returned.

Paul Ibison
7/20/2006 2:43:38 PM
Sorry Steven - I'm being dumb here. You have an Oracle publication which is
of course a different setup. Unfortunately I can't repro this error as I
don't have the kit. Perhaps this is a facet of the Oracle publication - that
it forcably treats subscribers as anonymous. Let's hope some MS engineers
pick up this thread and will investigate it for you. If you have support
call credits, then I'd call PSS and have them repro.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com

Steven Faull
7/25/2006 1:14:02 AM
AddThis Social Bookmark Button