Showing posts with label replication. Show all posts
Showing posts with label replication. Show all posts

Tuesday, March 27, 2012

Does SQL Server 2005 Express support Web/Internet Replication to other SQL Server Express Client

HI

Q1: Does Sql Server 2005 Express support Web/Internet to other SQL Server 2005 Express Clients or does it have to Synch across the internet to a fully installed setup SQL Server 2005 with IIS?

Q2: Does SQL Server 2005 Express support Direct Replication between other SQL Server 2005 Express clients?

Regards

Shabby wrote:

HI

Q1: Does Sql Server 2005 Express support Web/Internet to other SQL Server 2005 Express Clients or does it have to Synch across the internet to a fully installed setup SQL Server 2005 with IIS?

You have to sync to a SS2005 with IIS. Replication doesn't support sync between sql express.

Shabby wrote:

Q2: Does SQL Server 2005 Express support Direct Replication between other SQL Server 2005 Express clients?

Regards

No Sql 2005 express cannot sync with sql 2005 express directly.

|||

SQL Server 2005 Express Edition supports being a replication subscriber only. See http://msdn2.microsoft.com/en-us/library/ms165700.aspx The publisher and distributor must be higher SKUs of SQL Server 2005. i.e. Enterprise, Standard, Workgroup. As for synching via IIS over the internet with merge replication, this is supported by the SQL Server 2005 Express client.

Hope this helps,

Tom

This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Express edition can only be used as a subscriber, including direct SQL replication or web sync. Please take a look at this link for replication features supported by various editions (http://msdn2.microsoft.com/en-us/library/ms143761.aspx).

Thanks,

Peng

|||

Peng Song wrote:

Express edition can only be used as a subscriber, including direct SQL replication or web sync. Please take a look at this link for replication features supported by various editions (http://msdn2.microsoft.com/en-us/library/ms143761.aspx).

Thanks,

Peng

does the client (subscriber) running on sql server express has to have IIS or only the publishing pc? thanks

sql

Does SQL Server 2005 Express support Web/Internet Replication to other SQL Server Express Cl

HI

Q1: Does Sql Server 2005 Express support Web/Internet to other SQL Server 2005 Express Clients or does it have to Synch across the internet to a fully installed setup SQL Server 2005 with IIS?

Q2: Does SQL Server 2005 Express support Direct Replication between other SQL Server 2005 Express clients?

Regards

Shabby wrote:

HI

Q1: Does Sql Server 2005 Express support Web/Internet to other SQL Server 2005 Express Clients or does it have to Synch across the internet to a fully installed setup SQL Server 2005 with IIS?

You have to sync to a SS2005 with IIS. Replication doesn't support sync between sql express.

Shabby wrote:

Q2: Does SQL Server 2005 Express support Direct Replication between other SQL Server 2005 Express clients?

Regards

No Sql 2005 express cannot sync with sql 2005 express directly.

|||

SQL Server 2005 Express Edition supports being a replication subscriber only. See http://msdn2.microsoft.com/en-us/library/ms165700.aspx The publisher and distributor must be higher SKUs of SQL Server 2005. i.e. Enterprise, Standard, Workgroup. As for synching via IIS over the internet with merge replication, this is supported by the SQL Server 2005 Express client.

Hope this helps,

Tom

This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Express edition can only be used as a subscriber, including direct SQL replication or web sync. Please take a look at this link for replication features supported by various editions (http://msdn2.microsoft.com/en-us/library/ms143761.aspx).

Thanks,

Peng

|||

Peng Song wrote:

Express edition can only be used as a subscriber, including direct SQL replication or web sync. Please take a look at this link for replication features supported by various editions (http://msdn2.microsoft.com/en-us/library/ms143761.aspx).

Thanks,

Peng

does the client (subscriber) running on sql server express has to have IIS or only the publishing pc? thanks

Does SQL replication

Hi all,
I am looking to develop a handheld device that requires online and offline
data synchronisation with a central SQL server 2000. I have been reading up
on SQL merge replication to implement this functionality. Has anybody
implemented this type of functionality before and if so how did the merge
replication work for you and how did you find it. I have heard reports the
SQL replication does not work efficiently, so before i implement replication
i would like to get some feedback from people who may have used merge
replication before. Any help would be great.
one of the more large implementations of SQL Ce and merge replication has
1500 clients IIRC, and it works extremely reliably. This is on SQL CE and
SQL 2000. The company is Nabisco and nestle IIRC, there are case studies on
Microsoft's web site about this.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"sanjo" <sanjo@.discussions.microsoft.com> wrote in message
news:4FE5598C-FDC1-42ED-BEF7-77E664B7398A@.microsoft.com...
> Hi all,
> I am looking to develop a handheld device that requires online and offline
> data synchronisation with a central SQL server 2000. I have been reading
> up
> on SQL merge replication to implement this functionality. Has anybody
> implemented this type of functionality before and if so how did the merge
> replication work for you and how did you find it. I have heard reports the
> SQL replication does not work efficiently, so before i implement
> replication
> i would like to get some feedback from people who may have used merge
> replication before. Any help would be great.
>

Sunday, March 25, 2012

Does someone know when MS plans to resolve this Bug?

Hi,

I have a problem with merge replication again. This is the replication between sql server 2005 standard edition and express edition. non-filtering. after the merge agent ran normally for a couple of days, the merge replication always stops at the uploading point. It seems like the merge agent can't run the 'MSmakegeneration' sp. Here is the output log. I wish someone could give me hand. Thank you very much!

2007-05-27 21:37:19.656 Microsoft SQL Server Merge Agent 9.00.3042.00
2007-05-27 21:37:19.656 Copyright (c) 2005 Microsoft Corporation
2007-05-27 21:37:19.656
2007-05-27 21:37:19.656 The timestamps prepended to the output lines are expressed in terms of UTC time.
2007-05-27 21:37:19.656 User-specified agent parameter values:
-Publication Brown
-Publisher FMSL_SERVER
-Subscriber Brown-WF
-Distributor FMSL_SERVER
-PublisherDB Brown
-SubscriberDB Brown
-PublisherLogin sa
-PublisherPassword **********
-PublisherSecurityMode 0
-OutputVerboseLevel 0
-SubscriberSecurityMode 1
-SubscriptionType 1
-DistributorLogin sa
-DistributorPassword **********
-DistributorSecurityMode 0
-Output C:\OUTPUTFILE.txt
-Outputverboselevel 2
2007-05-27 21:37:19.703 Percent Complete: 0
2007-05-27 21:37:19.703 Connecting to Subscriber 'Brown-WF'
2007-05-27 21:37:19.703 Connecting to OLE DB Subscriber at datasource: 'Brown-WF', location: '', catalog: 'Brown', providerstring: '' using provider 'SQLNCLI'
2007-05-27 21:37:19.812 OLE DB Subscriber: Brown-WF
DBMS: Microsoft SQL Server
Version: 09.00.3042
catalog name: Brown
user name: dbo
API conformance: 0
SQL conformance: 0
transaction capable: 1
read only: F
identifier quote char: "
non_nullable_columns: 0
owner usage: 15
max table name len: 128
max column name len: 128
need long data len:
max columns in table: 1000
max columns in index: 16
max char literal len: 131072
max statement len: 131072
max row size: 131072
2007-05-27 21:37:19.812 OLE DB Subscriber 'Brown-WF': {call sp_MSgetversion }
2007-05-27 21:37:19.828 OLE DB Subscriber 'Brown-WF': set nocount on declare @.dbname sysname select @.dbname = db_name() declare @.collation nvarchar(255) select @.collation = convert(nvarchar(255), databasepropertyex(@.dbname, N'COLLATION')) select collationproperty(@.collation, N'CODEPAGE') as 'CodePage', collationproperty(@.collation, N'LCID') as 'LCID', collationproperty(@.collation, N'COMPARISONSTYLE') as 'ComparisonStyle',cast(case when convert (int,databasepropertyex (@.dbname,'comparisonstyle')) & 0x1 = 0x1 then 0 else 1 end as bit) as DB_CaseSensitive,cast(case when convert (int,serverproperty ('comparisonstyle')) & 0x1 = 0x1 then 0 else 1 end as bit) as Server_CaseSensitive set nocount off
2007-05-27 21:37:19.828 OLE DB Subscriber 'Brown-WF': {?=call sp_helpsubscription_properties (N'FMSL_SERVER', N'Brown', N'Brown')}
2007-05-27 21:37:19.843 Distributor security mode: 0, login name: sa, password: ********.
2007-05-27 21:37:19.843 Percent Complete: 0
2007-05-27 21:37:19.843 Connecting to Distributor 'FMSL_SERVER'
2007-05-27 21:37:19.843 Connecting to OLE DB Distributor at datasource: 'FMSL_SERVER', location: '', catalog: '', providerstring: '' using provider 'SQLNCLI'
2007-05-27 21:37:20.390 OLE DB Distributor: FMSL_SERVER
DBMS: Microsoft SQL Server
Version: 09.00.3042
catalog name:
user name: dbo
API conformance: 0
SQL conformance: 0
transaction capable: 1
read only: F
identifier quote char: "
non_nullable_columns: 0
owner usage: 15
max table name len: 128
max column name len: 128
need long data len:
max columns in table: 1000
max columns in index: 16
max char literal len: 131072
max statement len: 131072
max row size: 131072
2007-05-27 21:37:20.718 OLE DB Distributor 'FMSL_SERVER': {call sp_MSgetversion }
2007-05-27 21:37:20.796 OLE DB Distributor 'FMSL_SERVER': {call sp_helpdistpublisher (N'FMSL_SERVER') }
2007-05-27 21:37:20.984 OLE DB Distributor 'FMSL_SERVER': select datasource, srvid from master..sysservers where upper(srvname) = upper(N'FMSL_SERVER')
2007-05-27 21:37:21.078 OLE DB Distributor 'FMSL_SERVER': {call sp_MShelp_merge_agentid (0,N'Brown',N'Brown',null,N'Brown',90,N'Brown-WF')}
2007-05-27 21:37:21.171 OLE DB Subscriber 'Brown-WF': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
2007-05-27 21:37:21.187 OLE DB Distributor 'FMSL_SERVER': {call sp_MShelp_profile (91, 4, N'')}
2007-05-27 21:37:21.312 Percent Complete: 0
2007-05-27 21:37:21.312 OLE DB Subscriber 'Brown-WF': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
2007-05-27 21:37:21.312 Initializing
2007-05-27 21:37:21.312 OLE DB Distributor 'FMSL_SERVER': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
2007-05-27 21:37:21.312 Connecting to OLE DB Publisher at datasource: 'FMSL_SERVER', location: '', catalog: 'Brown', providerstring: '' using provider 'SQLNCLI'
2007-05-27 21:37:21.421 Percent Complete: 0
2007-05-27 21:37:21.421 Connecting to Publisher 'FMSL_SERVER'
2007-05-27 21:37:21.421 OLE DB Distributor 'FMSL_SERVER': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
2007-05-27 21:37:21.765 OLE DB Publisher: FMSL_SERVER
DBMS: Microsoft SQL Server
Version: 09.00.3042
catalog name: Brown
user name: dbo
API conformance: 0
SQL conformance: 0
transaction capable: 1
read only: F
identifier quote char: "
non_nullable_columns: 0
owner usage: 15
max table name len: 128
max column name len: 128
need long data len:
max columns in table: 1000
max columns in index: 16
max char literal len: 131072
max statement len: 131072
max row size: 131072
2007-05-27 21:37:22.109 OLE DB Publisher 'FMSL_SERVER': set nocount on declare @.dbname sysname select @.dbname = db_name() declare @.collation nvarchar(255) select @.collation = convert(nvarchar(255), databasepropertyex(@.dbname, N'COLLATION')) select collationproperty(@.collation, N'CODEPAGE') as 'CodePage', collationproperty(@.collation, N'LCID') as 'LCID', collationproperty(@.collation, N'COMPARISONSTYLE') as 'ComparisonStyle',cast(case when convert (int,databasepropertyex (@.dbname,'comparisonstyle')) & 0x1 = 0x1 then 0 else 1 end as bit) as DB_CaseSensitive,cast(case when convert (int,serverproperty ('comparisonstyle')) & 0x1 = 0x1 then 0 else 1 end as bit) as Server_CaseSensitive set nocount off
2007-05-27 21:37:22.234 OLE DB Publisher 'FMSL_SERVER': {call sp_MSgetversion }
2007-05-27 21:37:22.406 Connecting to OLE DB Publisher at datasource: 'FMSL_SERVER', location: '', catalog: 'Brown', providerstring: '' using provider 'SQLNCLI'
2007-05-27 21:37:22.828 OLE DB Publisher: FMSL_SERVER
DBMS: Microsoft SQL Server
Version: 09.00.3042
catalog name: Brown
user name: dbo
API conformance: 0
SQL conformance: 0
transaction capable: 1
read only: F
identifier quote char: "
non_nullable_columns: 0
owner usage: 15
max table name len: 128
max column name len: 128
need long data len:
max columns in table: 1000
max columns in index: 16
max char literal len: 131072
max statement len: 131072
max row size: 131072
2007-05-27 21:37:23.515 OLE DB Subscriber 'Brown-WF': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
2007-05-27 21:37:23.515 Percent Complete: 0
2007-05-27 21:37:23.515 OLE DB Subscriber 'Brown-WF': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
2007-05-27 21:37:23.515 Retrieving publication information
2007-05-27 21:37:23.515 OLE DB Distributor 'FMSL_SERVER': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
2007-05-27 21:37:23.625 Percent Complete: 0
2007-05-27 21:37:23.625 Retrieving subscription information.
2007-05-27 21:37:23.625 OLE DB Distributor 'FMSL_SERVER': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
2007-05-27 21:37:28.203 OLE DB Subscriber 'Brown-WF': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
2007-05-27 21:37:28.203 Percent Complete: 0
2007-05-27 21:37:28.203 Uploading data changes to the Publisher
2007-05-27 21:37:28.203 OLE DB Distributor 'FMSL_SERVER': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
2007-05-27 21:42:28.312 Percent Complete: 0
2007-05-27 21:42:28.312 The process is waiting for a response from the query '{call sys.sp_MSmakegeneration (?)}'
2007-05-27 21:42:28.312 OLE DB Distributor 'FMSL_SERVER': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}

In addition, from the replication monitor, I can see the last error message is:

The merge process was unable to create a new generation at the 'Subscriber'. Troubleshoot by restarting the synchronization with verbose history logging and specify an output file to which to write. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147200994)

And this problem happened on a couple of subscribers on the same day. All the rest are OK so far.
|||now I'm pretty sure that sp_makegeneration doesn't work on the subscriber side properly. I tried to run it manually, it was just keeping running all the time, without any message coming out.

anyone got any idea about this?
|||if the makegeneration proc isn't returning, can you try profiling it to see what's blocking it? Could be a long-running query.|||hi greg,

Glad to hear from you. your reply is always so quickSmile

Actually I did a trace, which shows at that moment, only sp_msmakegeneration was running, nothing else. And the sp was just running, never finish. I have been waitting for about 15 minutes, and tried several times. always got the same situation.

And all the other subscribers, which run properly, just finished the replication within 5 minutes.
|||WII, what I was asking is to do a statement-level trace (add SPTongue TiedtmtStarting event) to see what query inside the proc (or some child proc) is long-running.|||Hi Greg,

I did the statement-level trace as you suggested. But the trace information is too large and unreadable to me.

What I can find is that such kind of queries were keeping running infinitely:

if @.error<>0
update dbo.MSmerge_contents with (rowlock)
set partchangegen = (-@.target_gen )
where partchangegen = (-@.gen) and tablenick = @.art_nick
if @.error<>0
update dbo.MSmerge_metadataaction_request with (rowlock)
set generation = @.target_gen
where generation = @.gen and tablenick = @.art_nick
if @.error<>0
select @.changes_in_target_gen = @.changes_in_target_gen + @.contents_rows_moved
select @.changes_in_gen = @.changes_in_gen - @.contents_rows_moved
update dbo.MSmerge_genhistory with (rowlock) set changecount = @.changes_in_gen where generation = @.gen

if @.@.error<>0
update dbo.MSmerge_genhistory with (rowlock) set changecount = @.changes_in_target_gen where generation = @.target_gen

........

I feel there is some deadlock? Can you see anything from the log? Thx
|||And also, i just learned from some article, that

select tCustomers.* from tCustomers
inner join MSmerge_contents on tCustomers.rowguid = MSmerge_contents.rowguid
inner join MSmerge_genhistory on MSmerge_contents.generation = MSmerge_genhistory.generation
where MSmerge_genhistory.genstatus = 0

I can see all the unuploaded changes on the subscribers that got the problem, which means all the merge triggers were fired normally when any change happened on them.
|||I opened a support case with Microsoft. And this issue is treated as a bug now. So I suppose u guys will see the answer in a future hotfix.

Thanks guysSmile
|||

Hi WII

Just wondered how far your support case had got, we have exactly the same problem and I wondered if you have got a fix?

Thanks,

SMN

|||Same problem here, merge agent gets stuck on sys.sp_MSmakegeneration, which happened after a reinitialization and don't go away even after dropping and creating the subscription.|||Same problem at our system.... Some subsribers do not replicate anymore....

We found the same cause sp_MSmakegeneration (timeout respectively no return value?)

Our system supports salesmen with an application to create orders. We can not reset the subscribtions, as the data of the salesmen would be lost. Our customer looses every day big money due to this bug. There is no way for me to use the workaround as describe above, as we use partially colum level replication. I don't want to create a mess in system tables. If someone would provide a solution for this as well? (Or a comprehensive script, step by step what to do....?)

Otherwhise it would be good, if an experienced programmer could have a look at this "sp_MSmakegeneration" and complete the work and provide a temporarily substitution for this script. It seems to have a hidden dog.

E.g. Comment of MS Programmer in sp_MSmakegeneration Line 265: " -- TODO: possibly add some code for 0 artnick generations..."

Thanks for any help or advice.
|||http://support.microsoft.com/kb/936305

It seems that one of the Hotfixes apply to this timeout problem|||Has anyone determined that this hotfix corrects this problem?

thanks
jg
|||Did NOT fix problem here.sql

Wednesday, March 21, 2012

Does replication work with SQL2k standard

Hi,
Does replication work between two SQL2k standard servers? Or do I need
advanced servers?
I'm in the process of migrating from another vendor, and a friend just told
me that I need advanced server to do replication!!!! Is he correct?
TIA,
Edgard L. Riba
Edgard,
yes there's no problem using Standard Edition. Replicationwise, the only
distinction I know of is Indexed views, which are only available in
Enterprise Edition and can be used as a tablelike article. Apart from that
as far as I know they are identical, both as a Publisher and Subscriber.
HTH,
Paul Ibison
|||Thanks Paul...
Edgard
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> escribi en el mensaje
news:O6QF#MHWEHA.2444@.TK2MSFTNGP11.phx.gbl...
> Edgard,
> yes there's no problem using Standard Edition. Replicationwise, the only
> distinction I know of is Indexed views, which are only available in
> Enterprise Edition and can be used as a tablelike article. Apart from that
> as far as I know they are identical, both as a Publisher and Subscriber.
> HTH,
> Paul Ibison
>
|||You can replicate indexed views with the standard and developer editions of SQL Server. However, the query optimizer will not use them in the query plan, unless you give it an optimizer hint.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Paul Ibison" wrote:

> Edgard,
> yes there's no problem using Standard Edition. Replicationwise, the only
> distinction I know of is Indexed views, which are only available in
> Enterprise Edition and can be used as a tablelike article. Apart from that
> as far as I know they are identical, both as a Publisher and Subscriber.
> HTH,
> Paul Ibison
>
>
|||Thanks - I wasn't aware of this distinction.
Actually I got this from BOL
(http://msdn.microsoft.com/library/de...-us/architec/8
_ar_ts_1cdv.asp) which (incorrectly) claims they are not available in
Standard Edition, but you're spot on according to SQLServerMagazine
(http://www.winnetmag.com/SQLServer/A...657/40657.html).
Cheers,
Paul Ibison
sql

Does Replication Use Compression?

Does SQL Server replication impliment any kind of compression? It seems to me that this would be very helpful for congested WAN links and costly merge replication.

Hi Joshua,

Here is a direct quote from book online

http://msdn2.microsoft.com/en-us/library/ms151740.aspx

Does replication work over low bandwidth connections? Does it use compression?

Yes, replication does work over low bandwidth connections. For connections over TCP/IP, it uses the compression provided by the protocol but does not provide additional compression. For Web synchronization connections over HTTPS, it uses the compression provided by the protocol and also additional compression of the XML files used to replicate changes. For more information about replicating over low bandwidth connections, see A Slow Network Is Causing Problems.

So I guess the answer is no to your question. However, merge replication only sends the net changes rather all the changes at your publisher side. More more info, refer to the following quote from book online.

http://msdn2.microsoft.com/en-us/library/ms152565.aspx

Merge Replication

Merge replication is typically used in server-to-client environments. Merge replication is appropriate in any of the following situations:

Multiple Subscribers might update the same data at various times and propagate those changes to the Publisher and to other Subscribers.
Subscribers need to receive data, make changes offline, and later synchronize changes with the Publisher and other Subscribers.
Each Subscriber requires a different partition of data.
Conflicts might occur and, when they do, you need the ability to detect and resolve them.
The application requires net data change rather than access to intermediate data states. For example, if a row changes five times at a Subscriber before it synchronizes with a Publisher, the row changes only once at the Publisher to reflect the net data change (that is, the fifth value).
|||There are also hardware compression solutions out there that will compress the data before it goes across the network.|||

Compression seems like it should be a given, I hope MS decides to add this. For our situation, we have large amounts of data changes and while the connections are reliable, they may not always be ultra fast.

The doc quoted states that it can make use of the compression provided by the protocol, does that mean you could you use gzip?

|||Agreed, data compression across the wire is something that's being considered for future releases of SQL Server replication.

Does Replication Use Compression?

Does SQL Server replication impliment any kind of compression? It seems to me that this would be very helpful for congested WAN links and costly merge replication.

Hi Joshua,

Here is a direct quote from book online

http://msdn2.microsoft.com/en-us/library/ms151740.aspx

Does replication work over low bandwidth connections? Does it use compression?

Yes, replication does work over low bandwidth connections. For connections over TCP/IP, it uses the compression provided by the protocol but does not provide additional compression. For Web synchronization connections over HTTPS, it uses the compression provided by the protocol and also additional compression of the XML files used to replicate changes. For more information about replicating over low bandwidth connections, see A Slow Network Is Causing Problems.

So I guess the answer is no to your question. However, merge replication only sends the net changes rather all the changes at your publisher side. More more info, refer to the following quote from book online.

http://msdn2.microsoft.com/en-us/library/ms152565.aspx

Merge Replication

Merge replication is typically used in server-to-client environments. Merge replication is appropriate in any of the following situations:

Multiple Subscribers might update the same data at various times and propagate those changes to the Publisher and to other Subscribers.

Subscribers need to receive data, make changes offline, and later synchronize changes with the Publisher and other Subscribers.

Each Subscriber requires a different partition of data.

Conflicts might occur and, when they do, you need the ability to detect and resolve them.

The application requires net data change rather than access to intermediate data states. For example, if a row changes five times at a Subscriber before it synchronizes with a Publisher, the row changes only once at the Publisher to reflect the net data change (that is, the fifth value).
|||There are also hardware compression solutions out there that will compress the data before it goes across the network.|||

Compression seems like it should be a given, I hope MS decides to add this. For our situation, we have large amounts of data changes and while the connections are reliable, they may not always be ultra fast.

The doc quoted states that it can make use of the compression provided by the protocol, does that mean you could you use gzip?

|||Agreed, data compression across the wire is something that's being considered for future releases of SQL Server replication.

Does replication setup make some entry in the Remote servers setti

If I create a transactional replication - Push method in SQL 2K standard with
sp4, will replication create entries in the Remote Servers setting in EM?
Currently I found three entries in the Remote Servers listing, server name
for the publishing server name, server name for the subscriber server, and
repl_distrbutor.
If the replication does make these entries, I have no problem with the
repl_distributor being there. But I have problem with the subscriber server
name being there because I want to create a Linked Server with that same name
but I can't since the name is already in use by the remote servers.
Please let me know which one or all of the above names are legit if indeed
repliation put them in there to begin with.
Say if the above entries need to be there, how I should move them to the
Linked Servers setting because the remote servers feature is for backward
compatible reason and linked servers is more dynamic and is the one to
replace it.
Thanks in advance.
Wingman
Remote Servers and Linked Servers are all stored in the sysservers table in
the master database. Different flag values determine what an entry actually
represents. There is even a special entry for the local server name. If
you want or need to use a replication participating server as a linked
server, there is a special work-around to enable that functionality.
PRB: Adding a Linked Server Causes Error 15028
http://support.microsoft.com/kb/274098/en-us
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"Wingman" <Wingman@.discussions.microsoft.com> wrote in message
news:DC17EBF5-D4FF-49C6-83A7-7E3E4F8D0FE0@.microsoft.com...
> If I create a transactional replication - Push method in SQL 2K standard
> with
> sp4, will replication create entries in the Remote Servers setting in EM?
> Currently I found three entries in the Remote Servers listing, server name
> for the publishing server name, server name for the subscriber server, and
> repl_distrbutor.
> If the replication does make these entries, I have no problem with the
> repl_distributor being there. But I have problem with the subscriber
> server
> name being there because I want to create a Linked Server with that same
> name
> but I can't since the name is already in use by the remote servers.
> Please let me know which one or all of the above names are legit if indeed
> repliation put them in there to begin with.
> Say if the above entries need to be there, how I should move them to the
> Linked Servers setting because the remote servers feature is for backward
> compatible reason and linked servers is more dynamic and is the one to
> replace it.
> Thanks in advance.
> Wingman
|||Ok, I tried that stored procedure and the server name now shows up in both
linked server and remote servers. And I still can't execute the remote
stored procedure. Here is my observation after reading the link. It said
the status for a remote server of a subscriber supposedly a 69. In order for
it to become a linked server of a subscriber it needs to be 229. Before I
executed the stored procedure, the server name that I want to change its
status is 1093 not 69. After the execution, it added 160 to it to become
1253. Is the 1253 status correct? The initial status number 1093 is not 69,
is it because there are other settings added values to it?
Here are my questions:
1) is it correct that the server name will show up both in the linked
servers and remote servers in EM?
2) Is the 1253 new status correct?
3) the link didn't say I need to do a service restart, what do you think? I
am getting this error when I execute a remote stored procedure:
"Could not execute procedure on remote server 'server1' because SQL Server
is not configured for remote access. Ask your system administrator to
reconfigure SQL Server to allow remote access."
Also, when I try to double click on the 'table' of the linked server, it
said the server doesn't exist or access denied. The SQL login name I
entered in the Linked server properties has the sys admin right and this
account exists in both servers.
Wingman
"Wingman" wrote:

