4 Replies Latest reply: May 20, 2013 4:40 PM by user618218 RSS

    SP2-0306:Invalid option.Usage:CONN[ECT][logon][AS{SYSDBA|SYSOPER}]where<log

    user618218
      Hi

      Anyone can help me with the following error we are getting

      SP2-0306:Invalid option.Usage:CONN[ECT][logon][AS{SYSDBA|SYSOPER}]where<logon>::=<username>[<password>][@<connect_identifier>]|/

      We just upgrated to R12 and the shell script that we run is returning the above error message.


      Below is the script

      # Determine employee ID of send-to
      echo "Determine employee ID of send-to"
      if [ $8 ]
      then
      EID=`echo "${CONNECT} \n
      set heading off \n
      set feedback off \n
      select employee_id from FND_USER where upper(user_name) = '${USRNAME}';" |
      ${ORACLE_HOME}/bin/sqlplus -s`

      echo "CONNECT values " ${CONNECT}

      echo "Connected to DB " $EID

      echo "employee fax "

      # employee fax
      EFAX=${11}`echo "${CONNECT} \n
      set heading off \n
      set feedback off \n
      select fax_number from POS_PO_EMPLOYEE_DETAILS_V where employee_id=${EID};" |
      ${ORACLE_HOME}/bin/sqlplus -s |
      sed s/-//g`%rfax@forsythe.com

      echo "Employee Fax "$EFAX

      EFAX2=`echo $EFAX|sed s/' '/'%91'/`
      EFAX=$EFAX2

      # employee email

      EEMAIL=`echo "${CONNECT} \n
      set heading off \n
      set feedback off \n
      select email_address from HR_EMPLOYEES_ALL_V where employee_id=${EID};" |
      ${ORACLE_HOME}/bin/sqlplus -s`

      EEMAIL2=`echo $EEMAIL|sed s/' '//g`
      EEMAIL=$EEMAIL2

      echo "Employee Email "$EEMAIL
      fi


      thank you