PLSQL remote connection to Oracle server, plsqloracle Server

Source: Internet
Author: User

PLSQL remote connection to Oracle server, plsqloracle Server

Only one remote connection method is introduced here, that is, the Oracle client and PLSql tool are installed on the local machine, and the server is installed on the virtual machine or another computer.

1. Open the Net Manager of the Oracle client, select Oracle Net configuration-local-service name, and create one, for example, bjdm_wsdj. During the creation process, the network service name can be set up by itself (the name is the name of the database connected to the remote server), and the communication protocol is TCP/IP, the host name is the IP address of the server to be remotely connected, and the port number is the port of the server to be remotely connected. The default value is 1521. The service name is the service name of the server to be remotely connected, generally, the default value is ORCL when you create a database. After the database is created, save the configuration. After this step is completed, the tnsnames. ora file will automatically map the configuration just now, so you do not need to manually modify the data in this file.

2. download and install the PLSql configuration application

Open PLSql, click Cancel on the logon page, and select Tools -- preferences -- connection in the menu bar to set Oracle Home and OCI library.

3. re-open PLSql and you will have a database on the server in the database. Just enter the username and password for connecting to the server.


How to configure pl/SQL to connect to a remote oracle Server

(1) solution for not installing the client.
Method 1:
1. Search for the following files on the machine where the ORACLE server is installed,
Oci. dll
Ocijdbc10.dll
Ociw32.dll
Orannzsbb10.dll
Oraocci10.dll
Oraociei10.dll (the server may not exist. If not, you can log on to pl SQL with the username and password)
Sqlnet. ora
Tnsnames. ora
Classes12.jar
Ojdbc14.jar
Put it in a folder, such as your lient
2. Configure tnsnames. ora. If oracle is not installed on the local machine, copy one (tnsnames. the ora file is under % ORACLE_HOME % \ network \ admin) in the Directory D: \ clientlient above.
Oracledata =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.0.58) (PORT = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = oracledata)
)
)
3. Add an environment variable named TNS_ADMIN with the value tnsnames. the path of the ora file (for example, D: \ your lient, especially after reinstallation or other operations, if you forget the TNS_ADMIN variable, the connection identifier cannot be parsed when you log on to plsql ), this is to find the tnsnames mentioned above. ora. If ORACLE is installed on the local machine and the ORACLE_HOME environment variable is set, the tnsnames. ora file is automatically located in % ORACLE_HOME %/network/admin.
4. Set the ORACLE language and add environment variables:
"NLS_LANG = SIMPLIFIED CHINESE_CHINA.ZHS16GBK)
(This step is currently correct. If the encoding is incorrect, garbled characters will be generated)
5. download and install the PL. SQL. Developer configuration application
Configure tools> preferences> connection
Oracle Home = D: \ oracleclient
OCI library = D: \ oracleclient \ oci. dll
6. If you enable plsql again, you can log on to the database by entering the username and password with the oracledata option.

Method 2:
1. First, go to the oracle official download client compressed package, address: www.oracle.com/..0.html, select the operating system of the machine and then select the corresponding oracle basecompressed package download.
2. Decompress the downloaded package to the corresponding directory, such as D: \ worksoftware \ instantclient_10_2;
3. Create the NETWORD directory under this directory, and then create the ADMIN directory under the NETWORK directory, such as D ...... the remaining full text>

To remotely connect to the oracle database on the server using PLsql, you need to do the following work on the server or client:

Step 1: first install the oracle client and PLSQL software on the client, that is, you can select to install the client during the oracle installation process.
Step 2: Install the oracle server (administrator-level) on the server.
Step 3: configure the local network service name:
Open Oracle Net Configuration Assistant of Oracle (under Configuration and porting tools)

Select Local Network Service name configuration, and next step

Next, set the service name. Current Oracle instance (database name)

Next, select the Protocol
Next, set host name and port

Test the connection

Step 2 install PL_ SQL _Developer
Directly pass the pls-setup.exeinstallation and enter the serial number in sn.txt. Click Next. The installation is successful.
Configure PL_ SQL
Click PL_ SQL after installation, without entering the user name and password. Go to Edit-> Preferrences in order and configure as follows:

Log on to pl SQL again, and enter the user name and password.



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.