Quantcast
Channel: SQL Server Replication forum
Viewing all articles
Browse latest Browse all 4054

SQL server 2014 SNAPSHOT for transaction replication taking huge time

$
0
0

I am facing huge slowness during snapshot generation for a transaction replication set up. the replication set up code is running fine for lower version of sql server. here is my findings.

SP ID 218  program name - Snapshot Agent Smo Connection    find the exact query running under this process id was

(@_msparam_0 nvarchar(4000),@_msparam_1 nvarchar(4000))SELECT SCHEMA_NAME(tbl.schema_id) AS [Table_Schema], tbl.name AS [Table_Name], i.name AS [Index_Name], p.name AS [Name], CAST(p.value AS sql_variant) AS [Value] FROM sys.tables AS tbl INNER JOIN sys.indexes AS i ON (i.index_id > @_msparam_0 and i.is_hypothetical = @_msparam_1) AND (i.object_id=tbl.object_id) LEFT OUTER JOIN sys.key_constraints AS k ON k.parent_object_id = i.object_id AND k.unique_index_id = i.index_id INNER JOIN sys.extended_properties AS p ON p.major_id=CASE (i.is_primary_key + 2*i.is_unique_constraint) WHEN 0 THEN i.object_id ELSE k.object_id END AND p.minor_id=CASE (i.is_primary_key + 2*i.is_unique_constraint) WHEN 0 THEN CAST(i.index_id AS int) ELSE 0 END AND p.class=CASE (i.is_primary_key+ 2*i.is_unique_constraint) WHEN 0 THEN 7 ELSE 1 END ORDER BY [Table_Schema] ASC,[Table_Name] ASC,[Index_Name] ASC,[Name] ASC

this part is taking huge time. in the sql server snapshot agent lock I find the below log.

2015-09-22 09:22:03.62 [77%] Bulk copying snapshot data for article 'TransPostErrLog (part 16 of 16)'
2015-09-22 09:22:03.62 [77%] Bulk copied snapshot data for article 'TransPostErrLog (part 12 of 16)' (548 rows).
2015-09-22 09:22:03.63 [77%] Bulk copying snapshot data for article 'UnallocPayBalConv'
2015-09-22 09:22:03.63 [77%] Bulk copied snapshot data for article 'TransPostErrLog (part 14 of 16)' (600 rows).
2015-09-22 09:22:03.64 [77%] Bulk copied snapshot data for article 'TransPostErrLog (part 13 of 16)' (624 rows).
2015-09-22 09:22:03.65 [77%] Bulk copied snapshot data for article 'UnallocPayBalConv' (0 rows).
2015-09-22 09:22:03.66 [77%] Bulk copied snapshot data for article 'TransPostErrLog (part 16 of 16)' (1954 rows).
2015-09-22 09:22:03.67 [87%] Bulk copied snapshot data for article 'TransPostErrLog (part 15 of 16)' (562 rows).
2015-09-22 09:26:02.82 [87%] The replication agent was shut down in response to an abort request.

I have also change the connection timeout to some higher value but no help.


Viewing all articles
Browse latest Browse all 4054

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>