Showing posts with label via. Show all posts
Showing posts with label via. Show all posts

Monday, March 26, 2012

Merge replication via cradle using ActiveSync

Hello. Is there any possibility to connect and proceed merge replication between SQL Mobile and SQL Server 2000 SP4 using ActiveSync? I need to deal with this situation:
- mobile application is working using self .sdf database but from time to time it connects to SQL Server and do some synchronization (synch or asynch, really doesn't matter). But, when there is no network connection (broken, suspended, wifi broken etc.) I have to create an option - Pocket PC will land into cradle and I have to synch all changes made in SDF and SQL Server using ActiveSync (or something like that - via USB).
So my question is : is there any simple mechanism to do this? Or I have to write some Active Sync manager which will be dealing with my replication? (pretty hard to do). Awaiting answer - Maciej Wysocki.

PS. I am using Windows CE 3.0 but I can setup Windows Mobile 5.0 too, I am just wondering if there is any chance to make this type of synch. working.

The merge replication over ActiveSync works since it uses http/https and ActiveSync provides pass thru http connections. You do not have to write anything for ActiveSync. Just cradle the device and try to sync it should work.If you have any problems, let me know, we can try to figure it out

Manish

|||Ok. Thanks for reply. I wanna know one more thing which I really need. Is there any chance to fire synchronization everytime when Pocket PC is put into cradle? I know that I can create a thread ( http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=596053&SiteID=1 ) with checking section, but it's not good solution (every new thread = less performance). So putting Pocket into cradle fires any event? Thanks in advance. Maciej Wysocki

PS. If getting Pocket out of cradle is detectable too I will be glad to get to know how can I check it.

Merge replication trouble

Hello
I have made a merge replication between two server W2k with sql2000 sp3. Those servers are connected via internet. In distributor (also publisher) I have setting up aliases for both servers. Have generated snapshot but when agent run I have this error: -2
147201019 and 14010 : "the subscription for pubblication [bla bla] is invalid".
I have searching in the net some solutions but I have noticed that in all cases it is depended by alias setting. But I have defined its ?
Some ideas ?
Have solved the puzzle.
In subscription I have noticed with sp_helpserver that the subscription server hav id = 1 so have do this:
sp_dropserver 'DIST_SERVER'
sp_dropserver 'SUB_SERVER'
sp_addserver 'SUB_SERVER', @.local = 'LOCAL'
where DIST_SERVER is my distribution, publisher server and SUB_SERVER is my subscription server.
Bests
|||Rafal,
OK, and the last 2 commands will require a restart of the services.
I'm not clear what the first line is for though (sp_dropserver 'DIST_SERVER').
Regards,
Paul Ibison

Friday, March 23, 2012

Merge replication subscription error with proxy

Ok, perhaps I'm a moron.. believe me, I'd be glad to admit it if I
could just get this fixed.
We're trying to merge replicate data via https, we have installed the
CA certificate and can connect to the replisapi.dll through IE. I used
the following script to generate the subscription:
DECLARE @.publication AS sysname;
DECLARE @.publisher AS sysname;
DECLARE @.publicationDB AS sysname;
DECLARE @.websyncurl AS sysname;
DECLARE @.login AS sysname;
DECLARE @.password AS nvarchar(512);
SET @.publication = N'tables';
SET @.publisher = N'server';
SET @.publicationDB = N'database';
SET @.websyncurl = 'https://webserver/WebSync';
SET @.login = N'websql\user';
Set @.password = N'pass';
USE [LocalDB]
EXEC sp_addmergepullsubscription
@.publisher = @.publisher,
@.publication = @.publication,
@.publisher_db = @.publicationDB,
@.subscriber_type = N'anonymous';
EXEC sp_addmergepullsubscription_agent
@.publisher = @.publisher,
@.publisher_db = @.publicationDB,
@.publication = @.publication,
@.distributor = @.publisher,
@.job_login = @.login,
@.job_password = @.password,
@.use_web_sync = 1,
@.internet_url = @.websyncurl,
@.internet_login = @.login,
@.internet_password = @.password,
@.enabled_for_syncmgr = 'true';
GO
This creates the subscription locally but gives me the error
"websql\user not a valid Windows account". I tried changing the
job_login & job_password to a local account and the subscription was
added without errors. When I go to start the syncronization I get the
error: "The system cannot find the file specified." The underlying
error here is with the proxy. For some reason when it tries to connect
it isn't passing the proper credentials or something.
Anyway, any I'd appreciate any help or direction. If I find out what's
wrong I'll go ahead and post it.
JC
That's because it is creating the agent at the subscriber and when doing so,
you are specifying an account of websql\user which does not exist on the
subscriber. If you change this to a local account and then try to
synchronize, you will get security errors, because the SID of the local
account you set it to does not have a valid scope outside of the local
machine. The job login and password can be a local account and it dosn't
affect anything. However, take a look at the other credential. You are
setting the synchronization context to websql\user and that account, since
it doesn't exist on the local machine can't generate the file which is used
to synch via https. (The more accurate error message would be user doesn't
exist or access denied.)
I don't have a system setup to be able to configure https synchronization
right now. I've done this before and your issue is with the security
context. I just can't remember what I did before to fix this particular
error.
Mike
http://www.solidqualitylearning.com
Disclaimer: This communication is an original work and represents my sole
views on the subject. It does not represent the views of any other person
or entity either by inference or direct reference.
<jbzcooper@.gmail.com> wrote in message
news:1138315588.689076.326990@.g14g2000cwa.googlegr oups.com...
> Ok, perhaps I'm a moron.. believe me, I'd be glad to admit it if I
> could just get this fixed.
> We're trying to merge replicate data via https, we have installed the
> CA certificate and can connect to the replisapi.dll through IE. I used
> the following script to generate the subscription:
> DECLARE @.publication AS sysname;
> DECLARE @.publisher AS sysname;
> DECLARE @.publicationDB AS sysname;
> DECLARE @.websyncurl AS sysname;
> DECLARE @.login AS sysname;
> DECLARE @.password AS nvarchar(512);
> SET @.publication = N'tables';
> SET @.publisher = N'server';
> SET @.publicationDB = N'database';
> SET @.websyncurl = 'https://webserver/WebSync';
> SET @.login = N'websql\user';
> Set @.password = N'pass';
> USE [LocalDB]
> EXEC sp_addmergepullsubscription
> @.publisher = @.publisher,
> @.publication = @.publication,
> @.publisher_db = @.publicationDB,
> @.subscriber_type = N'anonymous';
> EXEC sp_addmergepullsubscription_agent
> @.publisher = @.publisher,
> @.publisher_db = @.publicationDB,
> @.publication = @.publication,
> @.distributor = @.publisher,
> @.job_login = @.login,
> @.job_password = @.password,
> @.use_web_sync = 1,
> @.internet_url = @.websyncurl,
> @.internet_login = @.login,
> @.internet_password = @.password,
> @.enabled_for_syncmgr = 'true';
> GO
> This creates the subscription locally but gives me the error
> "websql\user not a valid Windows account". I tried changing the
> job_login & job_password to a local account and the subscription was
> added without errors. When I go to start the syncronization I get the
> error: "The system cannot find the file specified." The underlying
> error here is with the proxy. For some reason when it tries to connect
> it isn't passing the proper credentials or something.
> Anyway, any I'd appreciate any help or direction. If I find out what's
> wrong I'll go ahead and post it.
> JC
>
|||Mike,
Appreciate the reply and you are correct. I split the credentials into
two, one for the machine and one for the web. This brought up a second
error which I pondered for some time until a colleage suggested I look
at the security permissions for the login. I tried several things but
this is what I was doing when I got it to work:
0. Ensure that windows account SQL run under has proper authority to
execute job
1. Log into windows using the windows account SQL is using
2. Log into SQL using Windows Authentication
3. Execute the above script (after adding a second set of credentials
for the job)
4. Run replication
Some of the above steps may not be necessary.. it just worked for me.
HTH someone else.. man, I was in a bad spot.
JC

merge replication sqlserver2000sp4 sqlce3.0 does that really work ?

Hi,

we have developped an application on pdaphone. we try to use merge replication between our sql server 2000 sp4 and sql Ce 3.0 via GPRS . Sometime that works very fine . Sometime it's a nightmare !!! nothing work . we have multiple error....

can someone tell me, what are the rules to make it work ?

can someone tell me, if it really works fine ?

thanks

Avoid complex filters and joins.

It is supported, yes, but personally I would recommend upgrading to SQL Server 2005 SP2, where many improvements have been made to Merge replication.

merge replication sqlserver2000sp4 sqlce3.0 does that really work ?

Hi,

we have developped an application on pdaphone. we try to use merge replication between our sql server 2000 sp4 and sql Ce 3.0 via GPRS . Sometime that works very fine . Sometime it's a nightmare !!! nothing work . we have multiple error....

can someone tell me, what are the rules to make it work ?

can someone tell me, if it really works fine ?

thanks

Avoid complex filters and joins.

It is supported, yes, but personally I would recommend upgrading to SQL Server 2005 SP2, where many improvements have been made to Merge replication.

Monday, March 19, 2012

merge replication partition options

Setup:
SQL Server 2005 -> Merge pull subscription via HTTPS
Tables:
1) StudioType (Id [tinyint] PK, Name [nvarchar])
2) Studio (Id [int] PK, StudioTypeId [tinyint] FK, ComputerName [nvarchar]...)
3) etc
Remarks:
I have a single parametrized filter (for the entire database) on article
Studio like so -> ComputerName=HOST_NAME().
@.partition_option for Studio is obviously 3.
I have a join filter between Studio and StudioType like so:
@.filtername = N'StudioTypes_Studios', @.join_articlename = N'Studios',
@.join_filterclause = N'[StudioTypes].[Id] = [Studios].[StudioTypeId]',
@.join_unique_key = 0
Basically I have multiple Studios that belong to the same StudioType
Question:
Which @.partition_option can/should I use on article StudioType?
I know 0 works, but can I use 2 instead?
In order to save you guys some time searching, this page should contain all
the info required:
http://technet.microsoft.com/en-us/library/ms152478.aspx
But I have a problem undestanding whether the join filter creates
overlapping or nonoverlapping partitions...
Also, could somebody answer this question as well:
Does the following - "The Subscriber cannot update columns referenced in a
parameterized filter." - also apply to columns used in joins or does it only
apply to the parametrized filter column (ComputerName)?
I'm guessing not...
Ok, I figured out that I can't use partition_option 2, because the rows are
indeed overlapping.
So I can only use partition_option either 0 or 1.
But it would still be nice if somebody can answer the last question in my
post...
"mommi" wrote:

