errors while running the script [message #456968] |
Thu, 20 May 2010 08:50 |
medamadhu1
Messages: 4 Registered: May 2010
|
Junior Member |
|
|
Hi,
I am getting following errors while running the below script.Can some one please help.
./db_validate.sh[46]: required: 0403-012 A test command parameter is not valid.
audit_trail parameter not matched
./db_validate.sh[53]: Required: 0403-012 A test command parameter is not valid.
audit_sys_operation parameter not matched
./db_validate.sh[60]: test: 0403-021 A ] character is missing.
background_dump_dest parameter not matched
./db_validate.sh[67]: test: 0403-021 A ] character is missing.
compatible not matched
./db_validate.sh[74]: test: 0403-021 A ] character is missing.
core_dump_dest parameter not matched
./db_validate.sh[81]: test: 0403-021 A ] character is missing.
log_archive_dest parameter not matched
./db_validate.sh[88]: 0403-057 Syntax error at line 88 : `<' is not expected.
SCRIPT:
#!/bin/ksh
echo
echo 'Enter Oracle Home Directory:'
read ora_home
echo
echo 'Enter init.ora file name:'
read initora
echo
echo "Please enter the app name that was used to name the mount points: "
read APP_NAME
echo "Please enter the Oracle SID: "
read DB_NAME
echo
echo
audit_trail=`grep "audit_trail" $ora_home/dbs/$initora|cut -f2 -d"="`
audit_sys_operation=`grep "audit_sys_operation" $ora_home/dbs/$initora|cut -f2 -d"="`
background_dump_dest=`grep "background_dump_dest" $ora_home/dbs/$initora|cut -f2 -d"="`
compatible=`grep "compatible" $ora_home/dbs/$initora|cut -f2 -d"="`
core_dump_dest=`grep "core_dump_dest" $ora_home/dbs/$initora|cut -f2 -d"="`
log_archive_dest=`grep "log_archive_dest" $ora_home/dbs/$initora|cut -f2 -d"="`
log_archive_format=`grep "log_archive_format" $ora_home/dbs/$initora|cut -f2 -d"="`
os_authent_prefix=`grep "os_authent_prefix" $ora_home/dbs/$initora|cut -f2 -d"="`
Recyclebin='grep "Recyclebin" $ora_home/dbs/$initora|cut -f2 -d"="`
remote_os_authent=`grep "remote_os_authent" $ora_home/dbs/$init.ora|cut -f2 -d"="`
resoucre_limit=`grep "resource_limit" $ora_home/dbs/$initora|cut -f2 -d"="`
SQL92_SECURITY=`grep "SQL92_SECURITY" $ora_home/dbs/$initora|cut -f2 -d"="`
user_dump_dest=`grep "user_dump_dest" $ora_home/dbs/$initora|cut -f2 -d"="`
control_files=`grep "control_files" $ora_home/dbs/$initora|cut -f2 -d"="`
if ( [ ${audit_trail:-1} = "DB" ])
then
echo "audit_trail parameter matched"
else
echo "audit_trail parameter not matched"
fi
if ( [ ${audit_sys_operation:-1} = "TRUE" ])
then
echo "audit_sys_operation parameter matched"
else
echo "audit_sys_operation parameter not matched"
fi
if ( [ ${background_dump_dest:-1} = "/orcl01/app/oracle/admin/$ORACLE_SID/bdump"])
then
echo "background_dump_dest parameter matched"
else
echo "background_dump_dest parameter not matched"
fi
if ( [ ${compatible:-1} = "10.2.0"])
then
echo "compatible matched"
else
echo " compatible not matched"
fi
if ( [ ${core_dump_dest:-1} = "/orcl01/app/oracle/admin/$ORACLE_SID /cdump"])
then
echo "core_dump_dest parameter matched"
else
echo "core_dump_dest parameter not matched"
fi
if ( [ ${log_archive_dest:-1} = "/orcl01/app/oracle/admin/$ORACLE_SID /arch"])
then
echo "log_archive_dest parameter matched"
else
echo "log_archive_dest parameter not matched"
fi
if ( [ ${"log_archive_format:-1} = "arc_<SID>_%s_%t_%r.log"])
then
echo "log_archive_format parameter matched"
else
echo " log_archive_format parameter not matched"
fi
if ( [ ${"os_authent_prefix:-1} = ""])
then
echo "os_authent_prefix parameter matched"
else
echo "os_authent_prefix parameter not matched"
fi
if ( [ ${"Recyclebin:-1} = "off"])
then
echo "Recyclebin matched"
else
echo " Recyclebin not matched"
fi
if ( [ ${"remote_os_authent:-1} = "false"])
then
echo "remote_os_authent parameter matched"
else
echo "remote-os_authent parameter not matched"
fi
if ( [ ${"resource_limit:-1} = "true"])
then
echo "resource_limit parameter matched"
else
echo "resource_limit parameter not matched"
fi
if ( [ ${"SQL92_SECURITY:-1} = "TRUE"])
then
echo "SQL92_SECURITY parameter matched"
else
echo "SQL92_SECURITY parameter not matched"
fi
if ( [ ${"user_dump_dest:-1} = "/orcl01/app/oracle/admin/$ORACLE_SID/udump"])
then
echo "user_dump_dest parameter matched"
else
echo " user_dump_dest parameter not matched"
fi
if ( [ ${"control_files:-1} = "(/local/<APP_NAME>/oradata02/$ORACLE_SID /control01.ctl,
/local/<APP_NAME>/oradata06/$ORACLE_SID /control02.ctl,
/local/<APP_NAME>/oradata07/$ORACLE_SID /control03.ctl)"])
then
echo "control_files parameter matched"
else
echo "control_files parameter not matched"
fi
done
|
|
|
Re: errors while running the script [message #456976 is a reply to message #456968] |
Thu, 20 May 2010 09:19 |
|
BlackSwan
Messages: 26766 Registered: January 2009 Location: SoCal
|
Senior Member |
|
|
>Can some one please help.
this is more easily done inside the DB
The error message clearly point to lines with problem.
so the fix is to correct faulty lines.
They are different from lines without errors.
|
|
|