oracle environment variable settings

Forwarded
http://spryingf.blog.163.com/blog/static/200356006201281811710638/

Download and install: plsqldev
    Note: Do not install in the default C:\Program Files (x86) directory, otherwise an error will be reported because it cannot be resolved The path with ( )

1. Download the green free-installation client from the official website,
extract the file to D:\instantclient
2, configure tnsnames.ora, if Oracle is not installed on this machine, you can copy one from the machine where oracle is installed (tnsnames. The ora file is under % ORACLE_HOME%\network\admin) in the above directory d:\oracleclient11g.
oracledata =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.112)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl)
    )
  )

   

    3. Add an environment variable named TNS_ADMIN, whose value is the path where the tnsnames.ora file is located (eg: d:\oracleclient11g), in order to be able to find the tnsnames.ora mentioned above. If ORACLE is installed on the local machine and the ORACLE_HOME environment variable is set, the tnsnames.ora file will be automatically searched in the %ORACLE_HOME%/network/admin/ location.

    4, to solve the garbled code. Set the language of ORACLE, add the registry key: "NLS_LANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK", located in HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE. If ORACLE is not installed on this machine, there is no "ORACLE" item under H_L_M\SOFTWARE\, you need to create it manually, and then create the key NLS_LANG under the ORACLE item, the key value is: SIMPLIFIED CHINESE_CHINA.ZHS16GBK
or Chinese will be used when
querying If there are garbled characters, you need to modify the registry, but you can execute the code at runtime, as follows:
Create a new PLSql_run.bat and
edit the content as follows:
Java code Collection code
set nls_lang=SIMPLIFIED 
 
CHINESE_CHINA.ZHS16GBK PLSQLDev.exe 

Copy it to the plsql developer installation directory .

You can start it later through PLSql_run.bat. However, this is still a bit cumbersome and can be solved by environment variables, as follows:
New environment variable
Name : NLS_LANG
Value: AMERICAN_AMERICA.UTF-8

    5, download and install PL.SQL.Developer configuration application
    configuration tools->preferences->connection
    Find the parameter on the left side of the equal sign and fill in the corresponding content on the right side of the equal sign
    Oracle Home=D:\oracleclient11g
    OCI library =D:\oracleclient11g\oci.dll

    6, open plsql again and there will be oracledata option in the database to enter the user name and password to log in.
Source: http://www.cnblogs.com/sekon/archive/2011/12/25/2301332.html

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326531050&siteId=291194637