To create the linked server:
USE [msdb]
GO
EXEC sp_addlinkedserver @server = N’SAMPLE_LINK’, @srvproduct=N’Oracle’, @provider=N’OraOLEDB.Oracle’, @datasrc=N’LINKDSN’
GO
EXEC sp_addlinkedsrvlogin @rmtsrvname = ‘SAMPLE_LINK’, @rmtuser = ‘LINKUSER’, @rmtpassword = ‘*******’, @useself = False
GO
To drop the linked server:
USE [msdb]
GO
EXEC sp_droplinkedsrvlogin ‘SAMPLE_LINK’, NULL
GO
EXEC sp_dropserver ‘SAMPLE_LINK’
GO