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: TNSrotocol 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 .
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
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
Before these lines, you are not setting up the ORACLE_SID, and that's why you are getting:
ORA-12560: TNSrotocol adapter error
Also, you can connect just as INTERNAL, instead of "internal/password as sysdba". Did you ran the above lines step-by-step from the MS-DOS command line?
Please post ur Listener.ora,SQLnet.ora & TNSnames.ora.
In case if u are using authentication as
SQLNET.AUTHENTICATION_SERVICES= (NTS)
Then u need to check in the USER Groups ORA_DBA that the current NT loginID is added in it.
If u r not using NTS authentication then the Pswd u r giving is wrong or might have been changed due upgrade.......am not sure...
In any case i would suggest u to follow the step below.
1) Add the NT loginID of the server in ORA_DBA group.
2) In SQLnet.ora give NTS authentication.
3) Wat ever pswd u give to login oracle database is immaterial if u have chosen NTS as above.
4) Startup DB with SYS or Internal and then try ALTER user SYS,SYSTEM with old pswd u have & are usging in ur CMD files to connect.
5) Now try loginng in without NTS authentication.
Also see if ur listener & TNS are configured properly.
Regards
Abhay.
funky...
"I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."
"Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"
In case if u are using authentication as
SQLNET.AUTHENTICATION_SERVICES= (NTS)
Then u need to check in the USER Groups ORA_DBA that the current NT loginID is added in it.
I checked and it is there in the user group ORA_DBA.
If u r not using NTS authentication then the Pswd u r giving is wrong or might have been changed due upgrade.......am not sure...
We do use NTS Authentication and password is correct.
If I start the database listener and 'OracleServicePROD' service first and then start the database, I do not get any error messages but in my prev. version, I used to start the database directly thru SQL*PLUS without even starting the listener and 'OracleServicePROD' service.
Thanks,
Sam
------------------------
To handle yourself, use your head. To handle others, use your heart
I checked and it is there in the user group ORA_DBA.
We do use NTS Authentication and password is correct.
Then try commenting NTS & use Oracle SYS pswd to connect.
Originally posted by samdba I used to start the database directly thru SQL*PLUS without even starting the listener and 'OracleServicePROD' service.
How could u start DB without starting 'ORACLESERVICEdb' service????
I mean how could u atleast login to the idle instance without Oracle Service start??????
Code:
C:\>net stop oracleservicetest
The OracleServiceTEST service is stopping...
The OracleServiceTEST service was stopped successfully.
C:\>sqlplus
SQL*Plus: Release 9.0.1.0.1 - Production on Tue Jan 14 09:57:33 2003
(c) Copyright 2001 Oracle Corporation. All rights reserved.
Enter user-name: Sys as Sysdba
Enter password:
ERROR:
ORA-24314: service handle not initialized
C:\>net start oracleservicetest
The OracleServiceTEST service is starting.
The OracleServiceTEST service was started successfully.
C:\>sqlplus
SQL*Plus: Release 9.0.1.0.1 - Production on Tue Jan 14 09:58:10 2003
(c) Copyright 2001 Oracle Corporation. All rights reserved.
Enter user-name: sys as sysdba
Enter password:
Connected to an idle instance.
SQL>
I belive u have to start Orcle Service & then start up ur DB.
Sanjay had posted me about config of listener when i had som problem in connecting using IPC/Beq session. Hope this helps in ur case.
Bookmarks