Create a data link in Oracle

Source: Internet
Author: User


CREATE a data link in Oracle 1. To establish a Database link, you must have the PCREATE Database link system permission. to connect to a remote account, you must have the common permission to CREATE session;
2. Ensure that the connected user has the permission to access the tables or views of the connected database. 3. Add the connection characters to the Linked database in the [TNSNAMES. ORA] file. Www.2cto.com LIMS = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = 10.126.6.14) (PORT = 1521) (CONNECT_DATA = (SERVICE_NAME = LIMS ))) or use the second method to create a link. 3. CREATE [public] database link syntax create database link name connect to username identified by password USING 'database connection string '; create database link "ORACLE_13" connect to "TOTALPLANT" identified by "********" USING 'oracle _ Server' or: www.2cto.com -- Create database linkcreate database link TOCCIC connect to ZTRY identified by ZTRY using '(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = fengwenwei) (PORT = 1521) (CONNECT_DATA = (SID = ZTRY) '; 4. Generally, PUBLIC is created by the database administrator. Individual users can skip public, is a private database link; 5. In the configuration file init. in ora, when the database parameter global_name = true, the Database Link name must be the same as the remote database name; when the database parameter global_name = false, the Database Link name can be different from the remote database name; restart the database to take effect, or modify the above and execute alter system set global_names = false without restarting the database; 6. In the configuration file init. in ora, the number of database connections is limited. The default number of concurrent connections is 4, which is limited by OP_LINKS; ====================================
You can use the following command to query the global name of a Database: SELECT * FROM GLOBAL_NAME; www.2cto.com ...... FROM table name @ database link name; query DATABASE connection select * from user_db_links; delete database connection DELETE USER_DB_LINKS; DROP (PUBLIC) database link DBaseLinkToCompany

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.