1. Install Oracle Client
The prerequisite for connecting to Oracle is to install Oracle Client on the SQL Server server. Oracle client download addresses are as follows:
Http://www.oracle.com/technetwork/cn/database/enterprise-edition/downloads/index.html
After installation to modify the corresponding TNSNames file to connect the corresponding data, the file directory:
Oracle Installation Path \product\10.2.0\client_1\network\admin
Connection string Format:
QAS =
(DESCRIPTION =
(Address_list =
(address = (PROTOCOL = TCP) (HOST = 10.10.10.181) (PORT = 1527))
)
(Connect_data =
(service_name = QAS)
)
)
2. Establish Link Server connection
First open SQL Server Management Studio, expand to Server Objects-->linked server, and right-click to select new linked server to enter information for link server.
When the input is complete, the information appears as follows:
3. Using Link Server
SQL Server provides two ways to connect to link Server:
SELECT * FROM OPENQUERY (QAS, ' select * from Sapr3.mseg ')
Select Top * from [QAS]. [SAPR3]. [Mseg]
Attention:
1 The second way to take note of the case
2 The index is not used in either way, and the use of mass data is not supported