Database service name, DB instance name, Network service name

Source: Internet
Author: User

After oracle8i, the database instance is created with two names: the database service name, the database instance name. (Oracle8i previously only DB instance name)

When you create a new database, the database service name can be the same, and the database instance name must be unique, so there can be multiple DB instances in the name of the database service.

The database Network service name is provided to other machines on the network for distributed calls.
For example, when using Plsql to connect to a database, the database network service name is selected. It is configured in Oracle's Tnsnames.ora.

Once the external network is configured, the database can be connected. There are several matching methods, in which MYORCL is the network service name provided externally:
1.  MYORCL =
       (DESCRIPTION =
       (ADDRESS = (PROTOCOL = TCP) (HOST = 127.0.0.1) (PORT = 1521))
   & nbsp;   (Connect_data =
         (SERVER = dedicated)
         (service_name = ORCL)//Database service name
          (SID = ORCL)//If you have an instance, this line can be done without writing (this is the default). If multiple instances specify a specific DB instance name.
      )
    )
  This method is used for oracle8i or later versions. Because the database service name service_name = ORCL is used here.
  The following versions of Oracle8i have no database service name service_name.

2. MYORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 127.0.0.1) (PORT = 1521))
(Connect_data =
(SID = ORCL)
)
)
This method is used to oracle8i the following versions. This configuration method is also compatible with oracle8i versions above.


So as long as there is an Oracle client, in the client's Tnsnames.ora file configuration of the database to operate, you can be local to the remote database for data import, export and so on any operation.

Like what:
To import a DMP data file for a remote Oracle database:
IMP username/[email protected] FILE=JJJG. DMP Ignore=y full=y
The MYORCL after @ should be the Network service name. That is, the network service name that is configured in the Tnsnames.ora file of your local machine Oracle client.

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.