Selecting an Instance with Environment Variables (18)

tsinglee發表於2007-12-16

Before you attempt to use SQL*Plus to connect locally to an Oracle instance, you must
ensure that environment variables are set properly. When multiple database instances
exist on one server, or when an Automatic Storage Management (ASM) instance exists
on the same server as one or more database instances, the environment variables
determine which instance SQL*Plus connects to. (This is also true when there is only
one Oracle instance on a server.)
For example, each Oracle instance (database or ASM) has a unique system identifier
(SID). To connect to an instance, you must at a minimum set the ORACLE_SID
environment variable to the SID of that instance. Depending on the operating system,
you may need to set other environment variables to properly change from one instance
to another.
Refer to the Oracle Database Installation Guide or administration guide for your
operating system for details on environment variables and for information on
switching instances.

使用環境變數選擇例項
1. 環境變數決定了sqlplus連線哪個例項
2. 設定 ORACLE_SID 後環境變數後 , 相當於指向了那個例項(SID)

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10599713/viewspace-994012/,如需轉載,請註明出處,否則將追究法律責任。

相關文章