Archive for June, 2012

MySQL Backup Script

Posted: June 22, 2012 in MySQL

The script has been written in bash, and has been tested on Centos Linux 5.x only. It can be run in two modes; either a full backup or specific databases backup. When using the database mode, the script checks the engines with which the tables in the database have been built. If tables of type MyISAM are present, a backup with the –lock-all-tables is performed. In the event, only tables of type Innodb exist, the backup is performed with the –single-transaction option. The script can be downloaded from launchpad  and is also available from github

Configuring Oracle Enterprise Manager on Oracle 11g through command ’emctl -config dbcontrol db -repos create’ may sometimes lead to error ORA-01921

Go through the following steps to resolve this issue.

  1. In sqlplus :
    drop user sysman cascade;
    drop public synonym SETEMVIEWUSERCONTEXT;
    drop role MGMT_USER;
    drop user MGMT_VIEW;
  2. emca -deconfig dbcontrol db
    emca -config dbcontrol db -repos create