Skip to content

Instantly share code, notes, and snippets.

@mjbommar
Created June 14, 2013 15:51
Show Gist options
  • Save mjbommar/5782944 to your computer and use it in GitHub Desktop.
Save mjbommar/5782944 to your computer and use it in GitHub Desktop.
Recreate repositories for Oracle Enterprise Manager (OEM) via the Enterprise Manager Configuration Assistant.
# Set parameters; these should be dynamically supplied by provisioning, with the possible exception of the two $_HOME paths.
DB_SID="ORCL"
LISTENER_PORT="1521"
ORACLE_HOME="/u01/app/oracle/product/11.2.0/dbhome_1"
LISTENER_HOME="/u01/app/oracle/product/11.2.0/dbhome_1"
SYS_PASSWORD="tiger"
DBSNMP_PASSWORD="tiger"
SYSMAN_PASSWORD="tiger"
# Run emca with parameters
emca -config dbcontrol db -repos recreate -SID $DB_SID -PORT $LISTENER_PORT -ORACLE_HOME $ORACLE_HOME -LISTENER_OH $LISTENER_HOME -SYS_PWD $SYS_PASSWORD -DBSNMP_PWD $DBSNMP_PASSWORD -SYSMAN_PWD $SYSMAN_PASSWORD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment