DB/관리

[펌] Instant Client (Oracle 10g) - Oracle Client 설치없이 바로 사용하자.

시처럼 음악처럼 2008. 3. 19. 10:59
오라클 클라이언트를 설치하지 않고도 바로 사용할 수 있는 방법이 있었군...
아래 방법대로 Path추가하고, registry에 NLS_LANG, TNS_ADMIN 추가한다.


퍼온곳 : http://blog.naver.com/orapybubu?Redirect=Log&logNo=40013952580

# 오라클 Client를 설치 않고 오라클서버 접속 방법


Oracle 10g에서는 Oracle Client를 설치하지 않고도 오라클을 사용할수 있게 되었습니다.

다음 설명은 Windows 2000을 대상으로 했으며 다른 OS도 비슷하게 처리할 수 있습니다.


1.제품 다운로드 : 필요한 것을 다운로드하면 됩니다. FREE!

 ▒ Instant Client Package - Basic
 ▒ Instant Client Package - SQL*Plus


2.압축해제

압축을 해제한 결과물을 한곳으로 모으는 것이 편리합니다.

예를 들어 C:\Ora\instantclient에 결과를 모으도록 합시다.


3.환경변수 PATH에 내용 추가

시스템 등록정보-고급-환경변수-시스템변수의 Path에 다음 값을 추가한다.

이 설명에서는 PATH에 C:\Ora\instantclient를 추가합니다.


4.레지스트리 등록

HKEY_LOCAL_MACHINE\SOFTWARE에 키 추가 : ORACLE

HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE에
문자열 추가 : NLS_LANG - .UTF8 (토드에서 한글 깨질 때는 KOREAN_KOREA.KO16MSWIN949)
문자열 추가 : TNS_ADMIN - 설치경로\Admin (여기에 tnsnames.ora 파일 넣어준다.)


참고 : 더 자세한 내용이 필요하시면 => 이리로




[Frequently Asked Questions]

How can Instant Client on Windows use registry settings?

tnsnames.ora 파일을 사용하려면...


Special settings for Instant Client enabled applications can be set in the registry for all users or on a per-user basis.
1. Using a registry editor (regedit or regedt32), go to HKEY_LOCAL_MACHINE\SOFTWARE for a global setting (or HKEY_LOCAL_MACHINE\HKEY_CURRENT_USER\SOFTWARE for each specific user).
2. Add ORACLE group key.
3. Add a new string value within the ORACLE key for the different settings you are interested in (NLS_LANG, TNS_ADMIN, etc.). For keys that are directories, use a fully qualified path.

   Modified: 06-APR-04    Ref #: ID-4988


Is Pro*C supported in Instant Client?

No, Pro*C is not supported by Instant Client. We recommend using Oracle C++ Call Interface (OCCI) when you want to use object-oriented programming capabilities.

   Modified: 10-OCT-03    Ref #: ID-3661


Can ISVs bundle Instant Client?

Instant Client can be bundled by anyone that can bundle the regular Client, including Embedded License holders. ISVs can redistribute Instant Client along with their own packaged applications for free.

   Modified: 25-FEB-04    Ref #: ID-3666


Is SQL*Plus supported by Instant Client?

Yes, SQL*Plus can be used in conjunction with Instant Client. Just download the SQL*Plus package for your platform.

   Modified: 13-FEB-04    Ref #: ID-3664


Can Instant Client be redistributed?

Yes. Instant Client can be redistributed by ISVs to their customers in their custom installations. Enterprises can redistribute Instant Client within their organizations. However, customers can only call Oracle Support for Instant Client if they have a standard support contract.

   Modified: 04-FEB-04    Ref #: ID-4379


What does Instant Client cost?

Instant Client is FREE for anyone to use in a development or production environment. However, customers can only call Oracle Support if they already have a standard support contract.

   Modified: 04-FEB-04    Ref #: ID-4384


What can Instant Client be used for?

Instant Client can be used to run your OCI, OCCI, JDBC, and ODBC applications without installing a full Oracle Client. In addition, Instant Client supports SQL*Plus.

   Modified: 04-FEB-04    Ref #: ID-4386


How do I specify connection strings in Instant Client mode?

