Databases Reference
In-Depth Information
# User specific aliases and functions
. $HOME/bin/dba_setup
. $HOME/bin/dba_fcns
Now, each time you log in to an environment, you have full access to all the OS variables, aliases, and functions
established in the dba_setup and dba_fcns files. If you don't want to log off and back in, then run the file manually,
using the dot ( . ) command. This command executes the lines contained within a file. The following example runs the
.bashrc file:
$ . $HOME/.bashrc
The dot instructs the shell to source the script. Sourcing tells the shell process you're currently logged in to,
to inherit any variables set with an export command in an executed script. If you don't use the dot notation, then
the variables set within the script are visible only in the context of the subshell that is spawned when the script is
executed.
Not
In the Bash shell the source command is equivalent to the dot ( . ) command.
Summary
This chapter described how to configure an efficient environment. This is especially important for DBAs who manage
multiple databases on multiple servers. Regular maintenance and troubleshooting activities require you to log in
directly to the database server. To promote efficiency and sanity, you should develop a standard set of OS tools and
SQL scripts that help you maintain multiple environments. You can use standard features of the OS to assist with
navigating, repeating commands, showing system bottlenecks, quickly finding critical files, and so on.
The techniques for configuring a standard OS are especially useful when you're working on multiple servers with
multiple databases. When you have multiple terminal sessions running simultaneously, it's easy to lose your bearings
and forget which session is associated with a particular server and database. With just a small amount of setup, you
can make certain that your OS prompt always shows information such as the host and database. Likewise, you can
always set your SQL prompt to show the username and database connection. These techniques help ensure that you
don't accidentally run a command or script in the wrong environment.
After you have installed the Oracle binaries, created a database, and configured your environment, you are ready
to perform additional database administration tasks, such as creating tablespaces for the applications. The topic of
tablespace creation and maintenance is discussed in the next chapter.
 
 
Search WWH ::




Custom Search