> If I create a transactional replication - Push method in SQL 2K standard with
> sp4, will replication create entries in the Remote Servers setting in EM?
> Currently I found three entries in the Remote Servers listing, server name
> for the publishing server name, server name for the subscriber server, and
> repl_distrbutor.
> If the replication does make these entries, I have no problem with the
> repl_distributor being there. But I have problem with the subscriber server
> name being there because I want to create a Linked Server with that same name
> but I can't since the name is already in use by the remote servers.
> Please let me know which one or all of the above names are legit if indeed
> repliation put them in there to begin with.
> Say if the above entries need to be there, how I should move them to the
> Linked Servers setting because the remote servers feature is for backward
> compatible reason and linked servers is more dynamic and is the one to
> replace it.
> Thanks in advance.
> Wingman
|||Yes, it is correct to see the servers listed in more than one place. The
values you refer to are bit flags held in an integer field. Addition is not
the correct operation, logical OR is the correct operation.
You need to enable each server for remote access, just like it says. Login
to each remote SQL server and execute the following:
exec sp_configure 'remote access', 1
go
reconfigure with override
go
This tells the remote server to accept remote queries.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"Wingman" <Wingman@.discussions.microsoft.com> wrote in message
news:59C3CADD-1BCB-45CD-9DB0-2EEEFCADCA6B@.microsoft.com...[vbcol=seagreen]
> Ok, I tried that stored procedure and the server name now shows up in both
> linked server and remote servers. And I still can't execute the remote
> stored procedure. Here is my observation after reading the link. It said
> the status for a remote server of a subscriber supposedly a 69. In order
> for
> it to become a linked server of a subscriber it needs to be 229. Before
> I
> executed the stored procedure, the server name that I want to change its
> status is 1093 not 69. After the execution, it added 160 to it to become
> 1253. Is the 1253 status correct? The initial status number 1093 is not
> 69,
> is it because there are other settings added values to it?
> Here are my questions:
> 1) is it correct that the server name will show up both in the linked
> servers and remote servers in EM?
> 2) Is the 1253 new status correct?
> 3) the link didn't say I need to do a service restart, what do you think?
> I
> am getting this error when I execute a remote stored procedure:
> "Could not execute procedure on remote server 'server1' because SQL Server
> is not configured for remote access. Ask your system administrator to
> reconfigure SQL Server to allow remote access."
> Also, when I try to double click on the 'table' of the linked server, it
> said the server doesn't exist or access denied. The SQL login name I
> entered in the Linked server properties has the sys admin right and this
> account exists in both servers.
>
> Wingman
>
> "Wingman" wrote:

