Re: error 80004005 while INITIALIZE sql server CE



hi Rick,
Thanx for the reply...

I removed lines defininig distributor properties from my above code and
initialization worked fine. now the problem is with synchronisation

I tried changing IIS account to a domain user and assigned the same
values to
CEMerge->put_InternetLogin(L"sudha");
CEMerge->put_InternetPassword(L"<user sudha password>");
with no use.

synchronizing gives the error:

error 1 of 3
Source: SQL Server 2000 Windows CE edition
Native error: 29045
HR: 80045901
Description: initializing SQL server Reconciler has failed
....
....
error 2 of 3
Source: Merge process
Native error: 0
HR: 00004E74
Description: The process could not connect to distributors 'SQLSERVER'
....
....
error 3 of 3
Source: 'SQLSERVER'
Native error: 0
HR: 00000011
Description: SQL server does not exist or access denied
....
....
* Snapshot folder 'REPLDATA' is created in c$. the folder is shatred
and permissions set
* Have set SQL SERVER logon permissions as user->sudha. Domain user
sudha has administrative privilages. I am able to run SQL server on
native system using this windows authentication
* Virtual directory is set to use annonymous account and have set IIS
annonymous account as user sudha instead of \\IUSR_computername
* creating virtual folder sql sets the below permissions
NTFS permissions for SUDHA
On sql serer CE server agent: read and execute, read
sscesa20.dll

on temporary file location full, read and execute, read, write
c:\program files\microsoft sql server CE 2.0\server\

on sql snapshot folder full, read and execute, read, write
\\RISPL0155KIR\C\REPLDATA
* running http://rispl0155KIR/sql/sscesa20.dll displays "SQL server CE
server Agent", both on my reader and native system with command
http://localhost/sql/sscesa20.dll
* i am able to ping SQL SERVER from an other system

Here is my modified code

void InitializeReplicationRDA()
{
HRESULT hr;
hr = CoInitializeEx(NULL, COINIT_MULTITHREADED); //initialize com port
hr = CoCreateInstance(CLSID_Replication,
NULL,
CLSCTX_INPROC_SERVER,
IID_ISSCEMerge,
(LPVOID *)&CEMerge);

//INSTANCE is created without error

CEMerge->put_InternetURL(L"http://rispl0155kir/sql/sscesa20.dll";);
CEMerge->put_InternetLogin(L"sudha");
CEMerge->put_InternetPassword(L"<user sudha password>");
CEMerge->put_Publisher(L"SQLSERVER");
CEMerge->put_PublisherDatabase(L"southwind");
CEMerge->put_Publication(L"southwind");

CEMerge->put_PublisherSecurityMode((REPL_SECURITY_TYPE)DB_
AUTHENTICATION);
CEMerge->put_PublisherSecurityMode(NT_AUTHENTICATION);

CEMerge->put_PublisherLogin(L"sudha");
CEMerge->put_PublisherPassword(L"<user sudha password>");
CEMerge->put_PublisherNetwork((REPL_NETWORK_TYPE)DEFAULT_N ETWORK);

CEMerge->put_Subscriber(L"southwind");
CEMerge->put_SubscriberConnectionString(L"Provider=microso
ft.sqlserver.oledb.ce.2.0;Data
Source=southwind.sdf");

CEMerge->put_ExchangeType((REPL_EXCHANGE_TYPE)BIDIRECTIONA L);
CEMerge->put_Validate(NO_VALIDATION);

hr = CEMerge->AddSubscription(CREATE_DATABASE);

if (SUCCEEDED(hr))
{
swprintf(wszBuffer, L"Subscription added\r\n\r\n");
MessageBox(NULL, wszBuffer, L" A D D S U B S C R I P T I O N ",
MB_OK);
}
else
MessageBox (NULL, TEXT("S U B S C R I P T I O N F A I L E D"),
TEXT("error"), MB_OK);

//SUBSCRIPTION works without any error

hr = CEMerge->Initialize();

//NO ERROR TILL THIS POINT

if (SUCCEEDED(hr))
{
MessageBox (NULL, TEXT("Run SUCCESS"), TEXT("SUCCESS!!!"), MB_OK);
LONG lPubChanges;
LONG lPubConflicts;
LONG lSubChanges;
GetLocalTime(&systemtime);
SystemTimeToFileTime(&systemtime, (FILETIME*)&timeStop);
timeTotal = ((double)(timeStop - timeStart) / 10000000);

CEMerge->get_PublisherChanges(&lPubChanges);
CEMerge->get_PublisherConflicts(&lPubConflicts);
CEMerge->get_SubscriberChanges(&lSubChanges);

swprintf(wszBuffer, L"Synchronization Complete\r\n\r\nElapsed time in
seconds = %8.3f\r\nPublisher Changes = %d\r\nPublisher Conflicts =
%d\r\nSubscriber Changes = %d", timeTotal, lPubChanges, lPubConflicts,
lSubChanges);
MessageBox(g_hwndMain, wszBuffer, L" S Y N C H R O N I Z E ",
MB_OK);
}
else
MessageBox (NULL, TEXT(" S Y N C H R O N I Z E F A I L E D"),
TEXT("error"), MB_OK);

if (fInitialized)
(void)CEMerge->Terminate();
....
....

Now where on earth am i doing wrong....i have spent umpteen hrs on net
for solution with no avail

Rehards,
sudha

.



Relevant Pages

  • SQL 2000 Transactional over VPN
    ... We have a 10 GB database replicating to a disaster recovery site using ... SQL Server does not exist or access denied. ... Why doesn't a subscription initialization pick up where it left off ... What agent profile settings could be changed in the agent to avoid having ...
    (microsoft.public.sqlserver.replication)
  • Re: Why allow merge subscriptions to expire?
    ... will the data be so far out of sync ... that an initialization would be easier. ... If you are using global priorities, ... Paul Ibison SQL Server MVP, ...
    (microsoft.public.sqlserver.replication)
  • Re: Creation of Indexes on the subscriber database
    ... If the initialization ... this anyway to avoid errors clogging up unrelated publications). ... Paul Ibison SQL Server MVP, ...
    (microsoft.public.sqlserver.replication)
  • Re: Set up merge replication in non-domain environment
    ... Pls can you try using FTP for the initialization, ... Paul Ibison SQL Server MVP, ... (recommended sql server 2000 replication book: ...
    (microsoft.public.sqlserver.replication)
  • Re: Replicating the schema while preserving existing data
    ... provided you haven't done a nosync ... initialization. ... Just synchronizing will be enough. ... Paul Ibison SQL Server MVP, ...
    (microsoft.public.sqlserver.replication)