Home > database >  Excuse me sys. Can not find a server in the servers' DBVIP what reason is this
Excuse me sys. Can not find a server in the servers' DBVIP what reason is this

Time:01-04

The ALTER PROCEDURE [dbo] [Data_Processing]
AS
The BEGIN
SET NOCOUNT ON;
- the exec sp_addlinkedserver 'ITSV', ' ', 'SQLOLEDB', 'remote server name or IP address'
If not the exists (select 1 from sys. The servers where name='DBVIP')
The begin
The EXEC sp_addlinkedserver
='DBVIP' @ server, accessed server alias name (any)
@ srvproduct=",
@ the provider='SQLOLEDB',
@ datasrc='https://bbs.csdn.net/topics/192.168.0.8' - to allow access to the SERVER (SQL SERVER instance name)
The EXEC sp_addlinkedsrvlogin
'DBVIP' - to be accessed server alias
'false',
NULL,
'sa' - log into the link server account
'feeang/' - login link server password
End


- check the registered link server
The exec sp_linkedservers

- table query link server
Select * from DBVIP. YSV. Dbo. Ati


- after use to remove
If the exists (select 1 from sys. The servers where name='DBVIP')
The begin
The Exec sp_droplinkedsrvlogin DBVIP, NULL - delete link server login account
The Exec sp_dropserver DBVIP - delete link server
End

- check the registered link server
The exec sp_linkedservers
END

Level of message 7202, 11, state 2, process Data_Processing, line 32
In sys. Can not find a server in the servers' DBVIP ', verify that the specified server name is correct, if necessary, please implement stored procedures sp_addlinkedserver to add servers to the sys. The servers,
  • Related