Does Replication Agent locks the database?

Hi,
Does the first synchronization(Replication Agent) while setting up merge
replication locks both the publisher and subscriber databases or the
databases can be used while the first synchronization is taking place?
If first synchronization does not lock the databases, will the changes that
have taken place at both the ends be merged later on, when synchronization
is complete?
Thanks
Anukul
Anukul,
there is no exclusive lock on the database, if that is what you are
referring to. There is a shared lock on the database as there would be on
any connection. As far as I know, there aren't exclusive locks held on the
table during the snapshot generation in merge replication. There are
page-level shared locks which'll prevent updates while the snapshot of a
particular page is being generated, but concurrent reads are compatible. In
transactional there is the option to use concurrent snapshot processing
where concurrent changes can occur during the snapshot generation, but not
so in merge or snapshot replication.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Hi Paul:
I am talking about Replication Agent, which runs after snapshot agent.
Replication Agnet does the syncronization.
Please suggest.
Thanks,
Anukul
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:OLV3bsFGFHA.3888@.TK2MSFTNGP12.phx.gbl...
> Anukul,
> there is no exclusive lock on the database, if that is what you are
> referring to. There is a shared lock on the database as there would be on
> any connection. As far as I know, there aren't exclusive locks held on the
> table during the snapshot generation in merge replication. There are
> page-level shared locks which'll prevent updates while the snapshot of a
> particular page is being generated, but concurrent reads are compatible.
In
> transactional there is the option to use concurrent snapshot processing
> where concurrent changes can occur during the snapshot generation, but not
> so in merge or snapshot replication.
> Rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
|||My understanding is that the merge agent works with
batches of records and each separate batch is treated as
a transaction, but the combined synchronization process
is not held under a global transaction. In this case, an
edit to a record on a batch already processed would be
acceptable and would enter MSmerge_contents.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

