Saturday, July 16, 2011

Issue : Unable to generate XML file in Database node

Main Issue : Unable to generate XML file in Database node due to multiple smaller issues as below.
Activity : Performed 11.2.0.2 upgrade from 10.2.0.4 and this is one of Post Upgrade activity.

Details...

$ perl adbldxml.pl tier=db appsuser=APPS appspasswd=xxxxxxx

Starting context file generation for db tier..
Using JVM from /kiranginni/oracle/product/112/jdk/bin/java to execute java programs..

The log file for this adbldxml session is located at:
/kiranginni/oracle/product/112/appsutil/log/adbldxml_07162355.log
AC-20010: Error: File - listener.ora could not be found at the location:
/kiranginni/oracle/product/112/network/admin/kiranginni_ginninode/listener.ora
indicated by TNS_ADMIN. Context file can not be generated.

Could not Connect to the Database with the above parameters, Please answer the Questions below


Enter Hostname of Database server: $
$
$ lsnrctl start kiranginni

LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 16-JUL-2011 23:55:51

Copyright (c) 1991, 2010, Oracle. All rights reserved.

Starting /kiranginni/oracle/product/112/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.2.0 - Production
System parameter file is /kiranginni/oracle/product/112/network/admin/listener.ora
Log messages written to /kiranginni/oracle/product/112/log/diag/tnslsnr/ginninode/kiranginni/alert/log.xml
TNS-01151: Missing listener name, kiranginni, in LISTENER.ORA

Listener failed to start. See the error message(s) above...

$




Troubleshooting :-


Issue 1: "AC-20010: Error: File - listener.ora could not be found at the location: "
Cause : No listener file in $TNS_ADMIN.


Verification:
$ echo $TNS_ADMIN
/kiranginni/oracle/product/112/network/admin/kiranginni_ginninode
$ pwd
/kiranginni/oracle/product/112/appsutil/bin
$ cd /kiranginni/oracle/product/112/network/admin/kiranginni_ginninode
-ksh: cd: /kiranginni/oracle/product/112/network/admin/kiranginni_ginninode: [No such file or directory]
$ cd /kiranginni/oracle/product/
$ ls -ltrd *
drwxr-xr-x 4 orkiranginni dbkiranginni 4096 Jul 16 11:51 102
-rw-r--r-- 1 orkiranginni dbkiranginni 75 Jul 16 13:47 oraInst.loc
drwxrwxr-x 11 orkiranginni dbkiranginni 4096 Jul 16 13:59 diag
drwxr-xr-x 2 orkiranginni dbkiranginni 4096 Jul 16 14:01 checkpoints
drwxrwx--- 5 orkiranginni dbkiranginni 4096 Jul 16 14:50 ora11GR2Inventory
drwxr-xr-x 81 orkiranginni dbkiranginni 8192 Jul 16 23:52 112
$ cd 102
$ ls
customkiranginni_ginninode.env dbs network ood.env kiranginni_ginninode.env
$ cd network
$ ls
admin
$ cd admin
$ ls
kiranginni_ginninode


Solution for Issue 1:- (copying the missing files from Old Oracle HOME)
$ cp -r kiranginni_ginninode /kiranginni/oracle/product/112/network/admin/
$ ls -ltrd /kiranginni/oracle/product/112/network/admin/kiranginni_ginninode
drwxr-xr-x 2 orkiranginni dbkiranginni 4096 Jul 16 23:57 /kiranginni/oracle/product/112/network/admin/kiranginni_ginninode
$



Tried to start the listener after copying.
Failed



Issue 2 : "TNS-01201: Listener cannot find executable /kiranginni/oracle/product/102/bin/oracle for SID kiranginni "

$ lsnrctl start kiranginni

LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 16-JUL-2011 23:57:30

Copyright (c) 1991, 2010, Oracle. All rights reserved.

Starting /kiranginni/oracle/product/112/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.2.0 - Production
System parameter file is /kiranginni/oracle/product/112/network/admin/kiranginni_ginninode/listener.ora
Log messages written to /kiranginni/oracle/product/112/log/diag/tnslsnr/ginninode/kiranginni/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROCkiranginni)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ginninode.ramu.com)(PORT=10010)))
TNS-01201: Listener cannot find executable /kiranginni/oracle/product/102/bin/oracle for SID kiranginni

Listener failed to start. See the error message(s) above...

$ pwd
/kiranginni/oracle/product/102/network/admin
$ cd /kiranginni/oracle/product/112/network/admin/kiranginni_ginninode
$ ls -ltrd *
-rwxr-xr-x 1 orkiranginni dbkiranginni 2 Jul 16 23:57 listener_ifile.ora
-rwxr-xr-x 1 orkiranginni dbkiranginni 1333 Jul 16 23:57 listener.ora
-rwxr-xr-x 1 orkiranginni dbkiranginni 2 Jul 16 23:57 sqlnet_ifile.ora
-rw-r--r-- 1 orkiranginni dbkiranginni 623 Jul 16 23:57 sqlnet.ora
-rw-r--r-- 1 orkiranginni dbkiranginni 2287 Jul 16 23:57 tnsnames.ora
$

Reason: since there are still 102 entries in the files..



Solution :
Taken backup of listener file and modified all the 102 to 112

