Transaction replication – space in table name | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Transaction replication – space in table name

Hi all, I hit the error ‘Syntax Error or Access Vialotion’. The command that caused the error is CALL sp_MSdel_SUN$Cust_ Ledger Entry. I get the error message from the Error Detail screen. I noticed that the error will occur when I tried to replicate tables that have space in the table name. Can Transaction Replication support spaces in table name? That’s my guess on the caused of the error. Please correct me if I am wrong.

It supports spaces in table name but then you need to refer to that table by enclosing it in square bracket like
tablename: your table
refer: [your table]
but its a good practice to replace spaces by underscore(_)
It is always better to avoid spaces in the object name Madhivanan Failing to plan is Planning to fail
{CALL sp_MSdel_SUN$Cust_ Ledger Entry) statement is generated and executed by SQL Server in the background. I have no idea from where the {sp_MSdel_SUN$Cust_ Ledger Entry} is called. I guess the stored procedure is generated based on my table name SUN$Cust_ Ledger Entry when I setup the Transaction Replication using the Replication wizard. If I can control how to call the stored procedure, maybe I will try CALL [sp_MSdel_SUN$Cust_ Ledger Entry]. Remove the space in the table name is not an option for my situation. The tables are all created by an ERP software. I have no control over the table name.
I found the solution. CALL sp_MSdel_SUN$Cust_ Ledger Entry can be changed at the Publisher properties – Article tab.

chen_wan: I’m experiencing exacly the same problem. I guess it’s MBS Navision you are using? Could you please be a little more specific about how you solved it?
]]>