Groups | Blog | Home
all groups > sql server replication > august 2005 >

sql server replication : SQLDistribution Initialize Error



Will T
8/12/2005 7:48:06 AM
With the following code I get the error Method 'Initialize' of object
'ISQLDistribution' failed.
The .Status at this time is "Connecting to Subscriber 'MYCOMPUTERNAME' "

I have a SQLDistribution Object called sqlDist.
The error occurs on the .Initialize

Can anyone help?

/* START CODE SECTION */
With sqlDist
' set up the Distributor
.Distributor = "DATASERVER"
.DistributorSecurityMode = DB_AUTHENTICATION
.DistributorLogin = "sa"
.DistributorPassword = "xxxx"

' set up the Publisher
.Publication = "PUB01"
.Publisher = "DATASERVER"
.PublisherDatabase = "PUBDB01"
.PublisherSecurityMode = DB_AUTHENTICATION
.PublisherLogin = "sa"
.PublisherPassword = "xxxx"

' set up the Subscriber
.Subscriber = "MYCOMPUTERNAME"
.SubscriberDatabase = "PUBDB01"
.SubscriberDatasourceType = SQL_SERVER
.SubscriberSecurityMode = DB_AUTHENTICATION
.SubscriberLogin = "sa"
.SubscriberPassword = "xxxx"

.LoginTimeout = 240
.QueryTimeout = 240

' set up the Subscription
.SubscriptionType = ANONYMOUS

.Initialize
.Run
End With
/* END CODE SECTION */


Will T
8/12/2005 8:23:56 AM
I have found that by adding the following code, I get better error
information. Now I am getting an access violation error. I guess I will have
to figure that one out by myself.

/* START CODE SECTION */
On Error Goto Error_MySub
Dim errObj As SQLReplError

(insert other code here)

Error_MySub:
For Each errObj in sqlDist.ErrorRecords
MsgBox errObj.Description
Next
/* END CODE SECTION */

[quoted text, click to view]

Raymond Mak [MSFT]
8/12/2005 2:22:01 PM
Hi Will,

Sorry for the lack of response from our end so far, I don't monitor the
newgroup as regulary as I would like. Given that this is an AV, chances are
good that 1) there is a dll mismatch somewhere, or 2) there is a really bad
bug in our code. If you are running SQL2000SP3 or above, you should be able
to upload the memory dump for the crash via Watson. The unfortunate part is
that it typically takes quite a bit of time for the dump to get to the right
place (~weeks). As such, if you are comfortable with using a debugger (windbg
can be downloaded from the microsoft website for free), it would be great if
you hook the debugger up to your process, get the textual stack of when the
crash happens, and post it here. The stack can also give you valuable clue as
to which dll may be causing you trouble if this is indeed a dll mismatch
issue.

Given that blatent crash bugs like the one you described are relatively rare
(or so we would like to think), I am inclined to suspect that this is a dll
mismatch issue. Along this line, here is the list of files that you would
want to check and see if their versions "line-up" (not necessary the same,
post them here and we may be able to find out):

C-runtime libraries: msvc*dll in system32
ODBC drivers: sqlsrv32.dll, rll, odbcbcp.dll in system32
Replication components: sqldistx.dll, replres.rll, rdistcom.dll under
%ProgramFiles%\Microsoft SQL Server\80\COM

Other "red-flags" to consider include whether any SQL2005 betas had ever
been installed on the machine.

I would also strongly encourage you to open a case for this with Microsoft
Customer Support, they may be able to resolve the issue quicker.

HTH

-Raymond

C-runtime libara
[quoted text, click to view]
Will T
8/17/2005 8:26:24 AM
This machine is running SQL Server 7, as is the server. The program is VB6
SP6. I'm not sure that a lot of what you said will apply to this issue.

"Raymond Mak [MSFT]" <RaymondMakMSFT@discussions.microsoft.com> wrote in
message news:19B0AD65-04B4-4855-A20A-6B59502D8207@microsoft.com...
[quoted text, click to view]

AddThis Social Bookmark Button