Sunday, February 26, 2012

Does adding a new column cause entire subscription to reinitialize?

Hello,
Some hopefully simple questions for the replication experts!
SQL Server 2000, transactional replication, one publisher, one
subscriber.
I have added a column to an article on the publisher and the publisher
is already published. Initially I tried to do this as follows:
sp_repladdcolumn@.source_object = 'tblA',
@.column = 'NewField',
@.typetext = 'int NULL',
@.publication_to_add = 'MyPublication',
@.force_reinit_subscription = 0
but this gave me an error message:
"Error 21381. Cannot add (drop) column to table 'tblA' because the
table belongs to publication(s) with an active updatable subscription.
Set @.force_reinit_subscription to 1 to force reinitialization"
I then re-ran the above with @.force_reinit_subscription=1. The command
worked and returned the message "subscription(s) reinitliazed" but the
new column hasn't appeared on the subscriber.
My questions are as follows:
1 - Do I have to re-run the Snapshot Agent?
2 - If I do re-run the Snapshot Agent, will it reinitialize all other
tables (and their data) or will it just add the new column?
3 - Is there a way I can view the reinitialization commands that are
queued at the publisher to see whether the queued command is to add the
new column or whether it is to reinitialize everything?
Thanks very much!
Pawel
For information: the snapshot agent ran in the evening. The snapshot
agent copied across the new field ALONG WITH all tables related to
'tblA', so it's just as well that I didn't kick it off manually during
the day.
I would still like to know if there is a way to view the commands which
the snapshot agent is due to execute. Does anyone know?
Thanks
Pawel
Pawel wrote:
> Hello,
> Some hopefully simple questions for the replication experts!
> SQL Server 2000, transactional replication, one publisher, one
> subscriber.
> I have added a column to an article on the publisher and the publisher
> is already published. Initially I tried to do this as follows:
> sp_repladdcolumn@.source_object = 'tblA',
> @.column = 'NewField',
> @.typetext = 'int NULL',
> @.publication_to_add = 'MyPublication',
> @.force_reinit_subscription = 0
> but this gave me an error message:
> "Error 21381. Cannot add (drop) column to table 'tblA' because the
> table belongs to publication(s) with an active updatable subscription.
> Set @.force_reinit_subscription to 1 to force reinitialization"
> I then re-ran the above with @.force_reinit_subscription=1. The command
> worked and returned the message "subscription(s) reinitliazed" but the
> new column hasn't appeared on the subscriber.
> My questions are as follows:
> 1 - Do I have to re-run the Snapshot Agent?
> 2 - If I do re-run the Snapshot Agent, will it reinitialize all other
> tables (and their data) or will it just add the new column?
> 3 - Is there a way I can view the reinitialization commands that are
> queued at the publisher to see whether the queued command is to add the
> new column or whether it is to reinitialize everything?
> Thanks very much!
> Pawel
|||Pawel,
as your test shows, if you are specifying @.force_reinit_subscription=1, the
snapshot will contain everything and if not, it won't. To see the commands
that the snapshot agent runs you can use sp_browsereplcmds. Also you can
look in the distribution working folder to see the actual files.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Paul,
Just to clarify, I don't think the snapshot contained everything. It
looks like it only contained the tables which have a relationship with
'tblA', not all the tables in the published database.
Thanks for the note about sp_browsereplcmds.
Pawel
Paul Ibison wrote:
> Pawel,
> as your test shows, if you are specifying @.force_reinit_subscription=1, the
> snapshot will contain everything and if not, it won't. To see the commands
> that the snapshot agent runs you can use sp_browsereplcmds. Also you can
> look in the distribution working folder to see the actual files.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)

