E.2 Net8 Variables and Windows NT

Team-Fly    

 
Oracle Net8 Configuration and Troubleshooting
By Jonathan Gennick, Hugo Toledo
Table of Contents
Appendix E.  Environment and Registry Variables


E.2 Net8 Variables and Windows NT

On Windows NT systems, you have two optionsthree, reallyfor setting the variables described in this chapter:

  • You can set these variables as environment variables from the Environment Variable tab in the System Properties dialog.

  • You can set these variables as environment variables from the command prompt.

  • You can set these variables as registry variables.

The difference between the first two options, which both involve the use of environment variables, is one of scope. When you set an environment variable from the System Properties dialog, that setting is inherited by all processes and applications that start. When you set an environment variable from a command prompt window, that setting only affects programs initiated from that particular window. It's actually possible, for example, to have two or more Windows NT command prompt windows open, all with different values for Net8 environment variables such as LOCAL and TNS_ADMIN. That can get confusing, but occasionally it's handy to be able to do.

Registry variables represent the third option. Registry settings are specific to an Oracle Home, so it's possible to set different values for different Oracle Homes on your system. Registry values affect executables that are run from their corresponding Oracle Home directory.

Environment variables take precedence over registry variables.

E.2.1 Setting Environment Variables Under Windows NT

There are two ways to set environment variables under Windows NT. To set them globally, use the System Properties Environment tab as shown in Figure 5.1. To open the System Properties dialog, right-click on the My Computer icon and choose Properties from the fly-out menu.

Figure E.1. Setting an environment variable for a Windows NT system
figs/n8c_ae01.gif

To set an environment variable from a command prompt window, use the SET command. For example:

 C:\A>  SET TNS_ADMIN=c:\settings\oracle  C:\A> 

Remember that when set from a command prompt window, environment variables only affect programs run from that window.

E.2.2 Setting Net8 Variables in the Windows NT Registry

Net8 settings made in the registry are always specific to an Oracle Home. The registry structure used by Oracle8 i consists of a series of keys named HOME0, HOME1, HOME2, and so forth. These Oracle-Home specific keys are all located under the following key:

 My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE 

Figure 5.2 shows a registry with two Oracle Home keys named HOME0 and HOME1. HOME0 is selected, and the ORACLE_HOME variable in the right-hand pane tells you that this Oracle Home is located in the directory E:\Oracle\Ora81 . Also in the right-hand pane, you can see that the TNS_ADMIN value has been set for this Oracle home.

Figure E.2. Net8 environment variables in the Windows NT Registry
figs/n8c_ae02.gif

The TNS_ADMIN setting that you see in Figure 5.2 is specific to the first Oracle Home. To have the second Oracle Home use the same set of Net8 configuration files, you would have to set TNS_ADMIN for HOME1 as well. Alternatively, you could set an environment variable using the System Properties dialog.

The registry structure used by Oracle prior to Oracle8 i is different from what you see in Figure 5.2. All the Oracle entries still fall under the My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE registry key, but Oracle7 and Oracle8 do not really support multiple Oracle Homes on one Windows NT server. There are no HOME0 and HOME1 keys for those old releases. Instead, Net8 variables are set in the ORACLE key.


Team-Fly    
Top


Oracle Net8 Configuration and Troubleshooting
Oracle Net8 Configuration and Troubleshooting
ISBN: 1565927532
EAN: 2147483647
Year: 2000
Pages: 120

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net