Skip to content
Snippets Groups Projects
Commit c0c2c903 authored by jurgenhaas's avatar jurgenhaas
Browse files

ansible-roles/oracle#1 Cleanup scripts as environment is now prepared

parent 4e0418e3
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
# Exports one DB schema using exp command
# This bash file expects one parameter to be the name of the DB schema.
# This bash file expects one parameter to be the name of the DB schema.
# This bash file was made to be executed from a cron job bash file.
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export ORACLE_SID=XE
export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`
export ORACLE_BASE=/u01/app/oracle
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH
schemaName=$1
NOW=$(date +"%Y-%b-%d")
dumpName="/var/backups/oracle/"$schemaName"_"$NOW".dmp"
......
#!/bin/bash
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export ORACLE_SID=XE
export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`
export ORACLE_BASE=/u01/app/oracle
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH
sqlplus -S $1/$2 < /opt/cadmin_list_databases.sql
#!/bin/bash
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export ORACLE_SID=XE
export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`
export ORACLE_BASE=/u01/app/oracle
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH
cd /etc/init.d
/etc/init.d/oracle-xe configure
#!/bin/bash
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export ORACLE_SID=XE
export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`
export ORACLE_BASE=/u01/app/oracle
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH
sqlplus -S sys/root as sysdba
......@@ -2,13 +2,6 @@
# Resets VER_{{item.user}} database to original state by dropping it, restoring it from
# demo and then resetting some date fields.
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export ORACLE_SID=XE
export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`
export ORACLE_BASE=/u01/app/oracle
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH
sqlplus sys/root as sysdba < /opt/demo_reset/{{item.user}}_drop_create.sql
imp system/root FILE=/opt/demo_reset/{{item.user}}.dmp FROMUSER=ver_{{item.user}} STATISTICS=None TOUSER=ver_{{item.user}}
sqlplus ver_{{item.user}}/{{item.pass}} < /opt/demo_reset/demo_reset.sql
#!/bin/bash
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export ORACLE_SID=XE
export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`
export ORACLE_BASE=/u01/app/oracle
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH
sqlplus sys/root as sysdba < /opt/setup.sql > /opt/setup.log
{% for application in oracle_svn_installs %}
......
#!/bin/bash
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export ORACLE_SID=XE
export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`
export ORACLE_BASE=/u01/app/oracle
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH
sqlplus {{hostvars[item.1]['ophinex_cadmin_user']}}/{{hostvars[item.1]['ophinex_cadmin_password']}} < /opt/{{inventory_hostname}}_setup_cadmin.sql > /opt/{{inventory_hostname}}_setup_cadmin.log
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment