Monday, March 19, 2012

linked server failed

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
Adi
Try
select * from [SERVER1/NewServer].db1.dbo.tbl_Prouduct
"Adi" <Adi@.discussions.microsoft.com> wrote in message
news:EA624DF8-B02E-4FC6-8E01-347B1AEC933D@.microsoft.com...
> 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
>
|||yes i tried this too but it gives me the message:
SQL Server Does not exists or access denied.
i have also checked the sysservers the linked server is exist in it.
when i try to run retrieve data from main server its working fine but when i
try to retrieve data from SQL Server instance it failed.
"Uri Dimant" wrote:

> Adi
> Try
> select * from [SERVER1/NewServer].db1.dbo.tbl_Prouduct
> "Adi" <Adi@.discussions.microsoft.com> wrote in message
> news:EA624DF8-B02E-4FC6-8E01-347B1AEC933D@.microsoft.com...
>
>
|||Try looking up the CORRECT syntax in Books Online.
You are using the wrong slash.
Try [Server1\NewServer].
Sincerely,
Anthony Thomas

"Adi" <Adi@.discussions.microsoft.com> wrote in message news:2C6DA00D-ACDE-44D0-AC42-F6F3DC34D58C@.microsoft.com...
yes i tried this too but it gives me the message:
SQL Server Does not exists or access denied.
i have also checked the sysservers the linked server is exist in it.
when i try to run retrieve data from main server its working fine but when i
try to retrieve data from SQL Server instance it failed.
"Uri Dimant" wrote:

> Adi
> Try
> select * from [SERVER1/NewServer].db1.dbo.tbl_Prouduct
>
> "Adi" <Adi@.discussions.microsoft.com> wrote in message
> news:EA624DF8-B02E-4FC6-8E01-347B1AEC933D@.microsoft.com...
>
>
>|||I Anthony.
I have the same problem of Adi (SQL Server Does not exists or access
denied), but my server name is nsv, so the problem is not the slash.
The likend server it seems to be created correctly.
Any suggestion?
"AnthonyThomas" wrote:
[vbcol=seagreen]
> Try looking up the CORRECT syntax in Books Online.
> You are using the wrong slash.
> Try [Server1\NewServer].
> Sincerely,
>
> Anthony Thomas
>
> --
> "Adi" <Adi@.discussions.microsoft.com> wrote in message news:2C6DA00D-ACDE-44D0-AC42-F6F3DC34D58C@.microsoft.com...
> yes i tried this too but it gives me the message:
> SQL Server Does not exists or access denied.
> i have also checked the sysservers the linked server is exist in it.
> when i try to run retrieve data from main server its working fine but when i
> try to retrieve data from SQL Server instance it failed.
>
> "Uri Dimant" wrote:

No comments:

Post a Comment