I've been trying to connect on the remote data server but keeps giving the same error over and over.
My local server, at running mode, has a green triangle on its icon, means that its running.
My linked server, has a white circle on its icon, I pointed my mouse and right clicked at it but [ Start, Stop, Pause, Resume and Restart ] are disabled.
When i run my program, i connect to my local server, the user then selects from a list in the combo box, from the list the user selects, it will create a connection string, run that string to validate if the connection to the linked server is successful, (which It does as I run and debug that part)..
After the successful connection to the linked server, It will read the Query Statement;
Select * from [linkedServer].DatabaseName..TableName
or
Select * from [linkedServer].DatabaseName.dbo.TableName
but still gives this error;
Could not find server 'VMServer' in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers.
i found this and run a test at my local Server and it worked.
Exec sp_dropserver 'VMSERVER', 'droplogins'
go
EXEC sp_addlinkedserver
@server='VMSERVER',
@srvproduct='',
@provider='SQLNCLI',
@datasrc='0.0.0.0'
EXEC sp_addlinkedsrvlogin
@useself='FALSE',
@rmtsrvname='VMSERVER',
@rmtuser='sa',
@rmtpassword='mbwin'
go
but when i run it again with this statement,
Select Top 10 * from [VMSERVER].PUSAN_KRW_PROD.dbo.GLAC
and the same error appeared.
Am i missing something?
If i can paste a screenshot to give an idea, but don't know how?