Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9091

Re: Could not create connection from RS to MSSQL

$
0
0

Hi Avinash,

 

The creation of the rs_send_repserver_cmd is not working. Can you give me a clue on what is wrong?

 

CREATE PROCEDURE rs_send_repserver_cmd @rs_api VARCHAR(8000)

AS

declare @cmd VARCHAR(8000),

@sql varchar(50);

BEGIN

if (patindex('rs_rcl', lower(@rs_api)) > 0)

                 begin

                print 'The Replication Server command should not contain the keyword ''rs_rcl''';

                return(1);

                end

                select @cmd = 'rs_rcl ''' + replace(@rs_api, '''','''''') + ''' rs_rcl'; if ('rs_rcl' != substring (@cmd, datalength(@cmd) - 5, 6))

                begin

                print 'The Replication Server command is too long.';

                print 'Please split it into two or more commands';

                return (1);

                end

set @sql = 'rs_marker';

exec @sql @cmd;

END

 

[[Message Iteration=1|Data Source Name=CLUTSMTYRCI|SQLState=42000|Native

Error=137|Message=[Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Must

declare the scalar variable "@rs_api".[Message Iteration=2|SQLState=42000|Native

Error=|Message=[Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Incorrect

syntax near 'The Replication Server command should not contain the

keyword

'rs_rcl''.]

 

Regards,

 

Luz


Viewing all articles
Browse latest Browse all 9091

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>