Transfer to Oracle to install temporary client use summary

Summary of Oracle installation temporary client
Since all oracle 11g is installed on the machine, the machine is too stuck, so uninstall oracle and install the client, and the effect is obvious.

First go to the official website to download the oracle 11 client, (I am using a 64-bit system) address:
http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html

Download: instantclient -basic-win-x86-64-***; core package
instantclient-sqlplus-windows.x64-**; sqlplus package

instantclient-jdbc-win32-11.1.0.7.0.zip Package containing JDBC

Driver Unzip it all Go to the D:\Program Files\instantclient_11_2 directory.
Create a new NETWORK\ADMIN\ folder in D:\Program Files\instantclient_11_2.
Create the tnsnames.ora file under ADMIN.

Custom DatabaseName=

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL
= TCP)(HOST = server IP address)(PORT
= 1521))

)

(CONNECT_DATA =

(SERVICE_NAME = server SID)

)

)

Open pl /SQL-->Toos-->Preferences-->Oracle-->Connection There are two option boxes, ORACLE_HOME and OCI, as follows:

Write the connection driver in ORACLE_HOME; in

OCI Write the oci.dll file.

I tried this step, and it seems that there is no problem with it. The key is the configuration of environment variables. The
attribute value must be correct, and do not end with a semicolon.

Add environment variables:

TNS_ADMIN: D:\ProgramFiles\instantclient_11_2\NETWORK\ADMIN;(where the nsnames.ora file is located)

NLS_LANG : SIMPLIFIEDCHINESE_CHINA.ZHS16GBK;

LANG : zh_CN.GBK (solve Chinese garbled characters)

ORACLE_HOME : D:\ProgramFiles\instantclient_11_2; (All locations of the client folder)

Add D:\ProgramFiles\instantclient_11_2 to the environment variable PATH; (where sqlplus is located)
Test: Start +R-->cmd-->sqlplus "user/passwd@TNS_NAME" OK!!

PS : If ORA-12705: Unable to access the NLS data file, or the specified environment is invalid, delete the NLS_LANG variable in the environment variable!

If it is removed directly, it may cause the problem of Chinese garbled characters.

TNS_NAME is the TNS name configured in the tnsnames.ora file, such as ORCL_188. instead of the instance name or listen name of the database.



Note: The information behind sqlplus must be enclosed in double quotation marks, otherwise the following exception will occur:



Summary of problems during the installation process:

1. ORA-12705: The NLS data file cannot be accessed, or the specified environment is invalid

. Cause:

1 . It may be because Oracle has been installed before, and it has not been uninstalled completely, and there are still residual files in the registry.

Under Windows platform, generally enter cmd and run regedit to enter the registry, enter HKEY_LOCAL_MACHINE
--> SOFTWARE --> Wow6432Node --> Oracle --> HEY_DevSuiteHome1, find NLS_LANG in the list on the right, if you want to set it to English language, set it to : AMERICAN_AMERICA.ZHS16GBK, can also be set to Chinese character set: SIMPLIFIED CHINESE_CHINA.ZHS16GBK.

If no other Oracle programs are installed, the entire Oracle registry file can be deleted directly.

2. Error setting NLS_LANG in environment variable. Since the value of NLS_LANG here is a single attribute value instead of multiple paths, you
must
not add a semicolon at the end, otherwise an error will always be reported.

2. The TNS configured on the login interface of PL/SQL developer cannot be displayed all the time.

1. First, check whether TNS_ADMIN is configured in the environment variable. Whether the tnsnames.ora file is correctly created in the corresponding path.

Example:

ORCL_188=(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = ip address)(PORT = 1521)))(CONNECT_DATA
= (SID = orcl)))

ORCL_100=(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = ip address) (PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = orcl)))

SID
and SERVICE_NAME can be configured in CONNECT_DATA here.

2. Check whether the path of sqlplus is specified in the Path of the environment variable. Add D:\Program Files\instantclient_11_2 (where sqlplus is located) to

the environment variable PATH.

Note: In the environment variable, the attribute value configured at the end should not be at the end of the attribute value. End with a ";" semicolon.
For example,

the attribute value of TNS_ADMIN ends with a semicolon. When PL/SQL is opened, it is found that the corresponding TNS configuration file information cannot be read.

3. TNS always appears when logging in: no listener.

1. Check whether the port configured by TNS is correct.

The reason I got the error was that the last digit of the port was wrong.

4. The listener program cannot identify the corresponding request service

This is more obvious, the service instance SERVICE_NAME configured in TNS does not exist.

Generally corresponds to the instance name of the database, such as orcl

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326905743&siteId=291194637