Sunday, February 19, 2012

Documenting Replication Strategy

Paul or anyone do you have any resources on how one could document a
replication strategy.
Thank you,
Abdul Rauf
SQL 6.5 would allow you to graphically illustrate a replication topology.
This feature was cut in SQL 7 and SQL 2000.
The best you can currently do is to script out your publications and
subscriptions.
"Abdul Rauf" <AbdulRauf@.discussions.microsoft.com> wrote in message
news:7142FDDC-D1EA-4D8B-9064-FB3ABF7BE994@.microsoft.com...
> Paul or anyone do you have any resources on how one could document a
> replication strategy.
> Thank you,
> Abdul Rauf
|||We created an enterprise topology living visio digram which detailed the
architecture and documented each publication's contents and particulairs in
Microsoft Word. The real point here is there is no plug and play solution to
get it done any more so resort to the tools you do have. As long as it is
legible and detailed you will be fine.
"Abdul Rauf" wrote:

> Paul or anyone do you have any resources on how one could document a
> replication strategy.
> Thank you,
> Abdul Rauf

Documentation of RMO and Merge Replication

Hi there,

In a lot of the Replication documentation it only refers to the merge agent operating in the context of a push or a pull configuration. i.e. if it is push then the merge agent is at the distributor but if it is a pull then the merge agent functions at the subscriber.

I recently joined a project which is configured as a push but it uses RMO for synchronisation. This RMO application is installed on a compeletely separate server. Initially I thought the RMO was just passing requests through to the publisher/distributor/subscriber but the distributor didn't seem to be doing any of the work. It therefore seems that the merging/synchronisation is being performed on this RMO application server and not the distributor or subscriber.

I therefore think it would be good (assuming I am correct of course) that the documentation reflects this caveat

As a general observation Replication programming seems to be quite detached from the rest of the replication documentation. Is this a deliberate decision?

It isn't normally, but I'll ping the writer in charge of this and ask.

Buck Woody

|||

To answer your last question first. Yes, it was a product-wide design decision to put all of the programming API documentation for SQL Server together in a separate node. I agree with you that it isn't ideal. In the next release of SQL Server, we will include the programming content for each component with the rest of the component's conceptual content.

There is no general requirement that an RMO application run on a replication server. SQL Server Management Studio (SSMS) uses RMO to perform administrative tasks in replication, and you can administer replication on remote servers using SSMS. You can also synchronize subscriptions remotely using RMO (MergeSubscription.SynchronizeWithJob in the case of a push subscription), which runs the agent job on the Distributor to asynchronously start the Merge Agent. To run the Merge Agent synchronously (MergeSynchronizationAgent.Synchronize) and receive callbacks (synchronization status events), your application needs to run on the same server as the Merge Agent (the Distributor in your case).

I will see if we can make the RMO documentation more clear on this point.

Best wishes,

Glenn Gailey [MSFT]

SQL Server UE

|||

Hi Glenn & Buck,

Thanks very much for getting back to me.

I am glad to hear that the API docs will be more integrated in katmai.

On the other point I am a little confused. In our setup the merge application using RMO runs on a totally separate server to the distributor but this third machine (distributor is remote to the publisher) has SQL Express installed. We get back all the callbacks and replication is operating. I mention this because I think this kind of setup isn't really referred to in BOL but I also believe it is a permissable setup (although not perhaps a very common one).

Cheers, James

|||Is your RMO application running on the Subscriber server, or on a 4th server totally outside the Pub/Dist/Sub topology?|||

It sits on a completely separate 4th server.

Cheers, James

|||

I checked with the development team, and it is possible to run the Merge Agent remotely (both synchronously and asynchronously) using RMO. I will look into providing this information in the documentation.

Cheers!

|||Is it possible to run application that uses RMO on a server without installing SQL server? From the posts in this thread I assume the 4th server has SQLServer Express 2005 installation just to be able to run RMO app.|||