> Setup:
> SQL Server 2005 -> Merge pull subscription via HTTPS
> Tables:
> 1) StudioType (Id [tinyint] PK, Name [nvarchar])
> 2) Studio (Id [int] PK, StudioTypeId [tinyint] FK, ComputerName [nvarchar]...)
> 3) etc
> Remarks:
> I have a single parametrized filter (for the entire database) on article
> Studio like so -> ComputerName=HOST_NAME().
> @.partition_option for Studio is obviously 3.
> I have a join filter between Studio and StudioType like so:
> @.filtername = N'StudioTypes_Studios', @.join_articlename = N'Studios',
> @.join_filterclause = N'[StudioTypes].[Id] = [Studios].[StudioTypeId]',
> @.join_unique_key = 0
> Basically I have multiple Studios that belong to the same StudioType
> Question:
> Which @.partition_option can/should I use on article StudioType?
> I know 0 works, but can I use 2 instead?
>
> In order to save you guys some time searching, this page should contain all
> the info required:
> http://technet.microsoft.com/en-us/library/ms152478.aspx
> But I have a problem undestanding whether the join filter creates
> overlapping or nonoverlapping partitions...
> Also, could somebody answer this question as well:
> Does the following - "The Subscriber cannot update columns referenced in a
> parameterized filter." - also apply to columns used in joins or does it only
> apply to the parametrized filter column (ComputerName)?
> I'm guessing not...

