ORACLE环境变量和PLSQL设置

环境变量

ORACLE_HOME:

E:oracleAdministratorproduct11.2.0dbhome_1

PATH:

E:oracleAdministratorproduct11.2.0dbhome_1BIN

listener.ora

SID_LIST_LISTENER =
    (SID_LIST =
        (SID_DESC =
          (SID_NAME = PLSExtProc)
          (ORACLE_HOME = E:oracleAdministratorproduct11.2.0dbhome_1)
          (PROGRAM = extproc)
        )    
         (SID_DESC =

          (GLOBAL_DBNAME = orcl )

          (ORACLE_HOME = E:oracleAdministratorproduct11.2.0dbhome_1)

          (SID_NAME = orcl )

        ) 
      )LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
  )

tnsnames.ora

ORCL =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

sqlnet.ora

SQLNET.AUTHENTICATION_SERVICES= (NTS)NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

PL/SQLDeveloper设置

  • PATH – Needs to include the Instant Client directory (where oci.dll is located).

  • TNS_ADMIN – Needs to point to the directory where tnsnames.ora is located.

  • NLS_LANG – Defines the language, territory, and character set for the client.

  • PATH目录中必须包含oci.dll所在的路径。

  • TNS_ADMIN 必须指向tnsnames.ora所在的目录。比如 D:oracle10g_client ,则在D盘的目录oracle10g_client中必须要有tnsnames.ora

  • NLS_LANG 指定数据库连接语言,比如中文:SIMPLIFIED CHINESE_CHINA.ZHS16GBK

原文

You have more than one Oracle Client software installations. In this case PL/SQL Developer may have chosen an Oracle Client that is not appropriate. Cancel the logon dialog, go to Tools > Preferences > Oracle / Connection, select the appropriate Oracle Home from the list, restart PL/SQL Developer and try again.

0%