hi,
i have added a link server but it fails when i try to retrieve data.
SQL server in on the same machine
i have created the another SQL server instance
Main Server: SERVER1
Instance: SERVER1/NewServer
EXEC sp_addlinkedserver @.server = SERVER1/NewServer, @.srvproduct = 'SQL
Server'
EXEC sp_addlinkedsrvlogin 'SERVER1/NewServer', false, NULL, 'sa', 'test'
select * from SERVER1/NewServer.db1.dbo.tbl_Prouduct
when i try to run the above query it gives me the error
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near '/'.
anyone have suggestion?
Adi
This was just dicussed this week. The "/" is a special character not
normally allowed in an identifier. Either give the linked server a
"regular" name or delimit the name with brackets - [SERVER1/NewServer]. BOL
uses this same situation as an example.
"Adeel Ahmed" <adeel.ahmed@.pk.softechww.com> wrote in message
news:O0qoJPu0EHA.2876@.TK2MSFTNGP12.phx.gbl...
> hi,
> i have added a link server but it fails when i try to retrieve data.
> SQL server in on the same machine
> i have created the another SQL server instance
> Main Server: SERVER1
> Instance: SERVER1/NewServer
> EXEC sp_addlinkedserver @.server = SERVER1/NewServer, @.srvproduct = 'SQL
> Server'
> EXEC sp_addlinkedsrvlogin 'SERVER1/NewServer', false, NULL, 'sa', 'test'
> select * from SERVER1/NewServer.db1.dbo.tbl_Prouduct
> when i try to run the above query it gives me the error
> Server: Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near '/'.
>
> anyone have suggestion?
> Adi
>
|||Thanks,
i had resolve the problem.
actually i try this too
select * from [Server1/Newserver].dbo.db1.tbl_product
but its still not work
but when i used back slash "\" to register new linked server and
retrieve records like that
select * from [Server1\Newserver].dbo.db1.tbl_product
its work fine
thanks
Adi
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
|||Yeah, smart. Look it up. And do us a favor and don't multipost. I just answered this question in another thread just to come to find out the it was "discovered" or answered in another.
Don't waste people's time like that.
Sincerely,
Anthony Thomas
"Adeel Ahmed" <itsmeadeel@.hotmail.com> wrote in message news:ekkVr1G1EHA.1452@.TK2MSFTNGP11.phx.gbl...
Thanks,
i had resolve the problem.
actually i try this too
select * from [Server1/Newserver].dbo.db1.tbl_product
but its still not work
but when i used back slash "\" to register new linked server and
retrieve records like that
select * from [Server1\Newserver].dbo.db1.tbl_product
its work fine
thanks
Adi
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment