I have an issue regarding a DB project in VS 2013. Where I am using, for example, OPENQUERY([Server.IP],'blah blah'), the server name will always return a warning. E.g.
"Procedure [dbo].[xxx] has an unresolved reference to object [server.IP]".
Is it possible to remove these errors?
You have to define the linked server in your project.
Just add a New Item of Linked Server type to your project and then put the linked server definition in it. For example:
/****** Object: LinkedServer [Server.IP] Script Date: 30/07/2014 16:17:56 ******/
EXEC dbo.sp_addlinkedserver @server = N'Server.IP', @srvproduct=N'SQL Server'
GO
/* For security reasons the linked server remote logins password is changed with ######## */
EXEC dbo.sp_addlinkedsrvlogin @rmtsrvname=N'xxx.xxx.xxx.xxx',@useself=N'True',@locallogin=NULL,@rmtuser=NULL,@rmtpassword=NULL
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With