Conf - rbogusze/oracleinfrastructure GitHub Wiki

This little project was born out of a frustration regarding changes in the database init file. Usually when there is a change to the plain text init file the previous version is stored for the rollback purposes and just to make it clear that something was changed. With large DBA teams the procedures are not always followed, which makes me want to be certain how exactly certain files looked like at certain times.

Then I added SQL output from queries like segment stats - to see the growth and from dba_tables to see when the stats were gathered.

Very simplistic, just stores the files in local CVS repository.

Install CVS server as described in Promon wiki

Add conf_repo to local CVS

# cd /home/cvs
# mkdir conf_repo
# chown cvs:cvs conf_repo

Checkout the conf_repo directory

$ export CVSROOT=:pserver:cvs@logwatch:/home/cvs
$ cvs login
$ cvs co -d conf_repo conf_repo

Install ViewVC to visualise the CVS repository

http://www.viewvc.org/faq.html#installation

Login to orainf as root
# yum install viewvc rcs
or
# rpm -i viewvc-1.1.22-1.el5.rf.noarch.rpm


# cd /etc/httpd/conf
# cp httpd.conf httpd.conf_before_viewvc_`date -I`

# cd /etc/viewvc
# cp viewvc.conf viewvc.conf_org
# vim /etc/viewvc/viewvc.conf
# diff viewvc.conf viewvc.conf_org
96c96
< cvs_roots = cvsroot: /home/cvs
---
> #cvs_roots =

Uncomment the sample configuration
# vim /etc/httpd/conf.d/viewvc.conf

Add apache to cvs group
# vi /etc/group
cvs:x:54323:apache

# chmod g+rx /home/cvs
# /etc/init.d/httpd restart

http://logwatch/viewvc/

Checkout the main project files

$ svn checkout https://github.com/rbogusze/oracleinfrastructure/trunk/oi_conf

OK, the destination init file can be stored under: ldap ‘orainfDbInitFile’

Add orainf to cvs group to permanently remove files from repository

# usermod -a -G cvs orainf

Add empty dir to repository for diff between environments

$ cd /home/orainf/conf_repo
$ mkdir between_DBs
$ cvs add between_DBs
Directory /home/cvs/conf_repo/between_DBs added to the repository

Execute manually, then add to crontab.

#
# OI_CONF - get and store init file, SPMs, AD_BUGS to spot changes
#
40 23 * * 1-5 . ${HOME}/.bash_profile; cd ${HOME}/oi_conf; ./gather_data.sh > /tmp/gather_data.sh_last_run; ./gather_data_sql.sh > /tmp/gather_data_sql.sh_last_run; ./between_DBs.sh > /tmp/between_DBs.sh_last_run
⚠️ **GitHub.com Fallback** ⚠️