I took a look at the snapshot agent history and didn't see any failures. I
also didn't see any messages about trying to delete old the snapshot.
We are not using dynamic snapshots.
We are using continous merge replication, so I tried stopping replication on
one of the publications to insure the snapshot wasn't being locked by the
merge agent and running the snapshot agent and the set the agent to log to a
text file with -OutputVerboseLevel 2
Here are the contents of the log:
----------- Begin Log -----------
Microsoft SQL Server Snapshot Agent 8.00.2039
Copyright (c) 2000 Microsoft Corporation
Microsoft SQL Server Replication Agent:
IAS_SQL_02-CF_Client_Data-CF_Client_Data-94
Connecting to Distributor 'IAS_SQL_02'
Connecting to Publisher 'IAS_SQL_02.CF_Client_Data'
Server:
DBMS: Microsoft SQL Server
Version: 08.00.2039
user name: dbo
API conformance: 2
SQL conformance: 1
transaction capable: 2
read only: N
identifier quote char: "
non_nullable_columns: 1
owner usage: 31
max table name len: 128
max column name len: 128
need long data len: Y
max columns in table: 1024
max columns in index: 16
max char literal len: 524288
max statement len: 524288
max row size: 524288
[3/7/2006 6:42:40 PM]IAS_SQL_02.CF_Client_Data: sp_MSgetversion
Initializing the publication 'CF_Client_Data'
*** [Publication:'CF_Client_Data'] Publication view generation time: 110
(ms) ***
*** [Publication:'CF_Client_Data'] Make generation time: 219 (ms) ***
Generating schema script for article '[CGLOBAL]'
Generating conflict schema script for article '[CGLOBAL]'
Generating referential integrity script for article '[CGLOBAL]'
Generating trigger script for article '[CGLOBAL]'
Generating extended property script for article '[CGLOBAL]'
*** [Article:'CGLOBAL'] Time generating all schema scripts: 2031 (ms) ***
Generating schema script for article '[CDATA]'
Generating conflict schema script for article '[CDATA]'
Generating referential integrity script for article '[CDATA]'
Generating trigger script for article '[CDATA]'
Generating extended property script for article '[CDATA]'
*** [Article:'CDATA'] Time generating all schema scripts: 1469 (ms) ***
*** [System table:'MSmerge_contents'] .SCH script generation time: 15 (ms) ***
*** [System table:'MSmerge_tombstone'] .SCH script generation time: 0 (ms) ***
*** [System table:'MSmerge_genhistory'] .SCH script generation time: 16 (ms)
***
*** [System table:'sysmergesubsetfilters'] .SCH script generation time: 0
(ms) ***
[3/7/2006 6:42:45 PM]IAS_SQL_02.CF_Client_Data: select 1 from
[dbo].[CGLOBAL] (TABLOCK HOLDLOCK) where 1=2
[3/7/2006 6:42:45 PM]IAS_SQL_02.CF_Client_Data: select 1 from [dbo].[CDATA]
(TABLOCK HOLDLOCK) where 1=2
Bulk copying snapshot data for system table 'MSmerge_contents'
select * from cont483DA94F38D3489C87D21E113D380C96 where 1 = 2
[3/7/2006 6:42:45 PM]IAS_SQL_02.CF_Client_Data: select * from
cont483DA94F38D3489C87D21E113D380C96 where 1 = 2
Bulk copied snapshot data for system table 'MSmerge_contents'.
*** [System table:'MSmerge_contents'] Bulk copy time: 687 (ms) ***
Bulk copying snapshot data for system table 'MSmerge_tombstone'
select * from ts483DA94F38D3489C87D21E113D380C96 where 1 = 2
[3/7/2006 6:42:45 PM]IAS_SQL_02.CF_Client_Data: select * from
ts483DA94F38D3489C87D21E113D380C96 where 1 = 2
Bulk copied snapshot data for system table 'MSmerge_tombstone'.
*** [System table:'MSmerge_tombstone'] Bulk copy time: 219 (ms) ***
Bulk copying snapshot data for system table 'MSmerge_genhistory'
select * from gh483DA94F38D3489C87D21E113D380C96 where 1 = 2
[3/7/2006 6:42:46 PM]IAS_SQL_02.CF_Client_Data: select * from
gh483DA94F38D3489C87D21E113D380C96 where 1 = 2
Bulk copied snapshot data for system table 'MSmerge_genhistory'.
*** [System table:'MSmerge_genhistory'] Bulk copy time: 312 (ms) ***
Bulk copying snapshot data for system table 'sysmergesubsetfilters'
select * from filt483DA94F38D3489C87D21E113D380C96 where 1 = 2
[3/7/2006 6:42:46 PM]IAS_SQL_02.CF_Client_Data: select * from
filt483DA94F38D3489C87D21E113D380C96 where 1 = 2
Bulk copied snapshot data for system table 'sysmergesubsetfilters'.
*** [System table:'sysmergesubsetfilters'] Bulk copy time: 219 (ms) ***
Bulk copying snapshot data for article '[CGLOBAL]'
select * from [dbo].[CGLOBAL] where 1 = 2
[3/7/2006 6:42:46 PM]IAS_SQL_02.CF_Client_Data: select * from
[dbo].[CGLOBAL] where 1 = 2
Bulk copied snapshot data for article '[CGLOBAL]' (37895 rows).
*** [Article:'CGLOBAL'] Bulk copy time: 906 (ms) ***
Bulk copying snapshot data for article '[CDATA]'
select * from [dbo].[CDATA] where 1 = 2
[3/7/2006 6:42:47 PM]IAS_SQL_02.CF_Client_Data: select * from [dbo].[CDATA]
where 1 = 2
Bulk copied snapshot data for article '[CDATA]' (37438 rows).
*** [Article:'CDATA'] Bulk copy time: 1000 (ms) ***
*** [Publication:'CF_Client_Data'] Total snapshot generation time excluding
publication setup: 10656 (ms) ***
A snapshot of 2 article(s) was generated.
Disconnecting from Publisher 'IAS_SQL_02'
----------- End Log -----------
Even while the merge agent is running, I can change the name of the snapshot
folder and then change it back, which indicates to me that the file isn't
locked.
Any other ideas?
Thanks,
J.T.
[quoted text, click to view] "Raymond Mak [MSFT]" wrote:
> For merge replication, the snapshot agent rather than the distribution
> cleanup agent is responsible for cleaning up the last generated snapshot.
> The snapshot agent will only try once to remove the previous snapshot files
> so if those files were locked at that moment (by the merge agent e.g.), it
> is possible that snapshot files will be left over. As such, you may want to
> check the snapshot agent history and see if the snapshot agent reported any
> problems removing the old snapshot files in the past. Also note that there
> is currently no automatic cleanup mechanism for dynamic (or parameterized)
> snapshot in SQL2000. In SQL2005, we do have better reporting of any snapshot
> folder removal problems and better resiliency in the snapshot folder cleanup
> mechanism.
>
> HTH
>
> -Raymond
>