Configuration |
Since the configuration file is executed as a shell script, we have to stick to
Shell rules here - i.e., no spaces left or right to the equal sign: the syntax
is strictly "var=value ". Do not ever remove or comment out any
configuration lines, even if you want to use the defaults, since this may
lead to misbehaviour. The scripts relies on the settings are made in the config
file.
|
Required Settings |
The configuration shipped with DBAHelpers already contains useful default values
for most settings. However, there are some values the developer cannot know
or set up to auto-run on every system, such as usernames, passwords, etc.. So
these are the minimum of settings you have to make in order for the scripts to
run properly:
|
Variable | Explanation |
Database Information |
user |
The user and password to connect to the
database. Although you may override these settings using the command
line parameters "-u" and "-p", this is not recommended for the password
on manual calls, since the entire command line can be made visible by
any user e.g. with the ps command (or later on by evaluating
the shell history), and thus the password can be sniffed. So better
specify it inside the script and protect the file against unauthorized
access. More security can be gained by using OS verification, which is
now the default setting (empty user and password) -- but this may not
work well if you want to access remote databases. If you need different
user/password combinations, the recommendation is to use different config
files, which you then can specify on the command line using the "-c" switch. |
password |
|
Optional Settings |
Once you are familiar with the reports generated by OraRep, you may want to
fine-tune it a bit to better suit your requirements. For this issue, the
config file provides some more settings which are to be explained here:
|
Variable | Explanation |
Database Information |
ORACLE_SID |
As already known from the Oracle setup, the ORACLE_SID
is the Service IDentifier for a given database instance. In the
context of OraRep, the SID is additionally used to generate the
file names for the database report files, which will be called
<ORACLE_SID>.html . If you did not specify a
separate connection string (see the command line parameter "-c"
in the Usage section of this
documentation), this value is also used to connect to the database. |
Files and Directories |
PREFIX |
Important actions and results are logged to a file using
the SPOOL facility of SQL*Plus. To be able to determine
which file to look up, it is possible to let the scripts automatically
generate suitable filenames: leaving this setting to DEFAULT
exactly does this. Filenames with this setting are always made up by
the script and parameter names, e.g.
tabmov-<ORACLE_SID>-<SourceTS>-<TargetTS>.spool
for the tabmove.sh script. You can turn off logging by
specifying OFF here. Everything else will be taken literally
and used as the filename, while the extension will stay to .spool . |
Settings for analobj.sh and tabreorg.sh |
NUMROWS |
As the tables reorganization is done to minimize IO overhead,
too small tables do not need our attention: as long as their size is
small enough to fit into DB_FILE_MULTIBLOCK_READ_COUNT
data blocks, it is always completely loaded. So here you may specify
the minimal required size (in table rows) for a table to be reported
(analobj.sh ) or reorganized (tabreorg.sh ).
Ignored if called with --force parameter. |
CHAINCNT |
How many chained rows must a table have in order to be
reported by analobj.sh . We want to save us unnecessary
reports, so we restrict it here. Ignored if called with --force
parameter. |
CALCSTAT |
Before we can report migrated rows (or to know, what tables
need to be re-organized), we need to build statistics, since w/o doing
an ANALYZE TABLE the needed information is not available.
While COMPUTE is the more precise method, you may want to
stay with ESTIMATE here because it is faster. |
LOGALL |
If you want to see each statement we execute (and not just
the results), set this to "1" - otherwise leave it to "0". With
LOGALL enabled, the log files may get quite long - but all
useful information is available without it. However you may need this
option in case of debugging. Can be overridden by the -l
command line parameter. |
tabreorg.sh settings |
TR_USEDINC |
If we encounter to many migrations on a table,
a reason we also should take into consideration are inefficient settings
of PCTFREE and PCTUSED . So after moving the
table to its temporary place, tabreorg.sh can adjust the
values for these settings. Specify integer values here, which shall be
added to the objects momentary values. |
TR_FREEINC |
TR_CHAINEDPCT |
Since it doesn't make much sense to re-organize a huge
table with just 0.01% chained/migrated rows (this would only cause a
lot of overhead for no general improvement), tabreorg.sh
consults this variable in order to decide whether it shall re-organize
a table or not: if the tables percentage of migrated/chained rows is
higher than TR_CHAINEDPCT , it will be re-organized;
otherwise it will be skipped. Suitable values here should be 5 or
larger. Ignored if called with --force parameter. |
tabreorg.sh and
idxrebuild_all.sh settings |
INIT_* |
Settings for the size of the initial and next
extents, based on the object size. The scripts consider all objects less
than 256k as small, between 256k and 5M medium, 5M to 100M large, and
bigger ones as XXL. |
NEXT_* |
|
RMAN Settings |
RMAN configuration for the database mostly takes place in the
rman/rman.conf file. If you have multiple databases running on
the same host, you can also use database specific configuration files, named
rman/rman_$ORACLE_SID.conf . If such a file is found for the
database to handle, it is prefered over the common rman.conf (to
which it defaults otherwise). These files are especially useful for the
rman.sh backup_daily --all command - for this (and possible other
command line switches), see RMAN usage.
Settings for rman.sh itself are made inside the rmanrc
file, which is located in the rman/ subdirectory of your DBAHelper
installation (or in /etc after an automated
installation - in which case settings from rman/rmanrc would
simply overwrite the settings from /etc/rmanrc , so you may put
your changes in either file considering that fact):
|
Variable | Explanation |
LOGDIR |
Directory where the log files should be created in. |
SPOOLFILE |
Where rman.sh temporarily buffers the output
of executed commands, to e.g. display it inside a tailbox (dialog
UI). |
TMPFILE |
File to be used for temporary stuff (usually to setup
scripts to run). This file will be created when needed and deleted after
each run. |
TEMPTS_NAME |
Default name for your temporary tablespace. Used by the
restore_ts command, which will ask you to confirm it on run. |
TEMPTS_FILE |
Exact location (path and file name) for the tempfile used
by your temporary tablespace. Used by the
restore_ts command, which will ask you to confirm it on run. |
TEMPTS_SIZE |
Size for your temporary tablespace (see Oracle documentation
for syntax - usually this is an integer optionally followed by "K" for
kilobytes, "M" for megabytes or "G" for gigabytes). Used by the
restore_ts command, which will ask you to confirm it on run. |
TEMPTS_AUTOEXTEND |
Whether your temporary tablespace should make use of the
AutoExtend feature (ON) or not (OFF). Refer to your Oracle documentation
for more details. Used by the
restore_ts command, which will ask you to confirm it on run. |
USEDIALOG |
Whether to use the friendlier UI built with dialog ,
if possible (1) or not (0). If dialog is not installed,
this setting has no effect and the script will fallback to "plain
shell" mode. It will also fallback if you specified -q
on the command line more than once (e.g. for scripts). This setting
can be overruled by the --[no]dialog command line switch. |
TIMEOUT |
Only relevant to the dialog UI: Close
un-answered message boxes after this many seconds. |
|
ExportOracleDB |
The default settings inside this script use the same names as the original
options of Oracles EXP utility - so you can refer to "exp help=y "
for their syntax. Note that not all options of the utility are reflected here:
The intention of this script is to do a fast full export only. Of course you
can extend the script and send it back to me :)
|