Wednesday, March 28, 2012

linked server problem

Hi all, I am hitting up against a wall when trying to execute a stored proc
running on a remote linked sql server. I have verified that stored proc
executes fine locally on the remote server. The remote server name is
"brserver-i". Here is what I get:-
exec BRSERVER-I.master.dbo.sp_dothework
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'I'.
Any ideas?Try this.
exec [BRSERVER-I].master.dbo.sp_dothework
<param@.community.nospam> wrote in message
news:u8BANJsOFHA.3380@.TK2MSFTNGP15.phx.gbl...
> Hi all, I am hitting up against a wall when trying to execute a stored
> proc running on a remote linked sql server. I have verified that stored
> proc executes fine locally on the remote server. The remote server name is
> "brserver-i". Here is what I get:-
> exec BRSERVER-I.master.dbo.sp_dothework
> Server: Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near 'I'.
>
> Any ideas?
>|||Do not use "-" to name databases, I have found errors with other application
s
trying to access a database like this one.
exec [BRSERVER-I].master.dbo.sp_dothework
go
AMB
"param@.community.nospam" wrote:

> Hi all, I am hitting up against a wall when trying to execute a stored pro
c
> running on a remote linked sql server. I have verified that stored proc
> executes fine locally on the remote server. The remote server name is
> "brserver-i". Here is what I get:-
> exec BRSERVER-I.master.dbo.sp_dothework
> Server: Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near 'I'.
>
> Any ideas?
>
>|||Sure. Qualify the object using the four-part name.
insert into server_name.database_name.owner.object_name
select ...
AMB
"param@.community.nospam" wrote:

> Hi all, I am hitting up against a wall when trying to execute a stored pro
c
> running on a remote linked sql server. I have verified that stored proc
> executes fine locally on the remote server. The remote server name is
> "brserver-i". Here is what I get:-
> exec BRSERVER-I.master.dbo.sp_dothework
> Server: Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near 'I'.
>
> Any ideas?
>
>|||Sorry, wrong place.
AMB
"Alejandro Mesa" wrote:
> Sure. Qualify the object using the four-part name.
> insert into server_name.database_name.owner.object_name
> select ...
>
> AMB
> "param@.community.nospam" wrote:
>|||Looks like this worked too:-
exec "BRSERVER-I".master.dbo.sp_dothework
thanks!
"ykchakri" <ykchakri@.hotmail.com> wrote in message
news:O22TQPsOFHA.1096@.tk2msftngp13.phx.gbl...
> Try this.
> exec [BRSERVER-I].master.dbo.sp_dothework
> <param@.community.nospam> wrote in message
> news:u8BANJsOFHA.3380@.TK2MSFTNGP15.phx.gbl...
>|||But in order it to work you should have the setting of SET QUOTED_IDENTIFIER
set to ON.
Example:
SET QUOTED_IDENTIFIER OFF
go
use "master"
go
SET QUOTED_IDENTIFIER ON
go
AMB
"param@.community.nospam" wrote:

> Looks like this worked too:-
> exec "BRSERVER-I".master.dbo.sp_dothework
> thanks!
> "ykchakri" <ykchakri@.hotmail.com> wrote in message
> news:O22TQPsOFHA.1096@.tk2msftngp13.phx.gbl...
>
>|||You are correct. thanks
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
news:928D7DC3-D605-429E-AF7E-BA3921057E7F@.microsoft.com...
> But in order it to work you should have the setting of SET
> QUOTED_IDENTIFIER
> set to ON.
> Example:
> SET QUOTED_IDENTIFIER OFF
> go
> use "master"
> go
> SET QUOTED_IDENTIFIER ON
> go
>
> AMB
>
> "param@.community.nospam" wrote:
>

No comments:

Post a Comment