Hi,
I've a little problem in my sanpshot replication.
I triy to replicate a db in a new server, everythig works fine expect one
stored procedure.
This store procedure, when replicated, generate the error number: 207 -
"Invalid column name 'SELECT c.CliID AS ID_Client, '."
This is a simple sp that create dinamically a select command and execute it
(with the exec command) at the end of the sp.
If I try to copy manually this sp to the replicated server no error occurred
and the sp works fine.
Any suggestion?
Thanks
Hi Ramon,
I am guessing that double-quotes (") instead of single-quotes (') are used
for delimiting string-literals in the stored procedure that you are trying to
replicate and unfortunately this is not supported at all in SQL2000 or
earlier versions. I have posted the following two years back in an attempt to
explain a bit about how this came to be broken although I can imagine that
you will find little comfort in my explanation:
http://groups.google.com/group/micro... e6aaa0ff1c69
While I am glad to say that this particular scenario (using " as string
delimiters in text objects) is handled properly in SQL2005 (only need SQL2005
distributor\snapshot agent), here are a couple of workarounds that you can
implement if you need to stay on SQL2000 or earlier:
1) Use sp_addscriptexec (SQL2000) to implement replication of the stored
procedure definition yourself
2) Alter your stored procedures at your publisher so that single-quotes
instead of double-quotes are used for delimiting string-lterals.
HTH
-Raymond
"Ramon" wrote:
> Hi,
> I've a little problem in my sanpshot replication.
> I triy to replicate a db in a new server, everythig works fine expect one
> stored procedure.
> This store procedure, when replicated, generate the error number: 207 -
> "Invalid column name 'SELECT c.CliID AS ID_Client, '."
> This is a simple sp that create dinamically a select command and execute it
> (with the exec command) at the end of the sp.
> If I try to copy manually this sp to the replicated server no error occurred
> and the sp works fine.
> Any suggestion?
> Thanks
|||I changed the double-quotas with single-quotas (only one sp was
using double-quotaas) and the entire replication works fine.
Thnak you for the suggestion.
"Raymond Mak [MSFT]" wrote:
[vbcol=seagreen]
> Hi Ramon,
> I am guessing that double-quotes (") instead of single-quotes (') are used
> for delimiting string-literals in the stored procedure that you are trying to
> replicate and unfortunately this is not supported at all in SQL2000 or
> earlier versions. I have posted the following two years back in an attempt to
> explain a bit about how this came to be broken although I can imagine that
> you will find little comfort in my explanation:
> http://groups.google.com/group/micro... e6aaa0ff1c69
> While I am glad to say that this particular scenario (using " as string
> delimiters in text objects) is handled properly in SQL2005 (only need SQL2005
> distributor\snapshot agent), here are a couple of workarounds that you can
> implement if you need to stay on SQL2000 or earlier:
> 1) Use sp_addscriptexec (SQL2000) to implement replication of the stored
> procedure definition yourself
> 2) Alter your stored procedures at your publisher so that single-quotes
> instead of double-quotes are used for delimiting string-lterals.
> HTH
> -Raymond
> "Ramon" wrote:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment