• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 796
  • Last Modified:

Replication Error: Ambiguous Column Name

I have a SQL server db that has an error when trying to synchronize.
I'ts using a snapshot publication wich is created fine but returns the error after i try to push the subscription by clicking 'start synchronizing'.
how do i debug and/or resolve this error and successfully replicate the db?
'Replication monitor' isn't providing me with much information to work with.

cheers.
0
smash_pants
Asked:
smash_pants
  • 4
  • 3
1 Solution
 
Kevin3NFCommented:
Which agent?  Please post the full and complete error message.  You can get more by adding the following to the command line in the job that runs the failing agent:

-output c:\Agent_Log.txt -outputverboselevel 2

Change the path and filename to something appropriate to your environment.  Take these out when done troubleshooting, as they will continue to grow forever
0
 
smash_pantsAuthor Commented:
I tried rebuilding the publication after i posted the question now i geta different error:


SourceTypeId = 4
SourceName = ODBC SQL Server Driver
ErrorCode = 0
ErrorText = I/O error while writing BCP data-file
The process could not bulk copy out of table '[dbo].[syncobj_0x4332453334443932]'.

the output parameter is on my snapshot agent.




0
 
smash_pantsAuthor Commented:
this was just a drive space issue so we cleared some space and we're back to the original problem.
i'm going to get the debug info now.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
smash_pantsAuthor Commented:
These error details are from the distribution agent:

[7/7/2006 10:24:19 AM]SERVERNAME.SubscriptionDatabase: SET QUOTED_IDENTIFIER ON

[7/7/2006 10:24:19 AM]SERVERNAME.SubscriptionDatabase: drop procedure "spUpdateUserInfo"

[7/7/2006 10:24:19 AM]SERVERNAME.SubscriptionDatabase: CREATE PROCEDURE "spUpdateUserInfo"(
@UName varchar(20),
@Login_Username varchar(20),
@Login_Password varchar(15),
@Login_Email varchar(60),
@CustomerNum char(10),
@Company varchar(100),
@Contact varchar(60),
@Address varchar(500),
@City varchar(30),
@PostCode varchar(4),
@Phone varchar(16),
@Fax varchar(16),
@Active bit,
@Rep char(10),
@Access varchar(10),
@Parent varchar(20)
) as
update tbluserlogin
set
Login_Username =@Login_Username,
Login_Password=@Login_Password,
Login_Email=@Login_Email,
CustomerNum=@CustomerNum,
Company=@Company,
Contact=@Contact,
Address = @Address,
City =@City,
PostCode=@PostCode,
Phone =@Phone,
Fax=@Fax,
Active=@Active,
Rep=@Rep,
Access=@Access,
Parent=@Parent
from "PublicationDatabase".dbo.tblUserLogin
where Login_Username = @UName

Agent message code 20046. Ambiguous column name 'Login_Username'.
[7/7/2006 10:24:19 AM]SERVERNAME.distribution: {call sp_MSadd_distribution_history(18, 6,  ?, ?, 0, 0, 0.00, 0x01, 1, ?, 17, 0x01, 0x01)}
Adding alert to msdb..sysreplicationalerts: ErrorId = 43,
Transaction Seqno = 000002600000893800c800000001, Command ID = 17
Message: Replication-Replication Distribution Subsystem: agent SERVERNAME-PublicationDatabase-SERVERNAME-18 failed. Ambiguous column name 'Login_Username'.[7/7/2006 10:24:19 AM]SERVERNAME.distribution: {call sp_MSadd_repl_alert(3, 18,  43, 14151, ?, 17, N'SERVERNAME', N'PublicationDatabase', N'SERVERNAME', N'SubscriptionDatabase', ?)}
ErrorId = 43, SourceTypeId = 5
ErrorCode = '209'
ErrorText = 'Ambiguous column name 'Login_Username'.'
[7/7/2006 10:24:19 AM]SERVERNAME.distribution: {call sp_MSadd_repl_error(43, 0,  5, ?, N'209', ?)}

Category:SQLSERVER
Source:  SERVERNAME
Number:  209
Message: Ambiguous column name 'Login_Username'.
[7/7/2006 10:24:19 AM]SERVERNAME.SubscriptionDatabase: exec dbo.sp_MSupdatelastsyncinfo N'SERVERNAME',N'PublicationDatabase', N'', 0, 6, N'Ambiguous column name ''Login_Username''.'
Disconnecting from Subscriber 'SERVERNAME'
Disconnecting from Distributor 'SERVERNAME'
Disconnecting from Distributor History 'SERVERNAME'
0
 
Kevin3NFCommented:
Go open spUpdateUserInfo in Enterprise Manager and try to parse it....something wrong in the code is causing the Create Procedure to fail onthe subscriber
0
 
smash_pantsAuthor Commented:
Thanks to the -output c:\Agent_Log.txt -outputverboselevel 2 you told me i was able debug it my self so thanks for the help.
0
 
Kevin3NFCommented:
What was the solution?
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now