Monday, March 12, 2012

Merge replication issue - The subscription to publication is invalid

I am trying to configure a merge replication of publication with 151 table-articles over 128 kbps line via proxy (Win XP, WinProxy), which is used for connection to internet as well.
The whole snapshot runs well, all the data are pumped to the subscriber and all dri, trg etc. scripts are executed without problem, but instead of the message "No data needed to be merged" comes out this error message:

Last Command: {call sp_MSgetreplicainfo(?,?,?,?,?,?,?)}

The subscription to publication 'Katalog' is invalid.
(Source: Merge Replication Provider (Agent); Error number: -2147201019)
--------------------------
General network error. Check your network documentation.
(Source: FANTOM (Data source); Error number: 11)
--------------------------

When I try to replicate the small Northwind database, everything works fine, no errors. When I try to replicate only a few tables from my big database, everything works fine.

Thank you very much for any ideas.The problem is probably in WinProxy. When comunicating without Proxy everything goes OK.|||Hi,

I had seen your psting and asking your help.

How do I use the FTP option in Merge Replication

I am using Merge Replication on SqlServer 2000 with SP2 and MDAC2.7 loaded on my system.
My database version is 8.00.534 on Windows2000 Advancedserver.

Both Publisher and Subscriber are running with same versions.

I created a publication and I created a pull subscription using internet.
I want the subscriber machine to access the Publisher
machine via ftp and get the Snapshot and do
Synchronization.

I had setup the following parameters at the Publisher side
for the publication.

1.Generate snapshots in the following location as

\\myservername\D$\Microsoft SQL Server\MSSQL\REPLDATA\ftp which is UNC shared with full access.

2.Checked - Subscribers can access this folder using FTP

ftpservername -myservername
port-21

Login-Anonymous, no password

3.At subscriber side I had setup SnapshotLocation property as
Download the folder using File Transfer Protocol - checked

I get the following errors at Synchronization time
After configuring subscriber for merge replication i am getting staus as succeeded at the subscriber.

when performing data modifications I am getting following errors during synchronisation time.

Errors

Category:NULL
Source: Merge Replication Provider
Number: -2147201001
Message: The schema script '' could not be propagated to the subscriber.

Category:AGENT
Source: SRVH
Number: 0
Message: The process could not connect to FTP site 'HERITAGEAMERICA' using port 21.

Category:OS
Source:
Number: 12007
Message: The server name or address could not be resolved

The schema script '' could not be propagated to the subscriber. The step failed.

Microsoft conformed this is a bug and that details are
Question number is Q318592.
BUG #: 356652 (SHILOH_BUGS) BUG #: 356652 (SHILOH_BUGS)

Microsoft confirmed that this is a bug when we use different versions check with the Question in microsoft site in fixes.

I am getting same error for same versions also.

Can anyone help me on how to use FTP for accessing
Snapshots?

Thanks|||Hello,

I have not any experience with using FTP for merge replication over internet, we are using VPN connection to the server on port 1433.
But as far as I understood, you do not get the error message when transferring a snapshot but at the moment, when the distributor needs to propagate data changes between publisher and subscriber.
I suppose it is important when do you get the error message: whether on the very beginning of applying the snapshot or at the end.
Also would be useful to check, whether the FTP connection is reliable (proxies, switches etc.).

Caruso|||Hi

