Oracle Remote Connectivity

Source: Internet
Author: User

The existing two Oracle DB is a and B, in order to be able to operate the B database in a database, we need to establish a dblink to B in the a database.
Before we create the Dblink, we first check the value of the global_names of DB A (select Name,value from v$parameter where name = ' Global_names '), When this value is true indicates that Dblink is acting on a db with the same name, whereas the two DB Dblink connections can have different names, the DB will not have the same name, so we need this parameter value to False, if true, it needs to be changed to FALSE (alter system Set Global_names=false;).
Now we can create Dblink and execute the following statement:
Create Public database link A_to_b
Connect to < user name > identified by < password >
Using ' (DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.75.134) (PORT = 1521))
(Connect_data =
(SERVER = dedicated)
(service_name = B)
)
)‘;
where < username > and < password > user name and password for database access for DB B, using the configuration path of TNS followed by DB B. If the access path to DB B is already configured in the TNS file in db A, the above creation statement can also be simply as follows:
Create Public database link A_to_b
Connect to < user name > identified by < password >
Using ' B ';
Once the Dblink is created, we are ready to operate on DB B in db A. For example, if we log in to db A to see the data of the EMP table in DB B, we can write the query statement (SELECT * from [email protected]_to_b)

Oracle Remote Connectivity

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.