Oracle Remote Connection Database

Source: Internet
Author: User

1. Sqlplus

Sqlnet.ora file Format names.directory_path= (tnsnames,hostname). The client will first find the ORCL record in the Tnsnames.ora file. If there is no corresponding record then try to ORCL as a hostname, through the network to resolve its IP address and then go to connect this IP GLOBAL_DBNAME=ORCL this instance.

2. Client. Tnsnames.ora

This file is similar to the UNIX hosts file, providing tnsname to hostname or IP, only if Sqlnet.ora is similar to names.directory_path= (TNSNames), That is, the client will attempt to use this file if it has tnsnames in the order in which it resolves the connection string.

#你所要连接的时候输入得TNSNAME if the listner fails to attempt to change the IP address

ORA10GCSDL1 =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = 127.0.0.1) (PORT = 1521))

(Connect_data =

(SERVER = dedicated)

(service_name = ORA10GCSDL1)

)

)

ORCL =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = ibm-66336dafe8f.cn.ibm.com) (PORT = 1521))

(Connect_data =

(SERVER = dedicated)

(service_name = ORCL)

)

)

3. Server side. Listener.ora

Listener the configuration file of the listener process, accepting requests for remote access to the database and transferring the server process to Oracle. So if you are not using a remote connection, the listener process is not required, as is the case if shutting down the listener process does not affect the database connection that already exists.

#下面定义LISTENER进程为哪个实例提供服务

Sid_list_listener =

(Sid_list =

(Sid_desc =

(Sid_name = Plsextproc)

(Oracle_home = C:\oracle\product\10.1.0\Db_1)

(program = Extproc)

)

(Sid_desc =

(Sid_name = ORA10GCSDL1)

(Oracle_home = C:\oracle\product\10.1.0\Db_1)

)

(Sid_desc =

(Sid_name = Ora10gcs)

(Oracle_home = C:\oracle\product\10.1.0\Db_1)

)

)

#监听器的名字, a single database can have more than one listener

LISTENER =

(Description_list =

(DESCRIPTION =

(Address_list =

(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC))

)

(Address_list =

(ADDRESS = (PROTOCOL = TCP) (HOST = 127.0.0.1) (PORT = 1521))

)

)

)

4. Instructions used for troubleshooting:

Lsnrctl > Help

Tnsping ora10gcsdl

Oracle Code

OrCL =

(DESCRIPTION =

(Address_list =

(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.xx.xx) (PORT = 1521))

)

(Connect_data =

(service_name = ORCL)

)

)

The main parameters are host, PORT, service_name

Oracle Remote Connection Database

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.