Showing posts with label weird. Show all posts
Showing posts with label weird. Show all posts

Monday, March 26, 2012

Merge Replication Weird Scenario

My topology:
On the national Server: SQL 2005 Enterprise
On the mobile clients: SQL 2005 Workgroup.
The Scenario:
2 mobile subscriber S1 and S2 to the same simple merge publication P1 on
server N
Day 1,
S1 and S2 both synch up with N and both go off to do fieldwork
Day3,
S1 and S2 both synch up with N.
S1 goes back to work
S2 shutdown the laptop and goes on 2-week vacation.
2 Weeks late
S1 Synch up wit the server and goes off to do fieldwork.
S2 meets S1 in the field. They workfield is in the North Pole.
S2 has the laptop with data 2-weeks old but no longer can have access to the
master publisher N to synch the replica and get latest changes.
S2 will have to sync with S1 since S1 database is fresh. The challenge is to
have S2 and S1 replica identical
The Questions:
Is it possible for S2 to sync with S1 and if yes then and how to go about
it… we need S1 and S2 to have identical replica on their machines?
Now that S1 and S2 are have identical databases and are both doing their
fieldwork in the northpole. Can they both sync back with the national
publisher N when they have access?
Keep in mind that S2 got its data updated from the replica on S1?
Thank you!
No, what you are describing is multi master replication and SQL Server does
not support it.
Hilary Cotter
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
"maher" <maher@.discussions.microsoft.com> wrote in message
news:325C94F9-A80F-4CB6-95FA-5DEF41A8D1CC@.microsoft.com...
> My topology:
> On the national Server: SQL 2005 Enterprise
> On the mobile clients: SQL 2005 Workgroup.
>
> The Scenario:
> 2 mobile subscriber S1 and S2 to the same simple merge publication P1 on
> server N
>
> Day 1,
> S1 and S2 both synch up with N and both go off to do fieldwork
> Day3,
> S1 and S2 both synch up with N.
> S1 goes back to work
> S2 shutdown the laptop and goes on 2-week vacation.
> 2 Weeks late
> S1 Synch up wit the server and goes off to do fieldwork.
> S2 meets S1 in the field. They workfield is in the North Pole.
> S2 has the laptop with data 2-weeks old but no longer can have access to
> the
> master publisher N to synch the replica and get latest changes.
> S2 will have to sync with S1 since S1 database is fresh. The challenge is
> to
> have S2 and S1 replica identical
>
> The Questions:
> Is it possible for S2 to sync with S1 and if yes then and how to go about
> it. we need S1 and S2 to have identical replica on their machines?
>
> Now that S1 and S2 are have identical databases and are both doing their
> fieldwork in the northpole. Can they both sync back with the national
> publisher N when they have access?
> Keep in mind that S2 got its data updated from the replica on S1?
> Thank you!
>
sql

Merge replication throwing very weird error messages

I've been setting up subscriptions to a merge publication for the past 3 days. All of a sudden, I'm getting a pile of very strange errors. Replication is configured. I have 16 subscribers to an existing publication configured and synchronizing changes without any issues. The script that I'm using to create all of the subscriptions is as follows:

use [PIC]

exec sp_addmergesubscription @.publication = N'PIC', @.subscriber = N'machinename\SQLEXPRESS',

@.subscriber_db = N'MyDatabase', @.subscription_type = N'Push', @.sync_type = N'Automatic',

@.subscriber_type = N'Global', @.subscription_priority = 75, @.description = N'', @.use_interactive_resolver = N'False'

exec sp_addmergepushsubscription_agent @.publication = N'PIC', @.subscriber = N'machinename\SQLEXPRESS',

@.subscriber_db = N'MyDatabase', @.job_login = null, @.job_password = null, @.subscriber_security_mode = 1,

@.publisher_security_mode = 1, @.frequency_type = 64, @.frequency_interval = 0, @.frequency_relative_interval = 0,

@.frequency_recurrence_factor = 0, @.frequency_subday = 0, @.frequency_subday_interval = 0, @.active_start_time_of_day = 0,

@.active_end_time_of_day = 235959, @.active_start_date = 0, @.active_end_date = 0

GO

The last one that I added #17, gives the following errors after successfully creating the subscription.

Command attempted:

{call sys.sp_MSmergesubscribedb ('true', 0) }

Error messages:

The merge process could not initialize the subscription. Ensure that the subscription registration exists at the publisher, and reregister the subscription if necessary. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147201011)
Get help: http://help/MSSQL_REPL-2147201011

RegCreateKeyEx() returned error 5, 'Access is denied.' (Source: MSSQLServer, Error number: 22002)
Get help: http://help/22002

Could not add article resolver 'Microsoft SQL Server Additive Conflict Resolver' information to the registry (Source: MSSQLServer, Error number: 21713)
Get help: http://help/21713

Could not register article resolver: 'Microsoft SQL Server Additive Conflict Resolver'. (Source: MSSQLServer, Error number: 21715)
Get help: http://help/21715

