all groups > sql server replication > august 2006 >
You're in the

sql server replication

group:

Error: Syntax error or access violation



Error: Syntax error or access violation emgeneral
8/31/2006 2:41:01 PM
sql server replication: In my replication, I noticed the following error. Can you guide me to the
right direction to troubleshoot this.

In the Last command section:
{CALL sp_MSins_GCFD$Sales Header (0x0000000001b52c48, 1, 'ORD211801', '',
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 2006-08-31
00:00:00.000, 2006-09-01 00:00:00.000, 2006-09-01 00:00:00.000, 'Order
ORD211801', '', 1753-01-01 00:00:00.000, 0.00000000000000000000, 1753-01-01
00:00:00.000, '', '', '', '', '', '', 0.00000000000000000000, '', 0, 0, '',
'', '', '', '', 0, '', 0, '', '', '', 0, 0, '', '', '', '', '', 0, '', '', 0,
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''
Transaction sequence number and command ID of last execution batch are
0x00000112000A10E3000100000000 and 1.

Error messages section:
{CALL sp_MSins_GCFD$Sales Header (0x0000000001b52c48, 1, 'ORD211801', '',
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 2006-08-31
00:00:00.000, 2006-09-01 00:00:00.000, 2006-09-01 00:00:00.000, 'Order
ORD211801', '', 1753-01-01 00:00:00.000, 0.00000000000000000000, 1753-01-01
00:00:00.000, '', '', '', '', '', '', 0.00000000000000000000, '', 0, 0, '',
'', '', '', '', 0, '', 0, '', '', '', 0, 0, '', '', '', '', '', 0, '', '', 0,
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''
Transaction sequence number and command ID of last execution batch are
0x00000112000A10E3000100000000 and 1.

Error details section:
Syntax error or access violation
(Source: GCFD-SQLWMS (ODBC); Error number: 37000)

------------------------------------------------------------------------------------------------

I tried this on different hours to eliminate the conflicts that might be
involved during operational hours. However, it didn't solve the problem.

EM

Re: Error: Syntax error or access violation Paul Ibison
9/1/2006 12:00:00 AM
Can you tell me what service pack and version you're on, and post up the
schema of the offending table and I'd like to repro.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com

Re: Error: Syntax error or access violation emgeneral
9/1/2006 7:39:01 AM

Thanks for the help. I am running sql server2000 sp3 version 8 (windows 2003
server).

Here is the complete detail of what's going on. I setup the transactional
replication to occur every hour and the initial replication synchronized
successfully. This error occurred on the next scheduled time.

Here is the information I generated from sql server for this problematic
table:

if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[GCFD$Sales Header]') and OBJECTPROPERTY(id,
N'IsUserTable') = 1)
drop table [dbo].[GCFD$Sales Header]
GO

CREATE TABLE [dbo].[GCFD$Sales Header] (
[timestamp] [timestamp] NOT NULL ,
[Document Type] [int] NOT NULL ,
[No.] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Sell-to Customer No.] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS
NOT NULL ,
[Bill-to Customer No.] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS
NOT NULL ,
[Name] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Name 2] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Address] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Address 2] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[City] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Contact] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Your Reference] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[Ship-to Code] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Ship-to Name] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Ship-to Name 2] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[Ship-to Address] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[Ship-to Address 2] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[Ship-to City] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Ship-to Contact] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[Order Date] [datetime] NOT NULL ,
[Posting Date] [datetime] NOT NULL ,
[Shipment Date] [datetime] NOT NULL ,
[Posting Description] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS
NOT NULL ,
[Payment Terms Code] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS
NOT NULL ,
[Due Date] [datetime] NOT NULL ,
[Payment Discount %] [decimal](38, 20) NOT NULL ,
[Pmt. Discount Date] [datetime] NOT NULL ,
[Shipment Method Code] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS
NOT NULL ,
[Location Code] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[Department Code] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[Project Code] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Customer Posting Group] [varchar] (10) COLLATE
SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Currency Code] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[Currency Factor] [decimal](38, 20) NOT NULL ,
[Price Group Code] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[Prices Including Tax] [tinyint] NOT NULL ,
[Allow Quantity Disc.] [tinyint] NOT NULL ,
[Invoice Disc. Code] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS
NOT NULL ,
[Cust./Item Disc. Gr.] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS
NOT NULL ,
[Language Code] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[Salesperson Code] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[Order Class] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[No. Printed] [int] NOT NULL ,
[On Hold] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Applies-to Doc. Type] [int] NOT NULL ,
[Applies-to Doc. No.] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS
NOT NULL ,
[Bal. Account No.] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[Job No.] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Ship] [tinyint] NOT NULL ,
[Invoice] [tinyint] NOT NULL ,
[Shipping No.] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Posting No.] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Last Shipping No.] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[Last Posting No.] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[VAT Registration No.] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS
NOT NULL ,
[Combine Shipments] [tinyint] NOT NULL ,
[Reason Code] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Gen. Bus. Posting Group] [varchar] (10) COLLATE
SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[EU 3-Party Trade] [tinyint] NOT NULL ,
[Transaction Type] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[Transport Method] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[VAT Country Code] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[Sell-to Customer Name] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS
NOT NULL ,
[Sell-to Customer Name 2] [varchar] (30) COLLATE
SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Sell-to Address] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[Sell-to Address 2] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[Sell-to City] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Sell-to Contact] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[ZIP Code] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[State] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Country Code] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Sell-to ZIP Code] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[Sell-to State] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[Sell-to Country Code] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS
NOT NULL ,
[Ship-to ZIP Code] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[Ship-to State] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[Ship-to Country Code] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS
NOT NULL ,
[Bal. Account Type] [int] NOT NULL ,
[Exit Point] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Correction] [tinyint] NOT NULL ,
[Document Date] [datetime] NOT NULL ,
[External Document No.] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS
NOT NULL ,
[Area] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Transaction Specification] [varchar] (10) COLLATE
SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Payment Method Code] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS
NOT NULL ,
[Shipping Agent Code] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS
NOT NULL ,
Re: Error: Syntax error or access violation emgeneral
9/1/2006 8:33:02 AM
In addition, I just tried a replication on this table "gcfd$Sales header" and
it produced similar error message. See below:

Last command:
{CALL sp_MSupd_GCFD$Sales Header
(0x0000000001b60145,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL
Transaction sequence number and command ID of last execution batch are
0x000001120013F83A000100000000 and 3.

Error message:
Syntax error or access violation

Error details:
Syntax error or access violation
(Source: GCFD-SQLWMS (ODBC); Error number: 37000)

I am beginning to suspect that it might be the data in this table causing
replication error. Is there anyway to perform and check for invalid
characters entered in the table to elminate this possibility?

EM



[quoted text, click to view]
RE: Error: Syntax error or access violation emgeneral
9/1/2006 9:43:02 AM
I have a rather large size of data so I took 15 records from the table for
this purpose. This is a text-delimited file with the first line for field
names.

"timestamp","Document Type","No.","Sell-to Customer No.","Bill-to Customer
No.","Name","Name 2","Address","Address 2","City","Contact","Your
Reference","Ship-to Code","Ship-to Name","Ship-to Name 2","Ship-to
Address","Ship-to Address 2","Ship-to City","Ship-to Contact","Order
Date","Posting Date","Shipment Date","Posting Description","Payment Terms
Code","Due Date","Payment Discount %","Pmt. Discount Date","Shipment Method
Code","Location Code","Department Code","Project Code","Customer Posting
Group","Currency Code","Currency Factor","Price Group Code","Prices Including
Tax","Allow Quantity Disc.","Invoice Disc. Code","Cust./Item Disc.
Gr.","Language Code","Salesperson Code","Order Class","No. Printed","On
Hold","Applies-to Doc. Type","Applies-to Doc. No.","Bal. Account No.","Job
No.","Ship","Invoice","Shipping No.","Posting No.","Last Shipping No.","Last
Posting No.","VAT Registration No.","Combine Shipments","Reason Code","Gen.
Bus. Posting Group","EU 3-Party Trade","Transaction Type","Transport
Method","VAT Country Code","Sell-to Customer Name","Sell-to Customer Name
2","Sell-to Address","Sell-to Address 2","Sell-to City","Sell-to
Contact","ZIP Code","State","Country Code","Sell-to ZIP Code","Sell-to
State","Sell-to Country Code","Ship-to ZIP Code","Ship-to State","Ship-to
Country Code","Bal. Account Type","Exit Point","Correction","Document
Date","External Document No.","Area","Transaction Specification","Payment
Method Code","Shipping Agent Code","Package Tracking No.","No.
Series","Posting No. Series","Shipping No. Series","Tax Area Code","Tax
Liable","Tax Bus. Posting Group","Reserve","Applies-to ID","VAT Base Discount
%","Ship-to UPS Zone","Tax Exemption No.","Shipper","Shipped","Hold
Override","Hold Override UserID","Agency Hold","Order Type","Receiver","Ready
to Pick","USDADry Picker Name","USDADry Start Time","USDADry Finish
Time","Agency Arrival Time","Agency Departure Time","No. of Out of Stock
Codes","No. of Refused Stock Codes","Come Back Order","No. Pallets
Provided","No. Pallets Returned","Order Checker Name","Frozen Picker
Name","Frozen Start Time","Frozen Finish Time","Refrigerated Picker
Name","Refrigerated Start Time","Refrigerated Finish Time","Dry Picker
Name","Dry Start Time","Dry Finish Time","Order Checker Start Time","Order
Checker Finish Time","Order Taken By","Date Order Taken","Time Order
Taken","Released By","Released Date","Released Time","Order Method","Fund
Code","Function Code","Branch Code","Program No.","Released","Grant
No.","Shopper","Last Modified By","Last Modified Date","Last Modified
Time","Delivery Info","Delivery Zone","UNC County","UNC Federal Congressional
Dist","UNC State Congressional Dist","UNC Program Category","FBC Program
Category","FBC Geographical Location","FBC Metropolitan Area","FBC Agency
Category","Picked","Pickup Time","msrepl_tran_version"
0000000001B55D57,1,"ORD210388","A90023","A90000","Food Box - City of
Chicago","","","","","","","","Food Box-Trina Davila","","4347 W.
Armitage","","Chicago","",2006-08-31 00:00:00,2006-08-17 00:00:00,2006-08-17
00:00:00,"Order ORD210388","NET90",2006-11-15
00:00:00,.00000000000000000000,2006-08-17
00:00:00,"","","000","","FOODBOX","",.00000000000000000000,"",0,1,"A90000","","","","",1,"",0,"","","",0,0,"","","","","",0,"","FOODBOX",0,"","","","Food
Box-Trina Davila","","4347 W. Armitage","","Chicago","Vicente
Barreiro","","","","60647","IL","","60647","IL","",0,"",0,2006-08-17
00:00:00,"","","","","","","","A-INV+","A-SHPT","",0,"",2,"",.00000000000000000000,"","","",0,0,"",0,"FOODBOX","",0,"",1753-01-01
00:00:00,1753-01-01 00:00:00,1753-01-01 00:00:00,1753-01-01
00:00:00,"","",0,"","","","",1753-01-01 00:00:00,1753-01-01
00:00:00,"",1753-01-01 00:00:00,1753-01-01 00:00:00,"",1753-01-01
00:00:00,1753-01-01 00:00:00,1753-01-01 00:00:00,1753-01-01
00:00:00,"JNELSON",2006-08-31 00:00:00,1754-01-01
09:06:03.513000000,"DWRIGHT",2006-08-31 00:00:00,1754-01-01
09:40:29.893000000,0,"9","","","BX00050",1,"","","DWRIGHT",2006-08-31
00:00:00,1754-01-01
09:40:34.063000000,"","","","","","PURCHASE","FOODBOX","","","",0,1753-01-01
00:00:00,{44A7059E-7CBB-48A6-A491-156980141B71}
0000000001B00068,1,"ORD210675","A90006","A90000","Food Box - City of
Chicago","","","","","","","","Food Box - N Area Comm Srv O","","4740 N.
Sheridan Ave.","","Chicago","",2006-08-14 00:00:00,2006-08-15
00:00:00,2006-08-15 00:00:00,"Order ORD210675","NET90",2006-11-12
00:00:00,.00000000000000000000,2006-08-14
00:00:00,"","","000","","FOODBOX","",.00000000000000000000,"",0,1,"A90000","","","","",1,"",0,"","","",0,0,"","","","","",0,"","FOODBOX",0,"","","","Food
Box - N Area Comm Srv O","","4740 N. Sheridan Ave.","","Chicago","Joan
Fabiano","","","","60640","IL","","60640","IL","",0,"",0,2006-08-14
00:00:00,"","","","","","","A-ORD","A-INV+","A-SHPT","",0,"",2,"",.00000000000000000000,"","","",0,0,"",0,"FOODBOX","",0,"",1753-01-01
00:00:00,1753-01-01 00:00:00,1753-01-01 00:00:00,1753-01-01
00:00:00,"","",0,"","","","",1753-01-01 00:00:00,1753-01-01
00:00:00,"",1753-01-01 00:00:00,1753-01-01 00:00:00,"",1753-01-01
00:00:00,1753-01-01 00:00:00,1753-01-01 00:00:00,1753-01-01
00:00:00,"DWRIGHT",2006-08-14 00:00:00,1754-01-01
13:47:01.807000000,"DWRIGHT",2006-08-14 00:00:00,1754-01-01
13:49:26.747000000,0,"9","","","BX00021",1,"","","DWRIGHT",2006-08-14
00:00:00,1754-01-01
13:49:30.483000000,"","","","","","PURCHASE","FOODBOX","","","",0,1753-01-01
00:00:00,{9C716525-6C44-4156-AEB7-6FD30E3D6330}
0000000001AD0EF0,1,"ORD210677","A90021","A90000","Food Box - City of
Chicago","","","","","","","","Food Box- Garf Comm Svc Off","","10 S.
Kedzie","","Chicago","",2006-08-14 00:00:00,2006-08-15 00:00:00,2006-08-15
00:00:00,"Order ORD210677","NET90",2006-11-12
00:00:00,.00000000000000000000,2006-08-14
00:00:00,"","","000","","FOODBOX","",.00000000000000000000,"",0,1,"A90000","","","","",1,"",0,"","","",0,0,"","","","","",0,"","FOODBOX",0,"","","","Food
Box- Garf Comm Svc Off","","10 S. Kedzie","","Chicago","Andrew
Brown","","","","60612","IL","","60612","IL","",0,"",0,2006-08-14
00:00:00,"","","","","","","A-ORD","A-INV+","A-SHPT","",0,"",2,"",.00000000000000000000,"","","",0,0,"",0,"FOODBOX","",0,"",1753-01-01
00:00:00,1753-01-01 00:00:00,1753-01-01 00:00:00,1753-01-01
00:00:00,"","",0,"","","","",1753-01-01 00:00:00,1753-01-01
00:00:00,"",1753-01-01 00:00:00,1753-01-01 00:00:00,"",1753-01-01
00:00:00,1753-01-01 00:00:00,1753-01-01 00:00:00,1753-01-01
00:00:00,"DWRIGHT",2006-08-14 00:00:00,1754-01-01
13:50:14.007000000,"DWRIGHT",2006-08-14 00:00:00,1754-01-01
13:52:45.387000000,0,"9","","","BX00054",1,"","","DWRIGHT",2006-08-14
00:00:00,1754-01-01
Re: Error: Syntax error or access violation Paul Ibison
9/1/2006 4:26:20 PM
Works in terms of the setup on sp4. Now I need to cause the distribution
agent to apply a transaction - please can post up an insert statement
otherwise I'll be spending the rest of the afternoon coding it up :)
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com



Re: Error: Syntax error or access violation Paul Ibison
9/4/2006 12:00:00 AM
Em,
there's not much I can do with the CALL statement - what I need is the
insert on the publisher so I can replicate it on my side.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com

RE: Error: Syntax error or access violation niko
9/5/2006 3:46:02 AM
I've the same problem. The reason is the names of the articles with special
Characters like “$,<,>”. If the sepcial Characters are only in the names of
the tables no problem, but if there are also data with special characters the
37000 appear when the records are inserted.

I’ve SQLServer 2000 Sp3. I don’t now if the SP4 solve the problem.

I can’t rename the original tables. ¿Could somebody tell us the solution?

[quoted text, click to view]
RE: Error: Syntax error or access violation emgeneral
9/5/2006 10:16:02 AM
That's the direction I am heading toward too. However, there are too much
data to go through to confirm this process. I am still looking for ways to
check for invalid or special characters in the table. Can someone help?

[quoted text, click to view]
Re: Error: Syntax error or access violation emgeneral
9/5/2006 10:18:02 AM
I am not sure what's you're asking for. Can you walk me through this process
to get the information you're looking for?

Thanks,
EM

[quoted text, click to view]
Re: Error: Syntax error or access violation Paul Ibison
9/5/2006 6:29:28 PM
What I really need is an insert statement - insert into table (cols) values
(x,y,z...) etc.
If I have an insert statement, I can use that on the publisher and this will
then replicate to the subscriber.
I'll use RedGate's tools tomorrow to try to generate an insert from your
data if you haven't posted by then, and we'll see if I can get the same
error.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com



RE: Error: Syntax error or access violation mymoodle
9/7/2006 9:47:01 AM
Hi Emgeneral:
are you replicating Navision db?
If yes, I guess the problem is with the space in tablename. This makes repl
cmd (CALL sp_MSins_table"space"name) to take tablename after "space" as para.
and we get the syntax error.
My experience is to fix this space with [tablename]. It work for me.

[quoted text, click to view]
RE: Error: Syntax error or access violation emgeneral
9/11/2006 2:06:02 PM
Hello mymoodle,

Yes, I am trying to replicate a Navision db. I have over 20 tables
scheduled to replication at a regular interval of time and this specific
table "Sales Header" returned with syntax error mentioned. Because of the
special characters in the table table, I have created alias to reference the
table name with "no space" and "$" sign. I will try again to verify the
"extra space" you're referring to. Meanwhile, can you provide precise
procedures to assist me with Replication to confirm I am doing it properly
and correctly?

Thanks,
EM.

[quoted text, click to view]
Re: Error: Syntax error or access violation daniel NO[at]SPAM cyberview.com.tw
9/13/2006 8:39:24 AM
Hi EM:
check sysarticles table in publication db. You'll find the update,
insert, delete specified commands for each table. It looks like Call
sp_MSins_tablename, CALL sp_MSdel_tablename, MCALL MSupd_tablename.
SQL 2000 doesn't support replicaton with space in tablename. That's
where the problem comes from. My experience is like
1=2E Repl with Sync: stop log reader and distrib agent first at
distributor, This will prevent log reader to write wrong sp (tablename
with sapce) into distribution db at distributor. update sysarticles
for insert, update, delete command using "+" in TSQL to attached [ and
] to the begining and end of sp (eg, CALL [sp_MSins_table space name].

2=2E Repl without Sync: run sp_scriptpublicationcustomprocs to generate
sp in subscribtion db, update sysarticles in publishing db with
[sp_MSins_table name] for ins, upd, del. Don't update sysarticles
before sp_scriptpublicationcustomprocs. This will create wrong sp name
with extra [ and ].

BTW, do you have problem with timestamp in replcation Navision. I
manually filter timestamp column. Do you have any idea to do this
smarter. Navision has thouthands of table. It tooks me a lot of time
to filter timestamp column from each table. My Navision has timestamp
for each table.

I'm dealing with identity_insert on for each sp_MSins_table,
sp_MSupd_table to solve identity replication problem at subscribtion.
If you have this kind of experience, any idea or information will help.

Hope this help.
Good Luck.

Mynoodle.

emgeneral =E5=AF=AB=E9=81=93=EF=BC=9A

[quoted text, click to view]
Re: Error: Syntax error or access violation emgeneral
9/26/2006 8:01:01 PM
Just wanted to give you ALL a quick update on this and thanks for all the
help and guidance that was provided to me. It was indeed the extra space and
specific characters in the sp_MSins_<tablename> command as the result of my
error. After correcting that, it is now working.

Daniel --
Thanks for the help. I truly appreciate it. To date, I haven't experienced
any issue with the timestamp field you mentioned in Navision. Other than the
syntax error I had on this specific table, the rest of the tables replicate
fine. What specific problem are you having with timestamp?

EM

[quoted text, click to view]
Re: Error: Syntax error or access violation George Verras
2/27/2007 7:14:31 PM

I had the same problem. My custom Stored Procedures looked like:
sp_MSins_GroupAttribs^BODY^POWDER_USAGE
and I got the exact same error.
The carets were messing with the ODBC layer and causing syntax error
37000
I ended up going to the Articles tab (R Click on the Publication) and
enclosing the SP in either double-quotes or square brackets and it
worked.

So give this a try, it sounds like this is your problem.


AddThis Social Bookmark Button