<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>SQL Server SSIS and Replication</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/mangeshd/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/mangeshd/feed.xml</link>
    <description>SSIS, Replication and everything SQL Server</description>
    <lastBuildDate>Wed, 17 Apr 2019 04:06:51 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Usage of xp_servicecontrol is unsupported</title>
      <link>https://docs.microsoft.com/archive/blogs/mangeshd/usage-of-xp_servicecontrol-is-unsupported</link>
      <pubDate>Thu, 14 Jan 2010 12:03:00 GMT</pubDate>
      <dc:creator><![CDATA[mangeshd]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mangeshd/2010/01/14/usage-of-xp_servicecontrol-is-unsupported/</guid>
      <description><![CDATA[I&nbsp;have seen some posts (and some forums) discussing about using xp_servicecontrol. There was...]]></description>
      <content:encoded><![CDATA[<P>I&nbsp;have seen some posts (and some forums) discussing about using xp_servicecontrol. There was also a ticket opened where xp_servicecontrol reports a wrong status of some of the SQL Server services. I wanted to make sure that everyone knows that xp_servicecontrol is an undocumented XP.&nbsp; This XP has been a part of SQL Server since 7.0 till 2008.</P>
<P>This also means that we do not support external customers using xp_servicecontrol for any work. The code of this XP can be changed anytime and customer should not be using this XP for anything.</P>
<P>The correct alternative in this case would be to either use <EM>xp_cmdshell 'SC query &lt;servicename&gt;'</EM> or use the WMI namespace. Using WMI provider will be the best way looking into future.</P>]]></content:encoded>
    </item>
    <item>
      <title>SQL Server 2008 transactional replication to DB2 subscriber can fail with: DB2OLEDBV2: Error "System.DllNotFoundException: Unable to load DLL 'mseidrda.dll': The specified module could not be found</title>
      <link>https://docs.microsoft.com/archive/blogs/mangeshd/sql-server-2008-transactional-replication-to-db2-subscriber-can-fail-with-db2oledbv2-error-system-dllnotfoundexception-unable-to-load-dll-mseidrda-dll-the-specified-module-could-not-be-fou</link>
      <pubDate>Thu, 14 Jan 2010 11:39:00 GMT</pubDate>
      <dc:creator><![CDATA[mangeshd]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mangeshd/2010/01/14/sql-server-2008-transactional-replication-to-db2-subscriber-can-fail-with-db2oledbv2-error-system-dllnotfoundexception-unable-to-load-dll-mseidrda-dll-the-specified-module-could-not-be-fou/</guid>
      <description><![CDATA[Recently came across a situation where the DB2 subscriber was failing with the below...]]></description>
      <content:encoded><![CDATA[<P>Recently came across a situation where the DB2 subscriber was failing with the below <BR>&lt;error&gt;DB2OLEDBV2: Error "System.DllNotFoundException: Unable to load DLL 'mseidrda.dll': The specified module could not be found&lt;/error&gt;<BR><BR>DB2 provider was installed from the SQL Server 2008's feature pack-<A href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=b33d2c78-1059-4ce2-b80d-2343c099bcb4" target=_blank mce_href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=b33d2c78-1059-4ce2-b80d-2343c099bcb4">http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=b33d2c78-1059-4ce2-b80d-2343c099bcb4</A> </P>
<P>To resolve this, we removed the Microsoft.HostIntegration.DataAccessLibrary.dll file located in the C:\Windows\assembly directory<BR>After this, we were able to resolve the connectivity issue.</P>
<P>But we ran into another issue with applying the initial snapshot in this transactional replication. When the snapshot was applied on the subscriber, the table names, column names and schema name used to have double quotes around them.</P>
<P>The root cause of this was DB2 does not understand the square brackets [] that table names and column names in the schema script produced by snapshot agent have (in the .sql file) and it interprets them to be quoted<BR>After we added the -QuotedIdentifier to the distribution agent's command line, the issue with table name and column names went away.<BR>But we were still left with the issue of double quotes in the schema name. To resolve this issue, we found that when the schema name (this is the db schema name) was specified in the connection string (while setting up subscriber) was replaced with <EM>default</EM>, the issue went away</P>]]></content:encoded>
    </item>
    <item>
      <title>How to get Conexant AC link Audio working for old Compaq V2000 laptop with Win7</title>
      <link>https://docs.microsoft.com/archive/blogs/mangeshd/how-to-get-conexant-ac-link-audio-working-for-old-compaq-v2000-laptop-with-win7</link>
      <pubDate>Sat, 07 Nov 2009 18:26:00 GMT</pubDate>
      <dc:creator><![CDATA[mangeshd]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mangeshd/2009/11/07/how-to-get-conexant-ac-link-audio-working-for-old-compaq-v2000-laptop-with-win7/</guid>
      <description><![CDATA[I have a old Compaq V2000 laptop (almost 4.5 years old) (Intel Centrino Mobile and 512 MB ram) and...]]></description>
      <content:encoded><![CDATA[<P>I have a old Compaq V2000 laptop (almost 4.5 years old) (Intel Centrino Mobile and 512 MB ram) and installed Windows 7 on that. I was scared that it will&nbsp;not install since the system does not meet prerequisite criteria (1 GB ram), but Win 7 got installed perfectly! But showed that 5 drivers were not installed:</P>
<P>&gt; Wireless Network Adapter<BR>&gt; Display Adapter<BR>&gt; Modem<BR>&gt; Mass Storage Controller<BR>&gt; Multimedia Audio Controller</P>
<P>Out of these Wireless Network Adapter&nbsp;and&nbsp;Display Adapter were installed by windows update automatically (yeah, I had to reboot the box couple of times and run windows update multiple times). I think Windows Update has the drivers&nbsp;provided by&nbsp;Intel (which is what the Chipset is) here. For Modem, went into troubleshooter and it suggested to download and install the drivers from Motorola site (it actually gave me the link) and once I click the link to download it, that was installed fine as well (it shows as "Motorola SM65 Speakerphone Modem" in Device Manager)</P>
<P>Bigger problem was finding the right drivers for MultiMedia Audio Controller. I tried installing the drivers that came with the laptop (which was for XP) and I downloaded the latest from Realtek site, but all in vain. I tried uninstalling the one windows by default set there "multimedia audio controller" and then ran window update again and again with no help (the driver installation would always fail). Searched all over the internet and tried every possible forum entries,etc.</P>
<P>To resolve the problem with this, I did the following:</P>
<UL>
<LI>Visited <A href="http://catalog.update.microsoft.com/v7/site/Home.aspx">http://catalog.update.microsoft.com/v7/site/Home.aspx</A>&nbsp;and searched for Contexant AC link audio</LI>
<LI>There were 100+ matches, out of the ones that I downloaded, the succeeded one was "Conexant - Sound - Conexant AC-Link Audio"</LI>
<LI>Downloaded it and unzipped the cab (you can use winRAR or 7Zip)</LI>
<LI>set compatibility mode of HXFSetup.exe from the extracted files to XP SP2 and ran the EXE as administrator</LI>
<LI>This made the audio controller fire up</LI></UL>
<P>I am left with Mass Storage Controller, but I am not worried about that since I am able to connect and work with my USB pen drives and external hard disks. Wrote the blog post for those who have old v2000 laptops and might have been struggling with similar issues. Please note, what worked for me may not work for you, so keep posting.<BR></P>]]></content:encoded>
    </item>
    <item>
      <title>sp_mergemetadataretentioncleanup not cleaning merge metadata during regular sync causing stale data in metadata tables</title>
      <link>https://docs.microsoft.com/archive/blogs/mangeshd/sp_mergemetadataretentioncleanup-not-cleaning-merge-metadata-during-regular-sync-causing-stale-data-in-metadata-tables</link>
      <pubDate>Fri, 02 Oct 2009 15:13:00 GMT</pubDate>
      <dc:creator><![CDATA[mangeshd]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mangeshd/2009/10/02/sp_mergemetadataretentioncleanup-not-cleaning-merge-metadata-during-regular-sync-causing-stale-data-in-metadata-tables/</guid>
      <description><![CDATA[I recently came across an interesting&nbsp;situation in merge replication and thought I should write...]]></description>
      <content:encoded><![CDATA[<P>I recently came across an interesting&nbsp;situation in merge replication and thought I should write about it:</P>
<P><U>Description:</U>&nbsp;<BR>&gt;&nbsp;There is a high volume replication setup with thousands of subscriber and a very volatile(lot of transactions per second) publisher database<BR>&gt; Started observing huge blocking when multiple merge agents starts synchronizing<BR>&gt; Even if&nbsp;merge agents are stopped, the time taken for a single merge agent is huge<BR>&gt; There are millions of rows in merge metadata tables (msmerge_genhistory, msmerge_contents and msmerge_tombstone) and they are not getting cleaned up<BR>&gt; Running update stats every hour&nbsp;does not help</P>
<P><U>Cause:</U><BR>&nbsp;&gt; The huge backlog in the merge metadata tables was causing the merge queries to take long times. These long times were resulting in blocking when multiple merge agents were sync'ing.<BR>&nbsp;&gt; This is because the msmerge_genhistory metadata table is referred everywhere during merge sync. Any query that joins this table (and there are a lot of them) had to get blocked since some other queries had taken locks on the same tables rows.<BR>&nbsp;&gt; The root cause of this problem was the millions of rows those metadata tables&nbsp;were not just getting cleaned up.</P>
<P><U>What I found out:</U><BR>&nbsp;&gt; Once I found that the root cause of the issue is the backlog in the metadata tables, ran sp_mergemetadataretentioncleanup manually to force a cleanup and it returned immediately with 0 rows cleaned.<BR>&nbsp;&gt; Ran it repeatedly and that did not help.<BR>&nbsp;&gt; So, its obvious that the&nbsp;merge agents (Note: merge agents run retention based metadata cleanup as the&nbsp;first step during regular sync) were also not cleaning anything from those tables.<BR>&nbsp;&gt; Further looking into the code of this proc (by running sp_helptext sp_mergemetadataretentioncleanup) found that&nbsp;it&nbsp;checks if any other agent is running sp_mergemetadataretentioncleanup (of it this SP is being manually on the server). If yes, it just skips execusting any code and returns.</P>
<P>&lt;snip&gt;<BR>-- if somebody else is already cleaning up in this database, we simply return<BR>&nbsp;&nbsp;&nbsp; set @applockname= 'MS_sp_mergemetadataretentioncleanup' + convert(nvarchar(11), db_id())<BR>&nbsp;&nbsp;&nbsp; exec @retcode= sp_getapplock @Resource= @applockname, @LockMode= 'Exclusive', @LockOwner= 'Session', @LockTimeout= 0, @DbPrincipal = @DbPrincipal <BR>&nbsp;&nbsp;&nbsp; if @@error &lt;&gt; 0 or @retcode &lt; 0 return (0)<BR>&lt;/snip&gt;</P>
<P>&nbsp;&gt; From DBCC OPENTRAN, found that there was one merge agent which was running sp_mergemetadataretentioncleanup and taking long time but the user might have hit cancel and it was hung while rolling back.<BR>&nbsp;&gt; This was causing other executions of sp_mergemetadataretentioncleanup to not work and also causing the metadata to keep getting stale causing further performance (and blocking issues)<BR>&nbsp;&gt; Killed that spid, and stopped all the merge syncs and ran sp_mergemetadataretentioncleanup manually.<BR>&nbsp;&gt; This took long time as&nbsp;it always cleans the rows from metadata tables in a batch of 5000 rows. Also it checks expired subscriptions (using sp_MSmark_expired_subscriptions) and this can take&nbsp;some time when you have thousands of subscribers.<BR>&nbsp;&gt; The complete execution took long time but it cleaned millions of rows from metadata tables. There were only a few hundred rows left in the metadata tables after this.<BR>&nbsp;&gt; After this, the merge queries ran instantly and there was a almost no blocking.</P>
<P>If you come across a situation where you find sp_mergemetadataretentioncleanup is not cleaning up rows from metadata tables, it will be worth to: stop all merge agents, confirm that no spids that might be executing any merge metadata commands are lying around.<BR>After this, run sp_mergemetadataretentioncleanup manually and wait till it finishes completely. Once it finishes completely, check the table count. After this, start the merge agents again.</P>]]></content:encoded>
    </item>
    <item>
      <title>sp_who2 (or sysprocesses or sys.dm_exec_requests) might show your thread being blocked by SPID -4</title>
      <link>https://docs.microsoft.com/archive/blogs/mangeshd/sp_who2-or-sysprocesses-or-sys-dm_exec_requests-might-show-your-thread-being-blocked-by-spid-4</link>
      <pubDate>Fri, 02 Oct 2009 12:27:00 GMT</pubDate>
      <dc:creator><![CDATA[mangeshd]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mangeshd/2009/10/02/sp_who2-or-sysprocesses-or-sys-dm_exec_requests-might-show-your-thread-being-blocked-by-spid-4/</guid>
      <description><![CDATA[You might find that when sp_who2 (or sys.sysprocesses or sys.dm_exec_requests)&nbsp;is executed on a...]]></description>
      <content:encoded><![CDATA[<P>You might find that when sp_who2 (or sys.sysprocesses or sys.dm_exec_requests)&nbsp;is executed on a SQL Server, the output has several threads facing blocking<BR>If you track the blocking chain, you will reach to a thread that is being blocked by a SPID with number -4.<BR>About this -4 SPID, BOL says (<A href="http://msdn.microsoft.com/en-us/library/ms177648.aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms177648.aspx">http://msdn.microsoft.com/en-us/library/ms177648.aspx</A>):</P>
<P><EM>-4 = Session ID of the blocking latch owner could not be determined due to internal latch state transitions.</EM></P>
<P><U>What&nbsp;to do:</U>&nbsp;<BR><BR>* If you see this scenario, focus on the waitresource this spid -4 was working. In our case is was 2:1:103 <BR>* This was a page from tempdb (2:1:103&nbsp; = 2 - database ID i.e. tempdb)<BR>* If you see the -4 SPIDs being waiting for the same waitresource, you can be sure there is a page hotspot condition going on.<BR>* In my case, found that a new code that uses table variables was implemented. Every client&nbsp;was firing this query almost every second.<BR>* Since it was using a default setup, the table variable was getting allocated on the same page causing that db page (in our case 2:1:103) to become a hotspot causing tempdb contention</P>
<P>To resolve this issue, carefully follow east step from <A href="http://support.microsoft.com/kb/328551" mce_href="http://support.microsoft.com/kb/328551">http://support.microsoft.com/kb/328551</A> and check for </P>
<BLOCKQUOTE>
<P>Repeated create and drop of temporary tables (local or global). <BR>Table variables that use tempdb for storage purposes. <BR>Work tables associated with CURSORS. <BR>Work tables associated with an ORDER BY clause. <BR>Work tables associated with an GROUP BY clause. <BR>Work files associated with HASH PLANS.</P></BLOCKQUOTE>
<P>* You can implement TF 118 (as per the above KB article) to have the issue subsided (In my case, the blocking impact went down considerably).<BR>* Final resolution is change the code to use temp tables instead of table variables</P>]]></content:encoded>
    </item>
    <item>
      <title>SQLBrowser fails with "The SQLBrowser service was unable to process a client request"</title>
      <link>https://docs.microsoft.com/archive/blogs/mangeshd/sqlbrowser-fails-with-the-sqlbrowser-service-was-unable-to-process-a-client-request</link>
      <pubDate>Mon, 10 Aug 2009 15:23:00 GMT</pubDate>
      <dc:creator><![CDATA[mangeshd]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mangeshd/2009/08/10/sqlbrowser-fails-with-the-sqlbrowser-service-was-unable-to-process-a-client-request/</guid>
      <description><![CDATA[Recently worked on an issue where sqlbrowser was getting bunch of errors:&lt;error&gt;&nbsp;&nbsp;...]]></description>
      <content:encoded><![CDATA[<P>Recently worked on an issue where sqlbrowser was getting bunch of errors:<BR>&lt;error&gt;<BR>&nbsp;&nbsp; 07/31/2009 12:20:58 PM SQLBrowser Error None 14 N/A NTMTVSQL24 The SQLBrowser processing of requests against a particular IP address has encountered a critical error.&nbsp; Processing of requests on this address has been halted.<BR>&nbsp;&nbsp; 07/31/2009 12:20:58 PM SQLBrowser Error None 8 N/A NTMTVSQL24 The SQLBrowser service was unable to process a client request.<BR>&lt;/error&gt;<BR>in their Application event log from SQL Browser.</P>
<P>Once these messages were thrown, No applications could connect to SQL Server after this error.<BR>When the issue happened, the only way to resolve it is by restarting the browser service.<BR><BR><STRONG>Cause:<BR>-----------<BR></STRONG>Unknown</P>
<P><STRONG>Resolution:&nbsp;<BR>------------------</STRONG></P>
<UL>
<LI>We tried to collect dumps using SQLDumper and ADPLUS crash but could not do that. The reason for that was that the SSRP thread inside browser was not aborting with any exception. Had there been an exception, we should have got a dump.</LI>
<LI>Direct action plan was to apply Service Pack 2 on OS since they were on Windows Server 2003 Service Pack 1.</LI>
<LI>But we found that after the storage team rolled back the upgrade of the TSM client to the previous version (5.4.2.0), SQL Browser did not report any errors in the event log. <BR>It is suspected that upgrade of the TSM client to version 5.5.2.1 that caused the problem however we could not test it in development environment&nbsp;for confirmation.<BR><EM>&nbsp;&nbsp;&nbsp; This is unverified from a proper reproduction test. Please test it in your development environment.</EM></LI></UL>
<P><STRONG>What you can do if you face similar issue:</STRONG><BR>&nbsp;&gt; Start SQLBrowser from command prompt with verbose mode "SQLBrowser.exe -c" and check if you get any more detailed messages when the issue occurs<BR>&nbsp;&gt; Collect BIDTrace since browser everywhere has provisions to throwing more messages in the BIDTrace (follow <A href="http://msdn2.microsoft.com/en-us/library/aa964124.aspx">http://msdn2.microsoft.com/en-us/library/aa964124.aspx</A>)<BR>&nbsp;&gt; Confirm that you are on latest OS and SQL Service Packs<BR>&nbsp;&gt; Check if they have any Side by Side installation of SQL Server 2000 with SQL 2005/2008. If&nbsp;yes, follow <A href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;922131">http://support.microsoft.com/default.aspx?scid=kb;EN-US;922131</A><BR>&nbsp;&gt; Confirm from "netstat -aon" that SQLBrowser was the one holding 0.0.0.0:1434 UDP port when the error messages are thrown.<BR>&nbsp;&gt; Check if you can make SQL Server work on 1433 as a temporary workaround (since server running on 1433 will not require UDP broadcast)<BR>&nbsp;&gt; Test uninstalling (not just disabling) third party softwares from the box for. ex. the one mentioned above.</P>]]></content:encoded>
    </item>
    <item>
      <title>Replication Snapshot Folder Cleanup</title>
      <link>https://docs.microsoft.com/archive/blogs/mangeshd/replication-snapshot-folder-cleanup</link>
      <pubDate>Wed, 20 May 2009 15:52:00 GMT</pubDate>
      <dc:creator><![CDATA[mangeshd]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mangeshd/2009/05/20/replication-snapshot-folder-cleanup/</guid>
      <description><![CDATA[Snapshot agent creates snapshots for the subscribers to initialize. These contain various different...]]></description>
      <content:encoded><![CDATA[<P mce_keep="true">Snapshot agent creates snapshots for the subscribers to initialize. These contain various different types of files (like: .bcp - actual native/character mode data file, .dri - foreign keys and check constraints, .idx - index creation statements, .sch - table/schema creation script, etc)<BR>These files are always kept in \unc\ folder (and/or under \ftp\ folder if you have chosen so in publication properties) with a timestamp value for the folder name (under the publication name folder).<BR>Everytime snapshot agent runs, the new timestamp value is used for the folder name and snapshot files are pushed in the same.<BR>For merge replication, you can create a new snapshot anytime by running the snapshot agent.<BR>For transactional replication, a new snapshot will be created only when a subscriber wants it (i.e. either when you add a new subscription&nbsp;&nbsp; OR&nbsp; you reinitialize an existing subscription).</P>
<P>How are these old (non-latest) snapshot folders (static and dynamic snapshots) purged:<BR>&nbsp; For snapshot and transactional replication: Distribution cleanup agent purges the non-latest folders<BR>&nbsp; For Merge replication: the snapshot agent itself will purge older folders.&nbsp; Please click <A href="http://www.dbtalk.net/microsoft-public-sqlserver-replication/snapshot-cleanup-sql-server-2000-a-290003.html" target=_blank mce_href="http://www.dbtalk.net/microsoft-public-sqlserver-replication/snapshot-cleanup-sql-server-2000-a-290003.html">here</A> to see comments of Raymond Mak (one of the developers on replication development team) on this.</P>]]></content:encoded>
    </item>
    <item>
      <title>"Virtual" subscription entries in the Distribution..MSsubscriptions table</title>
      <link>https://docs.microsoft.com/archive/blogs/mangeshd/virtual-subscription-entries-in-the-distribution-mssubscriptions-table</link>
      <pubDate>Tue, 27 Jan 2009 07:56:00 GMT</pubDate>
      <dc:creator><![CDATA[mangeshd]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mangeshd/2009/01/27/virtual-subscription-entries-in-the-distribution-mssubscriptions-table/</guid>
      <description><![CDATA[If you are using Transactional Replication, you may find entries in your...]]></description>
      <content:encoded><![CDATA[<P>If you are using Transactional Replication, you may find entries in your Distribution..MSsubscriptions table which have subscriber_id= -1 and -2. Also, the subscriber db will be set to "virtual"<BR>You may find that for some of your Tran Publication, there are no "virtual" subscription entries while it is there for others.</P>
<P><STRONG>Reason:</STRONG><BR>Whenever any one of "allow_anonymous" or "immediate_sync" properties of a publication are set to TRUE, these entries are added.<BR>These entries are as such harmless and are added to signify that this publication can have ananymous subscriptions.<BR>In one particular case, these entries were found to be linked with thousands of records into MSrepl_transaction and MSRepl_commands. Since these entries are not removed by distribution cleanup agent, they were causing some performance isssues.<BR>But this is not true in every case and you should check if this is the case in your environment.</P>
<P>If you want to turn off (delete) these entries, you should recreate your publication with "allow_anonymous" and "immediate_sync" properties set to FALSE. If you don't want to recreate publication, you can try sp_changepublication to set these to false. But in my testing, sp_changepublication did not help and and recreating publication helped remove the entries.<BR>If you create the publication using scripts, you should look for them on the sp_addpublication command line.</P>]]></content:encoded>
    </item>
    <item>
      <title>Behavior observed due to @immediate_sync parameter of Transaction Replication when adding new article to an existing publication</title>
      <link>https://docs.microsoft.com/archive/blogs/mangeshd/behavior-observed-due-to-immediate_sync-parameter-of-transaction-replication-when-adding-new-article-to-an-existing-publication</link>
      <pubDate>Fri, 07 Nov 2008 13:59:00 GMT</pubDate>
      <dc:creator><![CDATA[mangeshd]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mangeshd/2008/11/07/behavior-observed-due-to-immediate_sync-parameter-of-transaction-replication-when-adding-new-article-to-an-existing-publication/</guid>
      <description><![CDATA[* sp_addPublication procedure for creating a new transactional replication has a parameter...]]></description>
      <content:encoded><![CDATA[<P>* sp_addPublication procedure for creating a new transactional replication has a parameter @immediate_sync. BOL has description about it as:<BR>&lt;BOL&gt;<BR>@immediate_sync=] 'immediate_synchronization'<BR>Specifies if the synchronization files for the publication are created each time the Snapshot Agent runs. immediate_synchronization is nvarchar(5), with a default of FALSE. If true, the synchronization files are created or re-created each time the Snapshot Agent runs. Subscribers are able to get the synchronization files immediately if the Snapshot Agent has completed before the subscription is created. New subscriptions get the newest synchronization files generated by the most recent execution of the Snapshot Agent. independent_agent must be true for immediate_synchronization to be true. If false, the synchronization files are created only if there are new subscriptions. You must call sp_addsubscription for each subscription when you incrementally add a new article to an existing publication. Subscribers cannot receive the synchronization files after the subscription until the Snapshot Agents are started and completed.<BR>&lt;/BOL&gt;</P>
<P>* We observed that the value of this @immediate_sync parameter makes a difference to the snapshot produced when a new article is added to an existing publication.<BR>When the @immediate_sync parameter is set to 0 i.e. when the immediate_sync column of distribution..MSpublications table is set to "0" zero and you add a new table (article) to the existing publication, you will find that when you run the snapshot agent, snapshot of only that new article will be produced in the \REPLDATA folder. snapshot will be produced in concurrent mode. When you run distribution agent, it will apply the snapshot of only the newly article to the subscriber.</P>
<P>* When the @immediate_sync parameter is set to 1 i.e. when the immediate_sync column of distribution..MSpublications table is set to "1" one and you add a new table (article) to the existing publication, you will find that when you run the snapshot agent, concurrent snapshot of ALL the articles in the publication will be prepared. When you run distribution agent however, it will apply the snapshot of only the newly article to the subscriber.</P>
<P>* If @immediate_sync parameter is set to 0 and you add a new article to publication, distribution agent will not automatically produce the snapshot of the new article. You need to manually run the snapshot agent which will produce the snapshot of that article only. After this, when you run the distribution agent, it will now apply the snapshot of that article properly and proceed with synchronization.</P>
<P>* The behavior of producing the snapshot of only the newly added article may be very much desired in most cases because:<BR>&nbsp;&gt; It means that we will not be require huge space for snapshot files<BR>&nbsp;&gt; snapshot process will not lock (although the concurrent snapshot locks the tables for minimal time) the other existing tables<BR>&nbsp;&gt; less processing by the distribution since the snapshot size is small.</P>
<P>* Please note that I have observed and repro'ed it on my sql server 2005 box but I have not tested all possible scenarios and additional testing may be required. Test it out in your environment before you take a decision to set this value for your purpose.</P>]]></content:encoded>
    </item>
    <item>
      <title>Links for using Performance Counters (perfmon) while troubleshooting SQL Server related issues</title>
      <link>https://docs.microsoft.com/archive/blogs/mangeshd/links-for-using-performance-counters-perfmon-while-troubleshooting-sql-server-related-issues</link>
      <pubDate>Thu, 06 Nov 2008 10:40:00 GMT</pubDate>
      <dc:creator><![CDATA[mangeshd]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mangeshd/2008/11/06/links-for-using-performance-counters-perfmon-while-troubleshooting-sql-server-related-issues/</guid>
      <description><![CDATA[Understanding Performance Counters data while troubleshooting Performance issues in SQL Server:...]]></description>
      <content:encoded><![CDATA[<P>Understanding Performance Counters data while troubleshooting Performance issues in SQL Server: <A href="http://blogs.technet.com/vipulshah/archive/2006/11/30/understanding-perfmon-counters-while-troubleshooting-sql-server-performance-issues.aspx" mce_href="http://blogs.technet.com/vipulshah/archive/2006/11/30/understanding-perfmon-counters-while-troubleshooting-sql-server-performance-issues.aspx">http://blogs.technet.com/vipulshah/archive/2006/11/30/understanding-perfmon-counters-while-troubleshooting-sql-server-performance-issues.aspx</A></P>
<P>External Links:</P>
<P><A href="http://www.extremeexperts.com/SQL/Articles/SQLCounters.aspx" mce_href="http://www.extremeexperts.com/SQL/Articles/SQLCounters.aspx">http://www.extremeexperts.com/SQL/Articles/SQLCounters.aspx</A></P>
<P><A href="http://www.sqlservercentral.com/articles/Administering/performancemonitoringbasiccounters/1348/" mce_href="http://www.sqlservercentral.com/articles/Administering/performancemonitoringbasiccounters/1348/">http://www.sqlservercentral.com/articles/Administering/performancemonitoringbasiccounters/1348/</A><BR><BR>User Settable queries:</P>
<P><A href="http://searchsqlserver.techtarget.com/generic/0,295582,sid87_gci1110440_tax301334,00.html?adg=301324&amp;bucket=REF" mce_href="http://searchsqlserver.techtarget.com/generic/0,295582,sid87_gci1110440_tax301334,00.html?adg=301324&amp;bucket=REF">http://searchsqlserver.techtarget.com/generic/0,295582,sid87_gci1110440_tax301334,00.html?adg=301324&amp;bucket=REF</A>#</P>]]></content:encoded>
    </item>
  </channel>
</rss>