The system tables for merge replication could not be created successfully. (Source: MSSQLServer, Error number: 20008)
Get help: http://help/20008

I've tried to manually create it using the GUI and get an even stranger error message as follows:

TITLE: New Subscription Wizard

Microsoft SQL Server Management Studio is unable to access replication components because replication is not installed on this instance of SQL Server. For information about installing replication, see the topic Installing Replication in SQL Server Books Online.

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.06&EvtSrc=Microsoft.SqlServer.Management.UI.ReplUtilitiesErrorSR&EvtID=ReplicationNotInstalled&LinkId=20476


ADDITIONAL INFORMATION:

Replication components are not installed on this server. Run SQL Server Setup again and select the option to install replication. (Microsoft SQL Server, Error: 21028)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=21028&LinkId=20476


BUTTONS:

OK

I very obviously have replication installed by virtue of the fact that I have a publication and 16 subscriptions that are currently synchronizing. Any ideas?

Yes, I can connect to the subscriber from the server. That's how I created the subscription database in the first place, by connecting a query window to the subscriber and issuing a create database statement.|||

Is it the same account you are using to run this command as the other 16 subscriptions?

Did the sql server service account change between the success and this failure attempt?

Did you add sp_addmergesubscription_agent to those successful subscriptions too?

|||Same account was used to run these two commands for all of the other 16 subscriptions. No, the service account did not change. Yes, we successfully added sp_addmergesubscription_agent to the other 16.

Merge replication throwing very weird error messages

I've been setting up subscriptions to a merge publication for the past 3 days. All of a sudden, I'm getting a pile of very strange errors. Replication is configured. I have 16 subscribers to an existing publication configured and synchronizing changes without any issues. The script that I'm using to create all of the subscriptions is as follows:

use [PIC]

exec sp_addmergesubscription @.publication = N'PIC', @.subscriber = N'machinename\SQLEXPRESS',

@.subscriber_db = N'MyDatabase', @.subscription_type = N'Push', @.sync_type = N'Automatic',

@.subscriber_type = N'Global', @.subscription_priority = 75, @.description = N'', @.use_interactive_resolver = N'False'

exec sp_addmergepushsubscription_agent @.publication = N'PIC', @.subscriber = N'machinename\SQLEXPRESS',

@.subscriber_db = N'MyDatabase', @.job_login = null, @.job_password = null, @.subscriber_security_mode = 1,

@.publisher_security_mode = 1, @.frequency_type = 64, @.frequency_interval = 0, @.frequency_relative_interval = 0,

@.frequency_recurrence_factor = 0, @.frequency_subday = 0, @.frequency_subday_interval = 0, @.active_start_time_of_day = 0,

@.active_end_time_of_day = 235959, @.active_start_date = 0, @.active_end_date = 0

GO

The last one that I added #17, gives the following errors after successfully creating the subscription.

Command attempted:

{call sys.sp_MSmergesubscribedb ('true', 0) }

Error messages:

The merge process could not initialize the subscription. Ensure that the subscription registration exists at the publisher, and reregister the subscription if necessary. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147201011)
Get help: http://help/MSSQL_REPL-2147201011

RegCreateKeyEx() returned error 5, 'Access is denied.' (Source: MSSQLServer, Error number: 22002)
Get help: http://help/22002

Could not add article resolver 'Microsoft SQL Server Additive Conflict Resolver' information to the registry (Source: MSSQLServer, Error number: 21713)
Get help: http://help/21713

Could not register article resolver: 'Microsoft SQL Server Additive Conflict Resolver'. (Source: MSSQLServer, Error number: 21715)
Get help: http://help/21715

The system tables for merge replication could not be created successfully. (Source: MSSQLServer, Error number: 20008)
Get help: http://help/20008

I've tried to manually create it using the GUI and get an even stranger error message as follows:

TITLE: New Subscription Wizard

Microsoft SQL Server Management Studio is unable to access replication components because replication is not installed on this instance of SQL Server. For information about installing replication, see the topic Installing Replication in SQL Server Books Online.

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.06&EvtSrc=Microsoft.SqlServer.Management.UI.ReplUtilitiesErrorSR&EvtID=ReplicationNotInstalled&LinkId=20476


ADDITIONAL INFORMATION:

Replication components are not installed on this server. Run SQL Server Setup again and select the option to install replication. (Microsoft SQL Server, Error: 21028)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=21028&LinkId=20476


BUTTONS:

OK

I very obviously have replication installed by virtue of the fact that I have a publication and 16 subscriptions that are currently synchronizing. Any ideas?

Yes, I can connect to the subscriber from the server. That's how I created the subscription database in the first place, by connecting a query window to the subscriber and issuing a create database statement.|||

Is it the same account you are using to run this command as the other 16 subscriptions?

Did the sql server service account change between the success and this failure attempt?

Did you add sp_addmergesubscription_agent to those successful subscriptions too?

|||Same account was used to run these two commands for all of the other 16 subscriptions. No, the service account did not change. Yes, we successfully added sp_addmergesubscription_agent to the other 16.