#!/bin/ksh

. /oracle/db_scripts/env_db.sh

echo "ORACLE_SID=$ORACLE_SID"
echo "ORACLE_HOME=$ORACLE_HOME"

echo "Use /dev/vg_eva1234_data for data files, /dev/vg_eva1234_log for redo logs"
echo "If ORACLE_SID and ORACLE_HOME printed above is wrong, stop now"
sleep 5

cd $ORACLE_HOME/dbs
DB=${ORACLE_SID}

VG_ORADATA=/dev/vg_eva1234_data
VG_ORALOG=/dev/vg_eva1234_log2

ln -sf $VG_ORADATA/rlv_wls_system sys_${DB}
ln -sf $VG_ORADATA/rlv_wls_sysaux sysaux_${DB}
ln -sf $VG_ORADATA/rlv_wls_temp temp_${DB}
ln -sf $VG_ORADATA/rlv_wls_undo2_1 undo2_${DB}_1
ln -sf $VG_ORADATA/rlv_wls_controlfile cntrl_${DB}
ln -sf $VG_ORADATA/rlv_wls_stats stats_${DB}

ln -sf $VG_ORADATA/rlv_wls_c_custinv C_custinv
ln -sf $VG_ORADATA/rlv_wls_c_cust C_cust
ln -sf $VG_ORADATA/rlv_wls_c_parts C_parts
ln -sf $VG_ORADATA/rlv_wls_c_supp C_supp
ln -sf $VG_ORADATA/rlv_wls_c_site C_site

ln -sf $VG_ORADATA/rlv_wls_m_bom M_bom
ln -sf $VG_ORADATA/rlv_wls_m_inv_idx M_inv_idx
ln -sf $VG_ORADATA/rlv_wls_m_inv M_inv
ln -sf $VG_ORADATA/rlv_wls_m_lo M_lrgorder
ln -sf $VG_ORADATA/rlv_wls_m_parts M_parts
ln -sf $VG_ORADATA/rlv_wls_m_wo M_wrkorder
ln -sf $VG_ORADATA/rlv_wls_m_wo_idx M_wrkorder_idx

ln -sf $VG_ORADATA/rlv_wls_o_item O_item
ln -sf $VG_ORADATA/rlv_wls_o_ordl O_ordl
ln -sf $VG_ORADATA/rlv_wls_o_ords O_ords

ln -sf $VG_ORADATA/rlv_wls_s_comp S_comp
ln -sf $VG_ORADATA/rlv_wls_s_po S_po
ln -sf $VG_ORADATA/rlv_wls_s_sc S_suppcomp
ln -sf $VG_ORADATA/rlv_wls_s_site S_site
ln -sf $VG_ORADATA/rlv_wls_s_supp S_supp

ln -sf $VG_ORADATA/rlv_wls_u_seq U_tables

ln -sf $VG_ORALOG/rlv_wls_slog1_lrg lrg_log1.f
ln -sf $VG_ORALOG/rlv_wls_slog2_lrg lrg_log2.f
ln -sf $VG_ORALOG/rlv_wls_slog3_lrg lrg_log3.f
ln -sf $VG_ORALOG/rlv_wls_slog4_lrg lrg_log4.f
