By default, access between different Oracle Server databases is remotely accessed through local operations *. *
By default, access between different Oracle Server databases is remotely accessed through local operations *. *
Homepage → Database Technology
Background:
Read News
Access from different Oracle databases through database link
[Date: 2011-10-18] Source: Linux Author: qingwangyoucao [Font:]
By default, access between different Oracle Server databases is remotely accessed through local operations *. *
1. Create a database link
Example:
Create public database link orcl211 connect to username identified by password using '(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = *. *) (PORT = 1521 ))
)
(CONNECT_DATA =
(Service_name = ORCL)
)
)';
Parameter description:
Create public database link name
Connect to user name
Identified by password
Using 'Connection description'
The connection description must be in the following format _ or the service name configured in tnsnames. ora. Note that the following format must also be met in tnsnames. ora; otherwise, the connection will fail:
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = *. *) (PORT = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = ORCL service name)
)
)
2. the syntax for accessing objects in the Linked database is as follows: Access ts_staff_info under the edubur user in orcl211
Example:
Select * from edubur. ts_staff_info @ orcl211;
Parameter description:
Select * from user name. Table Name @ remote database link name
3. view all created database link names
Select owner, db_link from dba_db_links;
Ower db_link
PUBLIC ORCL211.REGRESS. RDBMS. DEV. US. ORACLE. COM
4. Delete the Database Link name
Drop public database link ORCL211.REGRESS. RDBMS. DEV. US. ORACLE. COM
0
ArcGIS application of Oracle Spatial Feature Analysis
Java call Oracle Stored Procedure tutorial
Oracle tutorials
Image Information
View All comments in this article (0)
Comments
Latest Information
Popular this week
Introduction to Linux community-advertisement service-website map-help Info-contact us
The articles published on this site (LinuxIDC) do not mean that they agree with the statement or description. They only provide more information and do not constitute any suggestions.
Copyright©2006-2011 Linux community All rights reserved Zhejiang ICP backup No. 06018118