Database startup script not working.
Hi guys,
After we upgraded from Oracle application 11.0.3 on WinNT to 11i on W2K, my starting scripts are not working properly. We are on 81730.
on 11.0.3's server, following was the sequence of database and its listener starting.
CALL %SCRIPT_DIR%\odedbctl.cmd %1 start %2 %3 %4
CALL %SCRIPT_DIR%\odelsctl.cmd %1 start %1
The same script does not run successfully on new server with 11i.
it generates following errors in startup.log
SQL*Plus: Release 8.1.7.0.0 - Production on Sun Dec 29 18:41:38 2002
(c) Copyright 2000 Oracle Corporation. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
SP2-0640: Not connected
And it generates foll. errors in odedbsr.sql.
SQL*Plus: Release 8.1.7.0.0 - Production on Sun Dec 29 18:41:36 2002
(c) Copyright 2000 Oracle Corporation. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
ORA-12560: TNS:protocol adapter error
I also want to know that what should be the correct sequence of starting database, listener and 'OracleServicePROD' service on windows server.
Thanks in Adv.
odedbctl.cmd
---------------
ECHO .
IF "%1" == "" GOTO usage
IF "%2" == "" GOTO usage
IF "%3" == "" GOTO usage
SET control_code=%2
IF "%2" == "start" GOTO mode_ok
IF "%2" == "stop" GOTO mode_ok
GOTO usage
:mode_ok
SET ORA_ENVFILE=E:\oa\oracle817\%1env.cmd
SET SCRIPT_DIR=E:\OA\ADMIN\%1\SCRIPTS
SET ORACLE_HOME=e:\oa\oracle817
if "%control_code%" == "stop" GOTO stop_db
IF "%4" == "" GOTO usage
IF "%5" == "" GOTO usage
ECHO .
ECHO Building svrmgrl scripts for %1 ... .
ECHO .
ECHO connect internal/%3 as sysdba; > %SCRIPT_DIR%\odedbsr.sql
ECHO startup restrict pfile=e:\oa\oracle817\database\init%1.ora; >> %SCRIPT_DIR%\odedbsr.sql
ECHO exit; >> %SCRIPT_DIR%\odedbsr.sql
ECHO connect internal/%3 as sysdba; > %SCRIPT_DIR%\odedbup.sql
ECHO alter system disable restricted session; >> %SCRIPT_DIR%\odedbup.sql
ECHO exit; >> %SCRIPT_DIR%\odedbup.sql
ECHO .
ECHO Starting the database %1 ... .
ECHO .
net start OracleService%1
SET LOCAL=
SET ORACLE_SID=%1
E:\oa\oracle817\bin\sqlplus.exe /nolog @%SCRIPT_DIR%\odedbsr.sql >> %SCRIPT_DIR%\odedbsr.log
E:\oa\oracle817\bin\sqlplus.exe /nolog @%SCRIPT_DIR%\odedbup.sql >> %SCRIPT_DIR%\startup.log
GOTO finish
:stop_db
ECHO .
ECHO Building svrmgrl shutdown script for %1 ... .
ECHO .
ECHO connect internal/%3 as sysdba; > %SCRIPT_DIR%\odedbdn.sql
ECHO shutdown immediate; >> %SCRIPT_DIR%\odedbdn.sql
ECHO exit; >> %SCRIPT_DIR%\odedbdn.sql
ECHO .
ECHO Shutting down database %1 ... .
ECHO .
SET LOCAL=
SET ORACLE_SID=%1
E:\oa\oracle817\bin\sqlplus.exe /nolog @%SCRIPT_DIR%\odedbdn.sql >> %SCRIPT_DIR%\shutdown.log
net stop OracleStart%1
net stop OracleService%1
:finish
REM del %SCRIPT_DIR%\*.sql
ECHO success
GOTO end
:usage
ECHO .
ECHO odedbctl.cmd .
ECHO Start / Stop database .
ECHO .
ECHO Usage .
ECHO odedbctl.cmd {appl_config} {start} {internal pwd} {sys pwd} {apps pwd}.
ECHO odedbctl.cmd {appl_config} {stop} {internal pwd} .
ECHO .
GOTO end
odelsctl.cmd
---------------
ECHO .
ECHO You are running odelsctl.cmd .
ECHO .
IF "%1" == "" GOTO usage
IF "%2" == "" GOTO usage
IF "%3" == "" GOTO usage
SET control_code=%2
SET listener_name=%3
IF "%2" == "start" GOTO mode_ok
IF "%2" == "stop" GOTO mode_ok
GOTO usage
:mode_ok
SET ORA_ENVFILE="E:\oa\oracle817\%1env.cmd"
SET ORACLE_HOME=e:\oa\oracle817
SET TNS_ADMIN=e:\oa\oracle817\network\admin
if "%control_code%" == "stop" GOTO stop_lsnr
ECHO .
ECHO Starting listener process %3 ... .
ECHO .
E:\oa\oracle817\bin\lsnrctl start %3
GOTO finish
:stop_lsnr
ECHO .
ECHO Shutting down listener process %3 ... .
ECHO .
E:\oa\oracle817\bin\lsnrctl stop %3
:finish
ECHO success
GOTO end
:usage
ECHO .
ECHO odelsctl.cmd .
ECHO Start / Stop Net8 Listener process .
ECHO .
ECHO Usage .
ECHO odelsctl.cmd {appl_config} {start/stop} {listener} .
ECHO .
ECHO In general, available listeners are: .
ECHO Database Net8 listener : {ORACLE_SID} .
ECHO Applications RPC listener : APPS_{ORACLE_SID} .
ECHO .
GOTO end
:end