In the first case:
If the Oracle server is installed on this machine, it 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.
In the second case:
The Oracle server is not installed on this computer and the Oracle client is not installed. However, tools for managing databases such as PL SQL development, Toad SQL development, SQL Navigator are installed. Install an Oracle server on a virtual machine or another computer, that is, a virtual machine or another computer that is now a server.
In this case, I use PL SQL Development Remote Connection Oracle Server database for example:
1. Search for the following files on the machine where the Oracle server is installed:
Copy Code code as follows:
Oci.dll
Ocijdbc10.dll
Ociw32.dll
Orannzsbb10.dll
Oraocci10.dll
Oraociei10.dll
Sqlnet.ora
Tnsnames.ora
Classes12.jar
Ojdbc14.jar
Copy these found files to a folder, such as Oraclient, and copy the folder to the client machine. If the placement path is D:\oraclient.
2, configure Tnsnames.ora, modify the database connection string.
Copy Code code as follows:
Oracledata =
(DESCRIPTION =
(Address_list =
(address = (PROTOCOL = TCP) (HOST = 192.168.0.58) (PORT = 1521))
(Connect_data =
(service_name = oracledata)
)
Where Oracledata is the service name to be connected, HOST = 192.168.0.58, is the server IP address; port = 1521 is the port number.
3, add the first environment variable, named Tns_admin, the value is Tnsnames.ora file path (such as: D:\oraclient, especially after reloading or other operations, forget the tns_admin variable, plsql login will report unable to resolve the specified connection identifier), This is to be able to find the Tnsnames.ora mentioned above. This is the most important step.
Add a second environment variable (optional): "Nls_lang = simplified Chinese_china. ZHS16GBK ", (American_america. US7ASCII is an ASCII encoding type, other types can be looked at the server or online to find it (this step to do right, if the code is wrong, will produce garbled).
4, download and install PL SQL Developer Configuration Application:
Open PL SQL Developer, login interface point Cancel, enter after the menu bar tools->preferences->connection:
Oracle home=d:\oracleclient
OCI Library=d:\oracleclient\oci.dll
5, open Plsql will be in the database has oracledata option input username password can be logged in.
In the third case:
Oracle servers are not installed on this machine, but Oracle clients are installed, and tools for managing databases such as PL SQL development, Toad SQL development, SQL Navigator are installed. Install an Oracle server on a virtual machine or another computer, that is, a virtual machine or another computer that is now a server.
In this case, I use PL SQL Development Remote Connection Oracle Server database for example:
1. Open the net Manager in the Oracle client, configure the name of the database to be connected remotely, the IP address, and so on, and new if there is no database name for remote connections in Net Manager.
2. The other steps are the same as the 2---5 in the second case.
The fourth situation:
The Oracle server is not installed on this machine, and the tools for managing databases such as PL SQL development, Toad SQL development, SQL Navigator are not installed, but Oracle clients are installed. Install an Oracle server on a virtual machine or another computer, that is, a virtual machine or another computer that is now a server.
In this case, I use the Sqlplus remote connection Oracle Server database in the Oracle client as an example:
1. Open the net Manager in the Oracle client, configure the name of the database to be connected remotely, the IP address, and so on, and new if there is no database name for remote connections in Net Manager.
2. Step two in the second case.
3. Step three in the second case.
4, open Sqlplus:
(1) If logged in with the SYS user, the username: sys password: XXXXXX host string: The database name to be connected as SYSDBA, log in.
(2) If logged in with another user, username: xxx Password: xxxxxx host string: The name of the database to be connected, login.
Precautions:
1, server-side and client firewalls need to be shut down;
2, we often encounter the listener service can not start, then need to open the net Configuration Assistant repair, or new listener service.
3, the database password if forgot how to do? Modify your password in the following ways:
Start--> Run-->cmd
Input: Sqlplus/nolog carriage return
Input: Connect/as SYSDBA carriage return
User unlock: Alter user SYSTEM account unlock carriage return
Modify password: Alter user system identified by manager
4. How to determine whether the database is running in archive mode or not in archive mode?
Enter Dbastudio, History--〉 Database---archive view.
5, in addition, if this machine and other machines are installed Oracle Server side, then the machine if you want to connect other machines, you must modify the environment variables.