All Oracle net naming methods that do not require use of ORACLE_HOME or TNS_ADMIN (to locate configuration files such as tnsnames.ora or sqlnet.ora) work in the Instant Client mode. In particular, the connect string can be specified in the following formats:

A SQL Connect URL string of the form:

//host:[port][/service name]

such as:

//dbase-server-5:4321/ORDERS

As an Oracle Net keyword-value pair. For example:

"(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp) (HOST=dlsun242) (PORT=5521))
(CONNECT_DATA=(SERVICE_NAME=bjava21)))"

Naming methods that require TNS_ADMIN to locate configuration files continue to work if the TNS_ADMIN environment variable is set.

If the TNS_ADMIN environment variable is not set, and TNSNAMES entries such as inst1, and so on, are used, then the ORACLE_HOME variable must be set, and the configuration files are expected to be in the $ORACLE_HOME/network/admin directory.

Please note that the ORACLE_HOME variable in this case is only used for locating Oracle Net configuration files, and no other component of Client Code Library (OCI, NLS, and so on) uses the value of ORACLE_HOME.

The bequeath adapter or the empty connect strings are not supported. However, an alternate way to use the empty connect string is to set the TWO_TASK environment variable on UNIX, or the LOCAL variable on Windows, to either a tnsnames.ora entry or an Oracle Net keyword-value pair. If TWO_TASK or LOCAL is set to a tnsnames.ora entry, then the tnsnames.ora file must be able to be loaded by TNS_ADMIN or ORACLE_HOME setting.

   Modified: 08-APR-04    Ref #: ID-4428


How does Instant Client interact with an ORACLE_HOME?

As long as the library loading path has the directory containing Instant Client files (e.g. the instantclient directory) ahead of library directory in ORACLE_HOME, the application will operate in the Instant Client mode, and the libraries in the ORACLE_HOME will not be used.

   Modified: 25-FEB-04    Ref #: ID-4430


What behavior changes can I expect for Oracle environment variables?

Environment variables ORA_NLS33, ORA_NLS32, and ORA_NLS are ignored in the Instant Client mode. The ORA_TZFILE environment variable should be set to the name of the large timezone file as opposed to its full path. All other environment variables (such as NLS_LANG) have no change in behavior.

   Modified: 25-FEB-04    Ref #: ID-4432


Why do I get an error with the message "message file not found"?

Some Oracle applications are currently certifying operation under Instant Client. Once certification is complete, the message will disappear.

   Modified: 04-MAR-04    Ref #: ID-4568


Why do I see an increased virtual memory footprint when running my applications in conjunction with Instant Client?

The Instant Client libraries occupy a virtual address space that is equal to the size of the files. However, only frequently used error messages from the libraries occupy physical memory. Under most cases, the physical memory load is a few kilobytes despite the larger reserved virtual address space.

   Modified: 04-MAR-04    Ref #: ID-4570


How does Instant Client interact with an existing ORACLE_HOME-based client installation?

If you already have Oracle Client installed on your machine, then we recommend:
1. Do NOT unzip or copy the Instant Client libraries to either of ORACLE_HOME/lib or ORACLE_HOME/bin directories, to avoid overwriting files and leaving the installation in an inconsistent state. In general, we recommend putting the Instant Client libraries into a separate clean directory.
2. Do NOT put both the Instant Client directory AND the Oracle Client directory in the Library Path, regardless of ordering. Please use either one or the other in the Library Path (LD_LIBRARY_PATH or PATH, depending on platform), but not both, based on the version you wish to use.

   Modified: 06-APR-04    Ref #: ID-4990


How do I ensure that my "tnsnames.ora" file is being used in Instant Client?

Always set the TNS_ADMIN environment variable or registry setting to the full path of the tnsnames.ora file. This practice will ensure that you are using the appropriate tnsnames.ora for your application when running with Instant Client.

   Modified: 08-APR-04    Ref #: ID-5028


What is the interoperability of Instant Client with various database versions?

The Instant Client interoperates with any database version that the full Oracle Client interoperates with. Please see the interoperability matrix:

Metalink Note 207303.1

   Modified: 17-MAY-04    Ref #: ID-5348