That is correct. You do need to have at least sql express installed. This is the only way to get the RMO components onto the server.

Cheers, James

Documentation of RMO and Merge Replication

Hi there,

In a lot of the Replication documentation it only refers to the merge agent operating in the context of a push or a pull configuration. i.e. if it is push then the merge agent is at the distributor but if it is a pull then the merge agent functions at the subscriber.

I recently joined a project which is configured as a push but it uses RMO for synchronisation. This RMO application is installed on a compeletely separate server. Initially I thought the RMO was just passing requests through to the publisher/distributor/subscriber but the distributor didn't seem to be doing any of the work. It therefore seems that the merging/synchronisation is being performed on this RMO application server and not the distributor or subscriber.

I therefore think it would be good (assuming I am correct of course) that the documentation reflects this caveat

As a general observation Replication programming seems to be quite detached from the rest of the replication documentation. Is this a deliberate decision?

It isn't normally, but I'll ping the writer in charge of this and ask.

Buck Woody

|||

To answer your last question first. Yes, it was a product-wide design decision to put all of the programming API documentation for SQL Server together in a separate node. I agree with you that it isn't ideal. In the next release of SQL Server, we will include the programming content for each component with the rest of the component's conceptual content.

There is no general requirement that an RMO application run on a replication server. SQL Server Management Studio (SSMS) uses RMO to perform administrative tasks in replication, and you can administer replication on remote servers using SSMS. You can also synchronize subscriptions remotely using RMO (MergeSubscription.SynchronizeWithJob in the case of a push subscription), which runs the agent job on the Distributor to asynchronously start the Merge Agent. To run the Merge Agent synchronously (MergeSynchronizationAgent.Synchronize) and receive callbacks (synchronization status events), your application needs to run on the same server as the Merge Agent (the Distributor in your case).

I will see if we can make the RMO documentation more clear on this point.

Best wishes,

Glenn Gailey [MSFT]

SQL Server UE

|||

Hi Glenn & Buck,

Thanks very much for getting back to me.

I am glad to hear that the API docs will be more integrated in katmai.

On the other point I am a little confused. In our setup the merge application using RMO runs on a totally separate server to the distributor but this third machine (distributor is remote to the publisher) has SQL Express installed. We get back all the callbacks and replication is operating. I mention this because I think this kind of setup isn't really referred to in BOL but I also believe it is a permissable setup (although not perhaps a very common one).

Cheers, James

|||Is your RMO application running on the Subscriber server, or on a 4th server totally outside the Pub/Dist/Sub topology?|||

It sits on a completely separate 4th server.

Cheers, James

|||

I checked with the development team, and it is possible to run the Merge Agent remotely (both synchronously and asynchronously) using RMO. I will look into providing this information in the documentation.

Cheers!

|||Is it possible to run application that uses RMO on a server without installing SQL server? From the posts in this thread I assume the 4th server has SQLServer Express 2005 installation just to be able to run RMO app.
|||

That is correct. You do need to have at least sql express installed. This is the only way to get the RMO components onto the server.

Cheers, James

Tuesday, February 14, 2012

Do you replicate views, stored procedures, and user functions?

Greetings,

We have recently begun using transactional replication to keep the data in our SQL Servers synchronized in a geographically dispersed environment. We replicate our tables but we have never replicated views, stored procedures, or user functions in our production systems. We are thinking of doing so but wonder if the overhead of running the replication agents doesn't outweigh the benefits of having replication assist with the occassional change to these design elements.

Is anyone on this forum replicating views, sprocs, and user functions? What has your experience been?

Thanks for any ideas that you share.

BCB

There shouldnt be any issues replicating views , sprocs , udfs.

|||

It works great appart from when you want to run the snapshot. It will take much longer to run the snapshot for a couple of 100 sp's than for a couple of hundered tables.

Other than that it works great and with 2005 will replicate your changes nicely.

We keep them in a separate publication because of the snapshot issue and to make things simpler for the main publication.

Martin

Do you replicate views, stored procedures, and user functions?

Greetings,

We have recently begun using transactional replication to keep the data in our SQL Servers synchronized in a geographically dispersed environment. We replicate our tables but we have never replicated views, stored procedures, or user functions in our production systems. We are thinking of doing so but wonder if the overhead of running the replication agents doesn't outweigh the benefits of having replication assist with the occassional change to these design elements.

Is anyone on this forum replicating views, sprocs, and user functions? What has your experience been?

Thanks for any ideas that you share.

BCB

There shouldnt be any issues replicating views , sprocs , udfs.

|||

It works great appart from when you want to run the snapshot. It will take much longer to run the snapshot for a couple of 100 sp's than for a couple of hundered tables.

Other than that it works great and with 2005 will replicate your changes nicely.

We keep them in a separate publication because of the snapshot issue and to make things simpler for the main publication.

Martin

Do you replicate views, stored procedures, and user functions?

Greetings,

We have recently begun using transactional replication to keep the data in our SQL Servers synchronized in a geographically dispersed environment. We replicate our tables but we have never replicated views, stored procedures, or user functions in our production systems. We are thinking of doing so but wonder if the overhead of running the replication agents doesn't outweigh the benefits of having replication assist with the occassional change to these design elements.

Is anyone on this forum replicating views, sprocs, and user functions? What has your experience been?

Thanks for any ideas that you share.

BCB

There shouldnt be any issues replicating views , sprocs , udfs.

|||

It works great appart from when you want to run the snapshot. It will take much longer to run the snapshot for a couple of 100 sp's than for a couple of hundered tables.

Other than that it works great and with 2005 will replicate your changes nicely.

We keep them in a separate publication because of the snapshot issue and to make things simpler for the main publication.

Martin