Difference between revisions of "SQWareProduction:oracle"
m (Updated by Expdbtools) |
m (Updated by Expdbtools) |
(No difference)
|
Revision as of 23:39, 22 December 2010
Contents
- 1 Presentation
- 2 bin
- 2.1 SqwArchmon
- 2.2 sqwora_CheckIndicators.ksh
- 2.3 sqwora_CheckInstance.ksh
- 2.4 sqwora_SqwArchmon.ksh
- 2.5 sqwora_Export.ksh
- 2.6 sqwora_GatherIndicators.ksh
- 2.7 sqwora_GenerateAwr.ksh
- 2.8 sqwora_ParallelRun.ksh
- 2.9 sqwora_PartialRefresh.ksh
- 2.10 sqwora_PurgeAlert.ksh
- 2.11 sqwora_RmanBackup.ksh
- 2.12 sqwora_RmanClone.ksh
- 2.13 sqwora_RunJob.ksh
- 2.14 sqwora_SchemaRefresh.ksh
- 3 etc
- 3.1 sqwora_Awr.cfg
- 3.2 sqwora_CreDb_Create.cfg
- 3.3 sqwora_CreDb_CrontabRef.cfg
- 3.4 sqwora_CreDb_Init_101.cfg
- 3.5 sqwora_CreDb_Init_102.cfg
- 3.6 sqwora_CreDb_Init_111.cfg
- 3.7 sqwora_CreDb_Init_112.cfg
- 3.8 sqwora_CreDb_Jobs.cfg
- 3.9 sqwora_CreDb_Listener.cfg
- 3.10 sqwora_CreDb_Rman.cfg
- 3.11 sqwora_CreDb_Tnsnames.cfg
- 3.12 sqwora_DbRefVar.cfg
- 3.13 sqwora_GlobalVar.cfg
- 3.14 sqwora_IndicatorsVar.cfg
- 3.15 sqwora_Rman.cfg
- 3.16 sqwora_RmanClone.cfg
- 3.17 tnsnames.ora
- 3.18 .profile
- 3.19 .profile_confort
- 4 lib
- 4.1 sqwora_CheckIndicators.lib
- 4.2 sqwora_CheckIndicators_Overload.lib
- 4.3 sqwora_CheckInstance.lib
- 4.4 sqwora_CheckInstance_Overload.lib
- 4.5 sqwora_GatherIndicators.lib
- 4.6 sqwora_GatherIndicators_Overload.lib
- 4.7 sqwora_GenerateAwr.lib
- 4.8 sqwora_GenerateCreateDatabase.lib
- 4.9 sqwora_Global.lib
- 4.10 sqwora_InsertIndicators.lib
- 4.11 sqwora_MenuRman.lib
- 4.12 sqwora_PartialRefresh.lib
- 4.13 sqwora_RmanBackup.lib
- 4.14 sqwora_RmanClone.lib
- 4.15 sqwora_SchemaRefresh.lib
- 4.16 sqwora_SetEnv.lib
- 5 menu
- 6 tools
- 7 help
- 8 spm
Presentation
Usage
It's the module locally operating of oracle.
It is entirely written in ksh and sql.
It allows to manage the operation for oracle.
Example uses of the tool:
- Backup
- Recovery
- Compute statistics
- Indicators collection to store in referential database SQWareRepository
- Rotate logs
- ....
This module is deployed locally on the machine hosting the authorities to manage,
in order to avoid any points of weakness related to an NFS mount or whatever.
The deployment is done through a simple command SQWareCentral module using inventory located in SQWareRepository !
Installation guide for SQWareProduction for oracle
Explanation of directories
Directories located in $gvsqw_OraBin:
- bin : Directory containing standard scripts
- bin_cust : Directory containing customs scripts for your environnement
- etc : Directory containing the standard files of configuration
- etc_cust : Directory containing the customs files of configuration for your environnement (overload standards)
- help : Directory containing the standard files of help
- help_cust : Directory containing the customs files of help for your environnement
- lib : Directory containing the generic shell function librairies
- lib_cust : Directory containing the generic shell function librairies (overload standards)
- spm : Contain sql query toolkit
- tools : Directory containing the standard scripts used on an ad hoc
- tools_cust : Directory containing the customs scripts used on an ad hoc for your environnement
- menu : Directory containing the standard menus
- menu_cust : Directory containing the custom menus for your environnement
Naming convention of files
The majority of files are named with suffixes:
- *.ksh : for scripts
- *.cfg : for configuration files
- *.lib : for function librairies
- *.hlp : for help files
Naming convention in scripts
In general, the following naming convention is used in all scripts of SQWareProduction:
- gvsqw_ {} : global variable initialized by the environment and / or generic library
- lvsqw_ {} : local variable initialized by the script and / or a specific library
- gfsqw_ {} : function defined by a generic library
- lfsqw_ {} : function defined by the script and / or a specific library
bin
SqwArchmon
Script $gvsqw_OraBin/bin/SqwArchmon:
See the detailed help for SqwArchmon
sqwora_CheckIndicators.ksh
Script $gvsqw_OraBin/bin/sqwora_CheckIndicators.ksh:
Checks the indicators collected by sqwora_GatherIndicators.ksh
indicators are stored in SQWareRepository
generates email in html format with links to SQWareWeb
Standards checks:
- Instances without indicators
- Usage rate of tablespaces
- Usage rate of FS
- Instances without backup full succeed since ${gvsqw_NbDaysFull} days
- Instances without backup inc succeed since ${gvsqw_NbDaysInc} days
See the detailed help for sqwora_CheckIndicators.ksh
sqwora_CheckInstance.ksh
Script $gvsqw_OraBin/bin/sqwora_CheckInstance.ksh:
Check instance (security, parameters, ...)
Results can be put in SQWareRepository
Summary of checks:
- Unusable indexes
- Recovery Objects in default TBS of instance (prevents partial clone recovery)
- Useless quotas (TEMPORARY, ...)
- Users objects in SYSTEM TBS
- System objects not in SYSTEM TBS
- Users with SYSTEM default tablespace
- Users with admin role ganted ('DBA', 'IMP_FULL_DATABASE')
- Users with deprecated role ganted ('RESOURCE', 'CONNECT')
- Users with system privileges ganted ('UNLIMITED TABLESPACE','DROP USER','ALTER SYSTEM')
- Users with ANY privileges ganted (like '% ANY%', 'SELECT ANY DICTIONARY')
- Dangerous quotas (SYSTEM, default TBS of instance)
- Dangerous init parameters ('remote_os_authent','remote_os_roles','O7_DICTIONARY_ACCESSIBILITY')
- Plubic execute privilege on ('UTL_TCP','UTL_FILE','UTL_HTTP','UTL_SMTP','DBMS_LOB','DBMS_SQL','DBMS_SCHEDULER','OWA_UTIL')
See the detailed help for sqwora_CheckInstance.ksh
sqwora_SqwArchmon.ksh
Script $gvsqw_OraBin/bin/sqwora_SqwArchmon.ksh:
See the detailed help for sqwora_SqwArchmon.ksh
sqwora_Export.ksh
Script $gvsqw_OraBin/bin/sqwora_Export.ksh:
Generate Oracle export compressed by pipe
Type of export can be
- full
- schema
- structure (full rows=no)
- parfile
- tables
Script makes purge of old generation automatically
You can also choose:
- different retention policy
- type of compression
- gzip
- bzip2
- compress
- none
- different directory to put dump file
- different directory to put log file
See the detailed help for sqwora_Export.ksh
sqwora_GatherIndicators.ksh
Script $gvsqw_OraBin/bin/sqwora_GatherIndicators.ksh:
Gather Oracle indicators and put them in SQWareRepository
Summary of collection:
- Volumetry (use, free) of instance
- Volumetry (use, free) of tablespaces
- Volumetry of schemas
- Volumetry of tables
- Volumetry of segments
- Volumetry (use, free) of FS
- Version, options, configuration, ... of instance
See the detailed help for sqwora_GatherIndicators.ksh
sqwora_GenerateAwr.ksh
Script $gvsqw_OraBin/bin/sqwora_GenerateAwr.ksh:
Generate automatically AWR reports
Copy them in SQWareWeb and insert indicators in SQWareRepository
You can also choose:
- a different configuration file to generate reports
- a different directory to store reports
- to generate locally (don't copy reports on SQWareWeb and don't insert indicators in SQWareRepository)
- no delete local reports
See the detailed help for sqwora_GenerateAwr.ksh
sqwora_ParallelRun.ksh
Script $gvsqw_OraBin/bin/sqwora_ParallelRun.ksh:
Manages the execution of unix commands in parallel mode
Takes in parameter file with unix command to execute
You can choose:
- The parallel degree
- Aggressiveness of run (number of seconds between two runs)
- Aggressiveness of check end (number of seconds between two checks of end)
See the detailed help for sqwora_ParallelRun.ksh
sqwora_PartialRefresh.ksh
Script $gvsqw_OraBin/bin/sqwora_PartialRefresh.ksh:
Refresh of a tables list for one schema by exp/imp
Actions:
- Makes export of distant tables to refresh by ssh (list contained in a file)
- Retrieve dump file by scp
- Drop tables to refresh
- Makes import
The script can also:
- change of unix users target/source
- send email report of refresh
- run shell script after load
See the detailed help for sqwora_PartialRefresh.ksh
sqwora_PurgeAlert.ksh
Script $gvsqw_OraBin/bin/sqwora_PurgeAlert.ksh:
archiving/purge of trace/alert files of the instance
Makes an archive (tgz) of diagnostic tree
Purge old archives after a number of days
See the detailed help for sqwora_PurgeAlert.ksh
sqwora_RmanBackup.ksh
Script $gvsqw_OraBin/bin/sqwora_RmanBackup.ksh:
Makes RMAN backups
You can choose backup type:
- incremental level 0 (i0)
- incremental level 1 (i1)
- archivelog (log)
Backup can be made online or offline (hot, cold)
The script can also:
- use the option 'skip readonly'
- autostart sqwarchmon when hot backup (if lvsqw_RmanAutoStartSqwArchmon=enable)
- makes freeze/unfreeze of cluster ressources when cold backup
- makes blackout disable/enable of supervision when cold backup
This script use configuration file $gvsqw_RootCfg/sqwora_Rman.cfg
See the detailed help for sqwora_RmanBackup.ksh
sqwora_RmanClone.ksh
Script $gvsqw_OraBin/bin/sqwora_RmanClone.ksh:
Makes RMAN clone
Script is fully automatic:
- Check space (you have to customize this function)
- Retrieve choosed backup that can be:
- LastFull => retrieve the last full backup
- LastInc => retrieve the last incremental backup
- MaxTime => retrieve the last backup
- <tag> => retrieve this backup tag (part of file name)
- Unregister from RMAN catalog
- Save old password
- Destroy old database
- Run cloning
The script can also:
- ignore disk warning (stop by default)
- makes copy backup only
- change of unix users target/source
- choose parallel degree of backup copy
- send email report of cloning
- run shell script before load
- run shell script after load
This script use configuration file $gvsqw_RootCfg/sqwora_Rman.cfg
See the detailed help for sqwora_RmanClone.ksh
sqwora_RunJob.ksh
Script $gvsqw_OraBin/bin/sqwora_RunJob.ksh:
Run Oracle scripts and generate log and error file
based on $gvsqw_RootCfg/sqwora_Jobs.cfg configuration file
compress and purge oldest log files
See the detailed help for sqwora_RunJob.ksh
sqwora_SchemaRefresh.ksh
Script $gvsqw_OraBin/bin/sqwora_SchemaRefresh.ksh:
Refresh one or more schemas by exp/imp
Actions:
- Makes export of distant schema by ssh
- Retrieve dump file by scp
- Drop all objetcs of refreshed schema
- Makes import
The script can also:
- change of unix users target/source
- send email report of refresh
- run shell script before load
- run shell script after load
See the detailed help for sqwora_SchemaRefresh.ksh
etc
sqwora_Awr.cfg
Configuration file $gvsqw_OraBin/../etc/sqwora_Awr.cfg:
config for AWR report generation
See the detailed help for sqwora_Awr.cfg
sqwora_CreDb_Create.cfg
Configuration file $gvsqw_OraBin/../etc/sqwora_CreDb_Create.cfg:
See the detailed help for sqwora_CreDb_Create.cfg
sqwora_CreDb_CrontabRef.cfg
Configuration file $gvsqw_OraBin/../etc/sqwora_CreDb_CrontabRef.cfg:
See the detailed help for sqwora_CreDb_CrontabRef.cfg
sqwora_CreDb_Init_101.cfg
Configuration file $gvsqw_OraBin/../etc/sqwora_CreDb_Init_101.cfg:
See the detailed help for sqwora_CreDb_Init_101.cfg
sqwora_CreDb_Init_102.cfg
Configuration file $gvsqw_OraBin/../etc/sqwora_CreDb_Init_102.cfg:
See the detailed help for sqwora_CreDb_Init_102.cfg
sqwora_CreDb_Init_111.cfg
Configuration file $gvsqw_OraBin/../etc/sqwora_CreDb_Init_111.cfg:
See the detailed help for sqwora_CreDb_Init_111.cfg
sqwora_CreDb_Init_112.cfg
Configuration file $gvsqw_OraBin/../etc/sqwora_CreDb_Init_112.cfg:
See the detailed help for sqwora_CreDb_Init_112.cfg
sqwora_CreDb_Jobs.cfg
Configuration file $gvsqw_OraBin/../etc/sqwora_CreDb_Jobs.cfg:
See the detailed help for sqwora_CreDb_Jobs.cfg
sqwora_CreDb_Listener.cfg
Configuration file $gvsqw_OraBin/../etc/sqwora_CreDb_Listener.cfg:
See the detailed help for sqwora_CreDb_Listener.cfg
sqwora_CreDb_Rman.cfg
Configuration file $gvsqw_OraBin/../etc/sqwora_CreDb_Rman.cfg:
See the detailed help for sqwora_CreDb_Rman.cfg
sqwora_CreDb_Tnsnames.cfg
Configuration file $gvsqw_OraBin/../etc/sqwora_CreDb_Tnsnames.cfg:
See the detailed help for sqwora_CreDb_Tnsnames.cfg
sqwora_DbRefVar.cfg
Configuration file $gvsqw_OraBin/../etc/sqwora_DbRefVar.cfg:
Global var for indicators
It contains the operating variables of SQWareProduction.
See the detailed help for sqwora_DbRefVar.cfg
sqwora_GlobalVar.cfg
Configuration file $gvsqw_OraBin/../etc/sqwora_GlobalVar.cfg:
Global var for Oracle
It contains the operating variables of SQWareProduction.
See the detailed help for sqwora_GlobalVar.cfg
sqwora_IndicatorsVar.cfg
Configuration file $gvsqw_OraBin/../etc/sqwora_IndicatorsVar.cfg:
Global var for indicators scripts
It contains the operating variables of SQWareProduction.
See the detailed help for sqwora_IndicatorsVar.cfg
sqwora_Rman.cfg
Configuration file $gvsqw_OraBin/../etc/sqwora_Rman.cfg:
See the detailed help for sqwora_Rman.cfg
sqwora_RmanClone.cfg
Configuration file $gvsqw_OraBin/../etc/sqwora_RmanClone.cfg:
var for RMAN duplicate scripts
See the detailed help for sqwora_RmanClone.cfg
tnsnames.ora
Configuration file $gvsqw_OraBin/../etc/tnsnames.ora:
template for sqw tnsnames.ora
See the detailed help for tnsnames.ora
.profile
Sample file for .profile $gvsqw_OraBin/../etc/.profile:
Sample of lines to add to .profile of oracle users.
See the detailed help for .profile
.profile_confort
File to put aliases $gvsqw_OraBin/../etc/.profile_confort:
Contains confort aliases of SQWareProduction for RDBMS oracle.
See the detailed help for .profile_confort
lib
sqwora_CheckIndicators.lib
shell functions librairy $gvsqw_OraBin/../lib/sqwora_CheckIndicators.lib:
lib for sqwora_CheckIndicators.ksh
See the detailed help for sqwora_CheckIndicators.lib
sqwora_CheckIndicators_Overload.lib
shell functions librairy $gvsqw_OraBin/../lib/sqwora_CheckIndicators_Overload.lib:
template lib for overload sqwora_CheckIndicators.ksh
See the detailed help for sqwora_CheckIndicators_Overload.lib
sqwora_CheckInstance.lib
shell functions librairy $gvsqw_OraBin/../lib/sqwora_CheckInstance.lib:
lib for sqwora_CheckInstance.ksh
See the detailed help for sqwora_CheckInstance.lib
sqwora_CheckInstance_Overload.lib
shell functions librairy $gvsqw_OraBin/../lib/sqwora_CheckInstance_Overload.lib:
lib for overload sqwora_CheckInstance.ksh
See the detailed help for sqwora_CheckInstance_Overload.lib
sqwora_GatherIndicators.lib
shell functions librairy $gvsqw_OraBin/../lib/sqwora_GatherIndicators.lib:
lib for sqwora_GatherIndicators.ksh
See the detailed help for sqwora_GatherIndicators.lib
sqwora_GatherIndicators_Overload.lib
shell functions librairy $gvsqw_OraBin/../lib/sqwora_GatherIndicators_Overload.lib:
lib for overload sqwora_GatherIndicators.ksh
See the detailed help for sqwora_GatherIndicators_Overload.lib
sqwora_GenerateAwr.lib
shell functions librairy $gvsqw_OraBin/../lib/sqwora_GenerateAwr.lib:
lib for sqwora_GenerateAwr.ksh
See the detailed help for sqwora_GenerateAwr.lib
sqwora_GenerateCreateDatabase.lib
shell functions librairy $gvsqw_OraBin/../lib/sqwora_GenerateCreateDatabase.lib:
lib for generate create database
See the detailed help for sqwora_GenerateCreateDatabase.lib
sqwora_Global.lib
shell functions librairy $gvsqw_OraBin/../lib/sqwora_Global.lib:
central lib of generic fonctions for oracle
See the detailed help for sqwora_Global.lib
sqwora_InsertIndicators.lib
shell functions librairy $gvsqw_OraBin/../lib/sqwora_InsertIndicators.lib:
generic fonctions to insert into referential
See the detailed help for sqwora_InsertIndicators.lib
sqwora_MenuRman.lib
shell functions librairy $gvsqw_OraBin/../lib/sqwora_MenuRman.lib:
lib for sqwora_MenuRman.ksh
See the detailed help for sqwora_MenuRman.lib
sqwora_PartialRefresh.lib
shell functions librairy $gvsqw_OraBin/../lib/sqwora_PartialRefresh.lib:
lib for sqwora_PartialRefresh.ksh
See the detailed help for sqwora_PartialRefresh.lib
sqwora_RmanBackup.lib
shell functions librairy $gvsqw_OraBin/../lib/sqwora_RmanBackup.lib:
lib for RMAN backup
See the detailed help for sqwora_RmanBackup.lib
sqwora_RmanClone.lib
shell functions librairy $gvsqw_OraBin/../lib/sqwora_RmanClone.lib:
lib for RMAN clone
See the detailed help for sqwora_RmanClone.lib
sqwora_SchemaRefresh.lib
shell functions librairy $gvsqw_OraBin/../lib/sqwora_SchemaRefresh.lib:
lib for sqwora_SchemaRefresh.ksh
See the detailed help for sqwora_SchemaRefresh.lib
sqwora_SetEnv.lib
shell functions librairy $gvsqw_OraBin/../lib/sqwora_SetEnv.lib:
fonction to set env for $ORACLE_SID
See the detailed help for sqwora_SetEnv.lib
sqwora_MenuRman.ksh
Menu $gvsqw_OraBin/../menu/sqwora_MenuRman.ksh:
menu for RMAN commands
See the detailed help for sqwora_MenuRman.ksh
tools
sqwora_BackupPasswd.ksh
Script $gvsqw_OraBin/../tools/sqwora_BackupPasswd.ksh:
backup passwd of Oracle users
See the detailed help for sqwora_BackupPasswd.ksh
sqwora_GenerateCreateDatabase.ksh
Script $gvsqw_OraBin/../tools/sqwora_GenerateCreateDatabase.ksh:
Generate create database files
See the detailed help for sqwora_GenerateCreateDatabase.ksh
sqwora_ManageOracle.ksh
Script $gvsqw_OraBin/../tools/sqwora_ManageOracle.ksh:
stop/start instance
See the detailed help for sqwora_ManageOracle.ksh
sqwora_RmanConfigure.ksh
Script $gvsqw_OraBin/../tools/sqwora_RmanConfigure.ksh:
default paraters for RMAN and block change tracking
See the detailed help for sqwora_RmanConfigure.ksh
sqwora_RmanCrosscheck.ksh
Script $gvsqw_OraBin/../tools/sqwora_RmanCrosscheck.ksh:
Crosscheck and delete expired RMAN
See the detailed help for sqwora_RmanCrosscheck.ksh
sqwora_RmanRegister.ksh
Script $gvsqw_OraBin/../tools/sqwora_RmanRegister.ksh:
default paraters for RMAN and block change tracking
See the detailed help for sqwora_RmanRegister.ksh
sqwora_SetEnv.ksh
Script $gvsqw_OraBin/../tools/sqwora_SetEnv.ksh:
set env for $ORACLE_SID
See the detailed help for sqwora_SetEnv.ksh
sqwora_Spm.ksh
Script $gvsqw_OraBin/../tools/sqwora_Spm.ksh:
Sqlplus tools
See the detailed help for sqwora_Spm.ksh
help
Contains help files for -s option of bin scripts.
spm
SQL query toolkit
See the detailed help for spm