:%s/102/112/g

Quit with saving.

Now starting the listener again ==> This time it started successfully..

$ vi listener.ora

#
# $Header: ad8ilsnr.ora 115.7 2010/04/14 06:16:10 upinjark ship $
#
# ###############################################################
#
# This file is automatically generated by AutoConfig. It will be read and
# overwritten. If you were instructed to edit this file, or if you are not
# able to use the settings created by AutoConfig, refer to Metalink document
# 165195.1 for assistance.
#
# ###############################################################

#

#
# Net8 definition for Database listener
#

kiranginni =
(ADDRESS_LIST =
(ADDRESS= (PROTOCOL= IPC)(KEY= EXTPROCkiranginni))
(ADDRESS= (PROTOCOL= TCP)(Host= ginninode.ramu.com )(Port= 10010))
)

SID_LIST_kiranginni =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME= /kiranginni/oracle/product/112)
(SID_NAME = kiranginni)
)
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /kiranginni/oracle/product/112)
(PROGRAM = extproc)
)
)

STARTUP_WAIT_TIME_kiranginni = 0
CONNECT_TIMEOUT_kiranginni = 10
TRACE_LEVEL_kiranginni = OFF

LOG_DIRECTORY_kiranginni = /kiranginni/oracle/product/112/network/admin
LOG_FILE_kiranginni = kiranginni
TRACE_DIRECTORY_kiranginni = /kiranginni/oracle/product/112/network/admin
TRACE_FILE_kiranginni = kiranginni
ADMIN_RESTRICTIONS_kiranginni = OFF


IFILE=/kiranginni/oracle/product/112/network/admin/kiranginni_ginninode/listener_ifile.ora
"listener.ora" 49L, 1333C written
$ lsnrctl start kiranginni

LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 16-JUL-2011 23:58:40

Copyright (c) 1991, 2010, Oracle. All rights reserved.

Starting /kiranginni/oracle/product/112/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.2.0 - Production
System parameter file is /kiranginni/oracle/product/112/network/admin/kiranginni_ginninode/listener.ora
Log messages written to /kiranginni/oracle/product/112/log/diag/tnslsnr/ginninode/kiranginni/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROCkiranginni)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ginninode.ramu.com)(PORT=10010)))

Connecting to (ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROCkiranginni))
STATUS of the LISTENER
------------------------
Alias kiranginni
Version TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date 16-JUL-2011 23:58:40
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /kiranginni/oracle/product/112/network/admin/kiranginni_ginninode/listener.ora
Listener Log File /kiranginni/oracle/product/112/log/diag/tnslsnr/ginninode/kiranginni/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROCkiranginni)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ginninode.ramu.com)(PORT=10010)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "kiranginni" has 1 instance(s).
Instance "kiranginni", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
$




Second Issue is resolved.


Now need to investigate why "adbldxml.pl" is failing.





Issue 3:- "ORA-39710: only connect AS SYSDBA is allowed when OPEN in UPGRADE mode"


Details :
Starting context file generation for db tier..
Using JVM from /kiranginni/oracle/product/112/jdk/bin/java to execute java programs..

The log file for this adbldxml session is located at:
/kiranginni/oracle/product/112/appsutil/log/adbldxml_07170000.log

Could not Connect to the Database : ORA-39710: only connect AS SYSDBA is allowed when OPEN in UPGRADE mode

Connecting to the kiranginni database instance...

Connection paramaters values:
Database server hostname ==> ginninode.ramu.com
Database listener port ==> 10010
Database SID ==> kiranginni
Database schema name ==> APPS

Could not Connect to the Database : ORA-39710: only connect AS SYSDBA is allowed when OPEN in UPGRADE mode


AC-40000: Error: Exception - java.sql.SQLException: ORA-39710: only connect AS SYSDBA is allowed when OPEN in UPGRADE mode
occured while connecting to the database - kiranginni

Could not Connect to the Database with the above parameters, Please answer the Questions below


Enter Hostname of Database server[ginninode.ramu.com]:

Enter Port of Database server[10010]:

Enter SID of Database server[kiranginni]:

Could not Connect to the Database : ORA-39710: only connect AS SYSDBA is allowed when OPEN in UPGRADE mode


Could not Connect to the Database with the above parameters, Please answer the Questions below




Since database was in Upgrade mode left after OLAP steps.

solution: Shutdown immediate and restarting in Normal mode before proceeding with XML Building....




Enter Hostname of Database server[ginninode.ramu.com]:

Enter Port of Database server[10010]:

Enter SID of Database server[kiranginni]:

Enter the value for Display Variable: localhost:22.0

The context file has been created at:
/kiranginni/oracle/product/112/appsutil/kiranginni_ginninode.xml
you have mail in /var/spool/mail/orkiranginni

Verification whether xml file got created or not ?
$ ls -ltrd /kiranginni/oracle/product/112/appsutil/kiranginni_ginninode.xml
-rw-r--r-- 1 orkiranginni dbkiranginni 11808 Jul 17 00:09 /kiranginni/oracle/product/112/appsutil/kiranginni_ginninode.xml
$



XML got created.
All Issues are resolved and got XML generated on Database Node.



Note : Information taken own Exp while working on 11.2.0.1 Upgrade...

No comments:

Post a Comment