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 $PGDATA
cd ..
mkdir audit
chmod 755 audit/
chown -R enterprisedb:enterprisedb audit/
cd $PGDATA
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

Comments

Popular posts from this blog

Top 40 Highest Paying URL Shortener Companies - Best URL Shorteners To Earn Fast

VMWARE WORKSTATION 3,4,5,6,7,8,9,10,11,12,14,15...etc LICENSE KEYS COLLECTION

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

PostgreSQL ALTER TABLE ... SET LOGGED / UNLOGGED

How To Configure pglogical | streaming replication for PostgreSQL