May be you can help me wit a minor problem in Merge replication. I am trying to perform merge replication on two SQL Server 2000 databases on Windows Nt 4.0 platform using TCP/IP and FTp. Have set everything in Publication and Subscriber for FTp and the subscriber can connect to publisher.

I am getting the followiing error message afetr running replmerg.exe withh all required parameters for FTP.

Microsoft SQL Server Merge Agent 8.00.194
Copyright (c) 2000 Microsoft Corporation

Connecting to Subscriber 'RAJ'
Connecting to Distributor 'VTPL'
Initializing
Connecting to Publisher 'VTPL'
Retrieving publication information
Retrieving subscription information
Snapshot files will be downloaded via ftp
Connecting to ftp site 'VTPL'
The subscription has been marked for reinitialization. Reinitialization will occur the next time you synchronize this subscription.
The schema script '\\VTPL\C$\Program Files\Microsoft SQL Server\MSSQL\ReplData\ftp\VTPL_Caryaire_F2\2003010 7120306\RightMain_1.sch' could not be propagated to the subscriber.
Category:NULL
Source: Merge Replication Provider
Number: -2147201001
Message: The schema script '\\VTPL\C$\Program Files\Microsoft SQL Server\MSSQL\ReplData\ftp\VTPL_Caryaire_F2\2003010 7120306\RightMain_1.sch' could not be propagated to the subscriber.
Category:AGENT
Source: VTPL
Number: 0
Message: The process could not retrieve file 'VTPL_Caryaire_F2\20030107120306\RightMain_1.sch' from the FTP site 'VTPL'.
Category:OS
Source:
Number: 12003
Message: 200 Type set to I.
200 PORT command successful.
550 VTPL_Caryaire_F2\20030107120306\RightMain_1.sch: The system cannot find the path specified.
550 VTPL_Caryaire_F2\20030107120306\RightMain_1.sch: The system cannot find the path specified.

The process finished. Use CTRL+C to close this window.

I am desparately in need of a solution. Can anyone help me out?

Thanks and regards,
Anamika|||Hi,

Anamika, first thing I would like you to do is check the verison of SQL server 2000. Merge Replication module has some problems. It have been fixed in the SQL server SP3. It is essential to apply this pack on SQL server.

Secondly you need to check ftp settings. your ftp service or root directory of ftp is not configured properly. Due to this you are getting "The process could not retrieve file 'VTPL_Caryaire_F2\20030107120306\RightMain_1.sch' from the FTP site 'VTPL'. "VTPL_Caryaire_F2" parent folder should be root of ftp site.
Details are available in windows or in IIS about ftp configuration.

Friday, March 9, 2012

Merge Replication IIS Worker Process Error

Everyday between 18:00 and 20:00 nearly 1000 PDA Subsriber anonymously
synchronise via Merge Replication and at least two time he have the error :

IIS Worker Process
Faulting application w3wp.exe, version 6.0.3790.1830,
faulting module sscerp20.dll, version 2.0.7331.0,
fault address 0x000110f4.


And subscriber which synchronising meanwhile becomes suspect.


Can someone offer a suggestion as to the cause of and correction for
this
error?


Thanks,


Hakan G


Here is some details about our system:


Client Side
OS: Windows Mobile 2003 4.21.1088
DB: SQL CE 2.0
Microsoft SQL Server CE (ssce20.dll) 2.00.4415.0
Microsoft SQL Server CE Client Agent (ssceca20.dll) 2.00.4415.0
Development Tools: VB.NET 2003
Service Pack: .NET Compact Framework 1.0 SP3


Server Side
OS: Microsoft 2003 SP1
Internet Information Services (INETINFO.EXE) 6.0.3790.1830
(srv03_sp1_rtm.050324-1447)
IIS Worker Process (w3wp.exe) 6.0.3790.1830 (srv03_sp1_rtm.050324-1447)
HW:IBM XSERIES_346 Intel(R) Xeon(TM) CPU 3.60GHZ (2CPU) 5,00 GB RAM DB:
SQL CE 2.0
DB:SQL Server Standart Edition 8.00.2039(SP4)

SQL CE Server 2.0
Microsoft SQL Server CE Server Agent (sscesa20.dll) 2.00.7331.0
Microsoft SQL Server CE Replication Provider (sscerp20.dll) 2.00.7331.0


Merge Replication Properties
--
status : 1
retention : 21
sync_mode : 1
allow_push : 1
allow_pull : 1
allow_anonymous : 1
centralized_conflicts : 1
priority : 100.0
snapshot_ready : 1
publication_type : 1
enabled_for_internet : 0
dynamic_filters : 1
has_subscription : 0
snapshot_in_defaultfolder : 1
alt_snapshot_folder : NULL


Merge Agent Profile:
parameter_name value
--

-BcpBatchSize 100000
-ChangesPerHistory 100
-DestThreads 4
-DownloadGenerationsPerBatch 500
-DownloadReadChangesPerBatch 500
-DownloadWriteChangesPerBatch 500
-FastRowCount 1
-HistoryVerboseLevel 1
-KeepAliveMessageInterval 300
-LoginTimeout 15
-MaxDownloadChanges 0
-MaxUploadChanges 0
-MetadataRetentionCleanup 1
-NumDeadlockRetries 5
-PollingInterval 60
-QueryTimeout 300
-SrcThreads 3
-StartQueueTimeout 300
-UploadGenerationsPerBatch 100
-UploadReadChangesPerBatch 100
-UploadWriteChangesPerBatch 100
-Validate 0
-ValidateInterval 60

You have a high-volumne replication scenario going on there and while I have not seen this specific error, I know you can increase the default thread pool used on the IIS server to broker all of this replication. There is a way to get -SrcThreads 3 to a larger number and I just saw it in the Books OnLine recently - I'll have a look and see if I can give you more details on this.

In the meantime perhaps Laxmi knows how to tune this setting off the top of his head.

-Darren

|||

For configuring SQL Mobile Server Agent on IIS: Here are typical knobs,

1) MAX_THREADS_PER_POOL - No.of threads to handle the incoming sync requests

2) CLEANUP_INTERVAL - Sync sessions cleanup

3) USAGE - Restricting the support only to RDA/Merge/Both

Darren, Sorry I did not get what is meant by SrcThreads.

Thanks,

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Mobile, Microsoft Corporation

Wednesday, March 7, 2012

Merge Replication Enumerations issues

we are using sql server CE on a pocket pc for our salesforce that syncs orders with a SQL2000 sp1 server via merge replication. we had an issue where one person tried to sync and got the error message

The process could not enumerate changes at the 'Subscriber'.

i understand this probably means something is out of sync. however, i am trying to determine what exactly is out of sync. any idea how to do this? i tried to enable vergose logging with the replmerge.exe utility at the command prompt, but becaase it is a mobile device, it could not find the server connected. (we tried connecting to sync the mobile device and running the utility at the same time, but it still did not find it as it said it was not a 'registered' server.)

any help is greatly appreciated.

thanks,
tammyWow! I didn't even know they made a CE version of SQL SErver?

Sorry no help..

Saturday, February 25, 2012

Merge Replication between two servers not connected via internet and on two separate domains

I have two sql server 2000 databases and I wish to do merge replication between them, the problem is that they are not connected via the internet (no ping) and are on two separate domains in different countries.

I can use email and I can use encrypted ftp.

I am wondering if I could use sql ce merge replication to a pocket pc which creates an sdf file, that I then email backwards and forwards and build identical publication and subscriptions at either server to merge sync with this sdf file through a pocket pc.

Has anyone done this before?

Does anyone have any other suggestions?

It's not going to be possible. Merge replication is built with partners that can publish/subscribe to each other. If all you have is email/ftp, you will have to roll your own "merge" - take look at bcp/bulkload/dts in book online.