I. Oracle environment BUILDING 1. Installing Oracle 10g
We install the Orcale on the virtual machine and connect remotely.
(1) Unzip the file 10201_database_win32.zip, and double-click the setup.exe in the extracted directory, the installation interface appears.
(2) Enter the password and Confirm password, such as: password, click Next, the following progress bar appears, this password is the administrator password.
(3) Check the prerequisites and select the box shown in the Red box.
(4) Click "Next", the "Summary" screen appears, click "Install".
(5) When finished, the "Password management" screen appears, click "Password Management".
(6) Remove the ditch for Scott and HR users (unlock these two accounts) and enter the password, as shown in, click "OK".
(7) to the "Password Management" screen, click "OK".
(8) End of installation, click "Exit".
(9) test whether the installation is successful
On the command line of the virtual machine input: sqlplus Scott/tiger (Scott is the username tiger is the password that needs just the configuration). If the following occurs, the connection is successful.
Second, the local PC-side configuration
We use Plsql to connect to remote Oracle.
Installation of 1.Orcale clients
(1) Download oracleinstanceclient
Plsql Developer does not support Oracle 64-bit client connections. So we download the 32-bit.
Unzip to the same folder.
(2) Configuring environment variables for Sqlplus
Place the path of the file under the path variable. F:\Program\instantclient_12_1
(3) test whether the database can be connected
Open Local command line input: Sqlplus scott/[email PROTECTED]:1521/ORCL
The above information indicates that the connection was successful.
(4) Add Tnsnames.ora file
Create a new directory network under the F:\Program\instantclient_12_1 directory, create a new admin directory under the network directory, create a new file Tnsnames.ora in the Admin directory, and use a text editor to open and write the following:
ORCL =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.56.101 ) (PORT = 1521))
)
(Connect_data =
(service_name = ORCL )
)
)
1th Scarlet Letter: defines the remote server in the local hostname.
2nd Scarlet Letter: The IP address of the remote server.
3rd Scarlet Letter: The instance name of the remote database.
(5) Add tns_admin environment variables
The value is the path where Tnsnames.ora is located, for example: F:\Program\instantclient_12_1\network\admin
(6) Set Orcle language Add, environment variable
environment variable Nls_lang, with a value of simplified Chinese_china. Zhs16gbk
You can use the command to view: Select Userenv (' language ') Nls_lang from dual;
Configuration of the 2.pl/sql Developper
(1) Download the installation into the configuration
(2) Exit re-entry
(3) Create a new query window to see if the database is connected
In the right margin, create a new SQL Window and enter the following command.
SELECT * from EMP;
3. Error exceptions
If you click PL/SQL, the following exception occurs
Description The Orcale client installs 64-bit, to be replaced by 32-bit. PL/SQL Developer does not support Oracle 64-bit client connections.
Basic Learning for Oracle (i)-Installing Oracle