Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Audit Script For Postgresql

  • Here I explained about how to write audit script for  postgresql(postgresql.conf) server
  • i put all entries in bash profile so you don't need to set bin, if you type pg_ctl it ill automatically select all postgres path like pgdata,pghome pgdatabase..
  • create one file in root and set chmod 777 permission to postgres user  becouse you want to run this file..
1.vi change_parmater.sh
2.check enterprisedb privillages
3.take backup of postgresql.conf file 
eg.$cp /opt/PostgresPlus/9.2AS/data/postgresq.conf /opt/PostgresPlus/9.2AS/data/postgresql.conf.bkp --becouse saftey purpose..
vi change_paramter.sh

cd ..
mkdir audit
chmod 755 audit/
chown -R enterprisedb:enterprisedb audit/
echo "log_statement = 'none'" >>postgresql.conf
echo "log_destination='syslog'" >>postgresql.conf
echo "log_connections = on"  >>postgresql.conf
echo "log_disconnections = on"  >>postgresql.conf 
echo "log_directory=pg_log" >>postgresql.conf
echo "edb_audit_filename = 'audit-%Y-%m-%d_%H%M%S'" >>postgresql.conf
echo "log_filename = 'enterprisedb-%Y-%m-%d_%H%M%S.log'"  >>postgresql.conf
echo "edb_audit_directory ='/opt/PostgresPlus/9.2AS/audit/'" >>postgresql.conf
--Run the change_parmater.sh script following method
#sh change_parmater.sh
--after that user to start server like this way  
#/etc/init.d/ppas.9.2 restart (or)
#pg_ctl reload -D $PGDATA


Popular posts from this blog

rman interview and scenario based questions and answer and also rman(backup and recovery) discussions panel

How to Get Table Size, Database Size, Indexes Size, schema Size, Tablespace Size, column Size in PostgreSQL Database

How to find the server is whether standby (slave) or primary(master) in Postgresql replication ?

7 Steps to configure BDR replication in postgresql

PostgreSQL Introduction