Oracle 11g installation and remote connection to oracle through plsql

【Summary】

      Because the oracle inspection is involved in the project, in order to verify the oracle inspection statement provided by the customer, I built an oracle (11g) database on a virtual machine (win10) and connected to oracle with PLSQL Developer. The specific operation steps are as follows:

1. oracle11g installation

1. You can go to the Oracle official website to download the corresponding Oracle installation package according to the number of bits of your operating system. The Oracle installation program is divided into two files. After downloading, unzip the two files to the same directory. The following is the address for downloading the Oracle 64-bit installation package:

https://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win64soft-094461.html

2. Unzip the downloaded two Oracle installation packages to the same folder (select the two installation packages together and right-click to decompress them)

3. Find the folder you just unzipped the installation package, find setup.exe and double-click to install it.

4. Next, enter the Oracle installation interface and configure security updates

 

5. Select "Create and Configure Database" for the installation item, and click Next

6. If Oracle is installed on a personal computer, select "Desktop" for the system type

7. For a typical installation, modify the global database name and management password (if the Oracle installation is used for learning, the management password can ignore the password rules and set it casually, but if it is used in an enterprise, it needs to be set strictly according to the password rules), and others can be kept at default. The character set must not be changed.

8. Summary, some relevant selection and configuration information before installation. You can save it as a file or just click "Finish" without saving the file.

9. Then enter the Oracle installation process

10. After the database management software files and dbms files are installed, an instance database will be automatically created and installed with the default orcletest name in front of it

11. The instance database is created. By default, all accounts are locked and unavailable (except for sys and system accounts). It is recommended to click the password management on the right, unlock the commonly used scott account and enter the password, click OK, so far , oracle 11g installation is complete.

12. After the installation is complete, you can find SQL Plus to connect to oracle through the start menu

 

2. P LSQL Developer connects to oracle

1. First download the Instance Client from the oracle official website, and then extract it to any folder, for example (directory of my experiment): D:\installed soft\instantclient_11_2

2. Create a new directory network under the D:\installed soft\instantclient_11_2 directory, create an admin directory under the network directory, create a new file tnsnames.ora under the admin directory, open and write the following content:

ORACLE =

  (DESCRIPTION =

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

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = oracle.zzl.com)

    )

  )

Among them , ORACLE is the instance name of the remote database ,

192.168.0.104 is the IP address of the remote database ,

1521 is the listening port of the database,

 oracle.zzl.com is the name of the remote database

3. Add an environment variable named TNS_ADMIN, whose value is the path where the tnsnames.ora file is located

4. Download and install PLSQL Developer, open PLSQL Developer after the installation is complete, then click configure, preferences, connection in turn, set Oracle Home and OCI library, restart PLSQL after the setting is complete

Oracle Home ( the location where the instant client is decompressed )

D:\installed soft\instantclient_11_2

OCI library

D:\installed soft\instantclient_11_2/oci.dll

5. Enter the account number, password, and instance name to connect to oracle, where the instance name is entered in the database input box

Guess you like

Origin blog.csdn.net/qq_20663229/article/details/82935800