Oracle Remote connection (PLSQL,SQL developement + Oracle Database + client + remote connection settings

Source: Internet
Author: User

The remote connection of Oracle database can be implemented in a variety of ways, this article mainly introduces four methods and considerations of remote connection, and through the examples to illustrate, then we begin to introduce.

First case:

If the Oracle server is installed on this machine, then there is not much to say, the connection is only the user name and password problem. However, be aware that the environment variable%oracle_home%/network/admin/is set.

Second case:

The Oracle server is not installed on this computer and the Oracle client is not installed. However, a tool for managing databases such as PL SQL development, Toad SQL development, SQL Navigator is installed. An Oracle server is installed on a virtual machine or another computer, that is, a virtual machine or another computer as a server at this time.

In this case, I am using the PL SQL Development Remote Connection Oracle Server database as an example:

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
Sqlnet.ora
Tnsnames.ora
Classes12.jar
Ojdbc14.jar
Copy the found files to a folder, such as Oraclient, and copy this folder to the client machine. If the placement path is d:oraclient.

2, configure the Tnsnames.ora, modify the database connection string.

Oracledata = (DESCRIPTION = (Address_list = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.0.58) (PORT = 1521)) (Conne Ct_data = (service_name = oracledata))

Where Oracledata is the name of the service to be connected; HOST = 192.168.0.58, which is the server IP address; port = 1521 is the port number.

3, add the first environment variable, named Tns_admin, the value is the path of the Tnsnames.ora file (such as: d:oraclient, especially after reloading or other operations, forget the tns_admin variable, plsql login will be reported cannot parse the specified connection identifier), This is to be able to find the Tnsnames.ora said above. This is the most important step.

Add a second environment variable (optional): "Nls_lang = simplified Chinese_china. ZHS16GBK ", (American_america. US7ASCII is the ASCII encoding type, other types can go to the server to look at or look up on the Internet (this step is to do for the moment, if the code is not correct, will produce garbled).

4. Download and install the PL SQL Developer Configuration app:

Open PL SQL Developer, login interface point Cancel, enter after select Menu bar tools->preferences->connection:

Oracle home=d:oracleclient OCI Library=d:oracleclientoci.dll

5, open again plsql will be in the database in the Oracledata option to enter the user name password can login.

The third case:

The Oracle server is not installed on this machine, but the Oracle client is installed, and the tools for managing databases such as PL SQL development, Toad SQL development, SQL Navigator, and so on are installed. An Oracle server is installed on a virtual machine or another computer, that is, a virtual machine or another computer as a server at this time.

In this case, I am using the PL SQL Development Remote Connection Oracle Server database as an example:

1. Open the net Manager in the Oracle client, configure the name of the database to be remotely connected, IP address, and so on, if there is no database name for remote connection in Net Manager, then create a new one.

2. The other steps are the same as 2---5 in the second case.

Fourth case:

This machine does not have an Oracle server installed, nor does it have the tools to manage databases such as PL SQL development, Toad SQL development, SQL Navigator, but Oracle clients are installed. An Oracle server is installed on a virtual machine or another computer, that is, a virtual machine or another computer as a server at this time.

In this case, I am using the Oracle client's Sqlplus remote connection to the Oracle server database as an example:

1. Open the net Manager in the Oracle client, configure the name of the database to be remotely connected, IP address, and so on, if there is no database name for remote connection in Net Manager, then create a new one.

2. Step two in the same second case.

3. Step three in the same second case.

4. Open Sqlplus:

(1) If the user logged in with SYS, then the user name: sys password: XXXXXX host string: The database name to connect as SYSDBA, log in.

(2) If you log in with another user, then the user name: xxx Password: xxxxxx host string: The name of the database to connect to, log in.

Precautions:

1, the server side and the client firewall need to shut down;

2, we often encounter * * * Service cannot start, then need to open the net Configuration Assistant repair, or NEW * * * service.

3, the database password if you forget what to do? To modify a password, follow these steps:

Start-Up Run-->cmd

Input: Sqlplus/nolog return

Input: Connect/as sysdba return

User unlocked: Alter user SYSTEM account unlock Enter

Change Password: Alter user system identified by manager

4, how to determine whether the database is running in archive mode or running in non-archive mode?

Enter Dbastudio, History--〉 Database---) archive view.

5, in addition, if the machine and other machines are installed on the Oracle server side, then the machine if you want to connect other machines, you must modify the environment variables.

Oracle Remote connection (PLSQL,SQL developement + Oracle Database + client + remote connection settings

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.