Re: Replication Problem
From: Flintstone (spamme_at_internet.com)
Date: 09/21/04
- Next message: Boromir: "Re: SQL Query very slow!!!!!!!!"
- Previous message: RonF: "RE: Partial Replication"
- In reply to: Kevin Collins \(MS - SQL Mobile\): "Re: Replication Problem"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 21 Sep 2004 09:43:35 -0300
Well...
>
> It appears that there is a issue with the security
> context on connecting to the distributor database.
>
In a way, it really was. I decided to log in at my Windows Server as
IUSR_WS12, and could not access (not even find) my SQL Server - when I tried
to connect, occurred that error "Data source name not found and no default
driver specified". IUSR_WS12 was only in "guests" user group on my server. I
also tried putting it on the "users" group, but finally worked only when I
put IUSR_WS12 at the "administrators" group. So, everything is working, and
later I find out how to let a guest or an user access my sql server.
Thanks for the attention and for the suggestions...
[]s!
Daniel.
--
Fudiotes, desencatum.
Vita brevis...
"Kevin Collins (MS - SQL Mobile)" <kevincol@online.microsoft.com> escreveu
na mensagem news:OxaMb1bmEHA.3372@TK2MSFTNGP15.phx.gbl...
> You are using the same properties with eVB and the sync works? The error
> that is returned is a SQL Server error and is independant of SQL Server
CE,
> so regardless if you are using eVB or VS.NET 2003 is irrelevant to the
> server. Can you ensure that the properties that you are using in eVB are
> the same values in your VS.NET 2003 code? Also, can you verify that the
eVB
> application still works without issue?
>
> Another thing to try is to create a subscription database via Enterprise
> Manager and see if you get the error about connecting to the Distributor.
> This would eliminate anything that has to do with SQL Server CE. It
appears
> that there is a issue with the security context on connecting to the
> distributor database.
>
> Also, please try again and comment out this line of code.
>
> sqlReplication.PublisherSecurityMode = SecurityType.DBAuthentication;
>
> The default property for this should be sufficient and you shouldn't need
to
> list it unless you are using Windows Auth.
>
> You are also positive that you are using mixed mode for the SQL Server?
> When you connect up via Enterprise Manager you connect up using a SQL user
> login and password and not a windows account?
>
> "Flintstone" <spamme@internet.com> wrote in message
> news:%23Pg2k8YmEHA.3060@TK2MSFTNGP14.phx.gbl...
> > Resposting an old-but-still-present problem.
> >
> > Ok... I'm gonna try to post every detail I can.
> >
> > - I'm using Windows 2000 Server. My workstation's name is WS12.
> > - I have an instalation of SQL Server 2000, with the default instance
> > name (WS12).
> > - I created a merge publication at my SQL Server 2000. I set
> > that option for SQL Server CE Databases. My database is "pesquisa", and
> > the
> > publication name is "pesquisaCE".
> > - The default snapshot folder (AND the snapshot folder I configured
at
> > my publication) is \\ws12\snapshot. I configured the sharing AND the
> > security options to let the user WS12\IUSR_WS12 with full control over
the
> > folder.
> > - The snapshot agent runs successfully.
> > - At the "SQL Server CE Connectivity Management" I set the HTTP
Content
> > Folder with read permission ("C:\Arquivos de programas\Microsoft SQL
> > Server
> > CE 2.0\Server\"), the HTTP Authentication with Anonymous acess (for the
> > user
> > WS12\IUSR_WS12), and at NTFS Permissions I configure the accesses:
> > - SQL Server CE Agent - Read & Execute, Write.
> > - Temporary File Location (C:\Arquivos de programas\Microsoft SQL
> > Server CE 2.0\Server\) - Read & Execute, Read, Write.
> > Then, clicking next, I check the option "One or more applications
> > requiring SQL Server Replication". And then I put the same path for the
> > snapshot folder, \\ws12\snapshot. Permissions: all of them, full access.
> > - At Enterprise Manager, I also do the following: created a login for
> > the user WS12\IUSR_WS12, with the defaul database set to "pesquisa", the
> > System Administrators server role, and the Public AND db_owner database
> > roles for the databases distribution AND pesquisa.
> > - Well... what else... I already set the SQL Server Agent to run over
> > my
> > account (I'm at administrator's group), over Administrator's account,
> > whatever.
> > - At last: when I try to access the URL
> > "http://ws12/pesquisa/sscesa20.dll" from the pocket's (or emulator's)
> > INternet explorer, it DOES return me the expected: "SQL Server CE Server
> > Agent".
> >
> > So... I'm trying to replicate the database to a Windows Mobile 2003,
> > using Visual Studio .Net 2003. Deploying on the Emulator or on the
Device
> > the result is the same. I take the error message and write into a file
on
> > my
> > workstation. The error is:
> >
> > 24/8/2004 11:54:58 - Error:
> > (0) - (29045) Initializing SQL Server Reconciler has failed. [,,,,,]
> > (1) - (0) The process could not connect to Distributor 'WS12'.
> > (2) - (0) Data source name not found and no default driver specified
> >
> > That's my C# code:
> >
> > /*************************************************/
> > try
> > {
> > // Set the Replication object.
> > sqlReplication = new SqlCeReplication();
> > sqlReplication.InternetUrl =
> > "http://ws12/pesquisa/sscesa20.dll";
> > // sqlReplication.InternetLogin = "WS12\\IUSR_WS12";
> > // sqlReplication.InternetPassword = "ippasswd";
> >
> > // sqlReplication.Distributor = "WS12";
> > // sqlReplication.DistributorSecurityMode =
> > SecurityType.NTAuthentication;
> > sqlReplication.Publisher = "WS12";
> > sqlReplication.PublisherDatabase = "pesquisa";
> > sqlReplication.Publication = "pesquisaCE";
> > sqlReplication.PublisherSecurityMode =
> > SecurityType.DBAuthentication;
> > sqlReplication.PublisherLogin = "sa";
> > sqlReplication.PublisherPassword = "sapasswd";
> >
> > sqlReplication.SubscriberConnectionString =
> > sSubscriberConnectionString;
> > sqlReplication.Subscriber = "SQLCE_PESQUISA_01";
> >
> > // Create the Local SSCE Database subscription.
> > sqlReplication.AddSubscription(AddOption.CreateDatabase);
> >
> > sqlReplication.Synchronize();
> >
> > return true;
> > }
> > catch(SqlCeException e)
> > {
> > File.Delete(sDBFileName);
> > p_sError = "Error: " + Convert.ToChar(13) +
> > this.extractErrors(e.Errors);
> > return false;
> > }
> >
> > /*************************************************/
> >
> > The commented lines was already uncommented once. With no success.
> >
> > The execution throws the exception on the Synchronize() method. The
> > AddSubscription creates the database file, that's why on every execution
I
> > delete the file, when the exception is handled.
> >
> > I tryed many combinations, did the same steps a lot of times......
but
> > the error is always the same. I got exhausted... please, some help! I
> > already made it work when I implemented the same thing for a Windows
> > Mobile
> > 2002, using EVB... and it works... so now I try to do the same thing at
> > Visual Studio .Net, "oh, that's powerful, that might work fine"........
> > and
> > nothing at all, still.
> >
> > Thanks for any help...
> >
> > Daniel.
> > --
> >
> > --
> > Fudiotes, desencatum.
> > Vita brevis...
> >
> > --
> > Pr bo entend me pala bas!
> > "Brian Sabino [MS]" <briansa@online.microsoft.com> escreveu na mensagem
> > news:OZpmIuXeEHA.2764@TK2MSFTNGP11.phx.gbl...
> >> You should be calling Sync() to do the first sync, not Reinit(). Also
> > make
> >> sure that you're calling AddSubscription on the database before the
first
> >> sync.
> >>
> >> --
> >> This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> >>
> >>
> >> "Flintstone" <spamme@internet.com> wrote in message
> >> news:uvJWFoVeEHA.2440@tk2msftngp13.phx.gbl...
> >> > "The SQL Server CE database is not enabled for replication. [,,,,,]"
> >> >
> >> > How do I solve that?
> >> >
> >> > - I created a merge replication (for SQL Server CE databases) at my
SQL
> >> > Server 2000;
> >> > - I configured the connectivity stuff on my IIS, the snapshot folder,
> >> > permissions, etc. Runned the snapshot agent and "A snapshot of 7
> >> article(s)
> >> > was generated.";
> >> > - I'm using VS.NET 2003 to develop an application that creates a
> >> > subscription and accesses my SQL Server 2000 (testing on my
emulator).
> >> > - I create the subscriptions configuring all parameters, it creates
the
> >> > database on my pocket pc 2003 emulator (but not the tables, yet), and
> > when
> >> I
> >> > call ReinitializeSubscription(true) it throws and exception with the
> >> message
> >> > above.
> >> >
> >> > Thanks for any help.
> >> >
> >> > []s!
> >> > Daniel.
> >> >
> >> > --
> >> > Fudiotes, desencatum.
> >> > Vita brevis...
> >> >
> >> >
> >> >
> >>
> >>
> >
> >
> >
>
>
- Next message: Boromir: "Re: SQL Query very slow!!!!!!!!"
- Previous message: RonF: "RE: Partial Replication"
- In reply to: Kevin Collins \(MS - SQL Mobile\): "Re: Replication Problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|