From: https://www.cnblogs.com/mengfanrong/p/5086930.html
Dblink
When we want to cross the local database. When you visit data in another database table, you must create a dblink of the remote database in the local database, and access the data in the Remote database table as you would the local database by dblink the local database.
How to create a Dblink
1) SQL Server to SQL Server
Exec sp_droplinkedsrvlogin Pdalink,null--Deleting mappings (mapping to remote logins on the linked server)
Exec sp_dropserver Pdalink--Remove remote server link
EXEC sp_addlinkedserver
@server = ' Pdalink ',--the name of the server being interviewed
@srvproduct = ',--the product name of the OLE DB data source to join as a linked server
@provider = ' SQLOLEDB ',--be interviewed for database category Msdaora SQLOLEDB
@datasrc = ' 192.168.120.114 '--the server being interviewed
EXEC sp_addlinkedsrvlogin
' Pdalink ',--the server alias to be interviewed
' False ',--
NULL, the logon on the local server. The LocalLogin data type is sysname and is set to NULL by default.
' Sa ',--account number
' Sa '--password
SELECT * from Pdalink. [Database].dbo. [table name, view]
SQL08 version number to SQL2000 version number will be encountered when connecting
Unable to run the operation because the OLBDB access interface "SQLNCLI10" of the connection server could not start the distributed transaction
Please take a look at the link to set up
Http://www.cnblogs.com/markhe/archive/2009/04/30/1447223.html
Http://blog.sina.com.cn/s/blog_53c190520100z4yy.html
2) Oracle to Oracle
Drop/* Public */Database link pda_link--delete remote server link
Create/* Public */Database link pda_link--the server alias to be interviewed
Connect to SYSTEM identified by Frontlink
Using ' (DESCRIPTION = (Address_list = (ADDRESS = (PROTOCOL = TCP)
(HOST = 192.168.1.10)--the server being interviewed
(PORT = 1521))) --The port to be interviewed
(Connect_data =
(service_name = SMB)--the database being interviewed
))‘;
SELECT * FROM [table name, view] @PDA_LINK
3) SQL to Oracle please visit http://blog.csdn.net/lygzscnt12/article/details/40074793
Create DBLINK in SQL Server and Oracle