If you type the xhost command by itself (with no parameters), it displays all remote hosts that can display X sessions on the local computer: $ xhost
access control disabled, clients can connect from any host
Setting the DISPLAY operating system variable on the remote server is also crucial. This allows you to remotely log in to another host and display an X application back to your local computer. The DISPLAY
22
CHAPTER 1 ■ INSTALLING THE ORACLE BINARIES
variable must be set on the remote database server, and it must be set to contain information that points it to the local computer on which you want the graphical screen displayed.
Summary
This chapter detailed techniques for efficiently installing the Oracle binaries. These methods are especially useful if you work in environments where you are geographically separated from the database servers. The Oracle silent installation method is efficient because it doesn't require graphical software and uses a response file that helps enforce consistency from one installation to the next. When working in chaotic and constantly changing environments you should benefit from the installation tips and procedures described here.
Many DBAs feel more comfortable using Oracle's graphical installer for installing the database software. However, using the graphical installer can be troublesome where the server is in a remote location or embedded deeply within a secure network. A slow network or a security feature can greatly impede the graphical installation process. In this situations make sure you correctly configure the required X software and operating system variables (such as DISPLAY).
It's critical as a DBA to be an expert with Oracle installation procedures. If the Oracle installation software isn't correctly installed you won't be able to successfully create a database. Once you have properly installed Oracle, you can go on to the next step of starting the background processes and creating a database. The topics of starting Oracle and issuing a creating a database are discussed next in Chapter 2.
23
CHAPTER 2 ■ IMPLEMENTING A DATABASE
A Manually Intensive Approach
In Linux/Unix, when you’re using the Bourne, Bash, or Korn shell, you can set operating system variables manually from the operating system command line using the export command: $ export ORACLE_HOME=/ora01/app/oracle/product/11.2.0/db_1
$ export ORACLE_SID=O11R2
$ export LD_LIBRARY_PATH=/usr/lib:$ORACLE_HOME/lib
$ export PATH=$ORACLE_HOME/bin:$PATH
For the C or tcsh shell, use the setenv command to set variables:
$ setenv ORACLE_HOME
$ setenv ORACLE_SID
$ setenv LD_LIBRARY_PATH
$ setenv PATH
Another way that DBAs set these variables is by placing the previous export or setenv commands into a startup file such as .bash_profile, .bashrc, or .profile. That way, the variables are automatically set upon login.
However, manually setting OS variables (either from the command line or from a startup file) isn’t the optimal way of instantiating these variables. For example, if you have multiple databases with multiple Oracle homes on a box, manually setting these variables quickly becomes unwieldy and not very maintainable.
Oracle’s Approach to Setting OS Variables
A much better method for setting OS variables uses a script that uses a file that contains the names of all Oracle databases on a server and their associated Oracle homes. This approach is flexible and maintainable. For example, if a database’s Oracle home changes (for example, after an upgrade), you only have to modify one file on the server and not hunt down where the Oracle home variables may be hard-coded into scripts.
Oracle provides a mechanism for automatically setting the required OS variables. Oracle’s approach relies on two files: oratab and oraenv.
Understanding oratab
You can think of the entries in the oratab file as a registry of what databases are installed on a box and their