Configure database connection in Oracle [PL/SQL]

Source: Internet
Author: User

 

ORACLE: Configure database connection

// Database configuration file directory
E: \ oracle \ ora92 \ Network \ admin \ tnsnames. ora

(Database name)
Fwmsdb =
(Description =
(Address_list = Server IP Address
(Address = (Protocol = TCP) (host = 10.10.6.40) (Port = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = oracledb)
)
)

II.
1. Use the Oracle Net manager tool

1) Open Oracle Net Manager

2) Add "service name"

Step 1. net service name: enter any name

Step 2 Communication Protocol: If you connect to Oracle on a remote machine, select TCP/IP (Internet Protocol)

Step 3. Host Name: Enter the IP address and port number. The default value is 1521.

Step 4 Sid: generally the same name as the database

Step 5 Test

3) Start the PL/SQL connection

2. directly modify the configuration file:

1) Open the tnsnames. ora file in Directory D: \ oracle installation directory \ ora92 \ Network \ admin.

2) Add the following code:

Traffic_db = # net service name, which can be any

(Description =

(Address_list =

(Address = (Protocol = TCP) (host = 192.168.1.143) (Port = 1521) # host is the IP address of the connected database server, port is the terminal number of the connected database server, the default value is 1521.

)

(CONNECT_DATA =

(SID = carsys) # Database System ID, which is generally the same as the database name

)

)

3) Save the file. Start the PL/SQL tool to log on.

 

Extracted from: http://blog.csai.cn/user1/19399/archives/2008/29696.html

 

 

# Tnsnames. ora network configuration file: F: \ app \ Administrator \ product \ 11.2.0 \ dbhome_1 \ Network \ admin \ tnsnames. ora
# Generated by Oracle configuration tools.

Qis_dev =
(Description =
(Address_list =
(Address = (Protocol = TCP) (host = 192.168.0.8) (Port = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = QIS)
)
)

QIS =
(Description =
(Address_list =
(Address = (Protocol = TCP) (host = localhost) (Port = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = QIS)
)
)

Export lr_connection_data =
(Description =
(Address_list =
(Address = (Protocol = IPC) (Key = extproc1521 ))
)
(CONNECT_DATA =
(SID = clrextproc)
(Presentation = Ro)
)
)

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.