主要原因是这样的, 不知什么原因, ORACLE 升级的时候居然,同时在10g和11g都跑了
ps -ef|grep ora_pmon时看到有两个 pmon进程在跑
然后我升级又照着那个坑爹的catupgra.sql里面说的打了shutdown abort....
DOC> The following statement will cause an "ORA-01722: invalid number"
DOC> error if the current timezone version file is not the same as the
DOC> version in the database to be upgraded. The statement will cause an
DOC> ORA-00942 or ORA-00904 error if the pre-upgrade utility (utlu111i.sql)
DOC> has not be run to update registry$database table to include the existing
DOC> database timezone file version.
DOC>
DOC> Shutdown ABORT and revert to the original ORACLE_HOME. Then apply
DOC> the required timezone version patch to the original ORACLE_HOME
DOC> prior to attempting to upgrade. Re-run utlu111i.sql after applying
DOC> the patch to record the new timzone file version in the
DOC> registry$database table.
DOC>
DOC>#######################################################################
DOC>#######################################################################
DOC>#
WHERE tz_version != (SELECT version from v$timezone_file)
*
ERROR at line 3:
ORA-00904: "TZ_VERSION": invalid identifier
结果就出来了诡异的
ORA-00201: control file version 11.1.0.6.0 incompatible with ORACLE version
11.0.1.0.0
ORA-00202: control file: '/oracle/oradata/oradb/control01.ctl'
以下是公司一牛人的解决方法,我要慢慢研究下才能整理出来
菜鸟DBA真心桑不起啊
"oratab" 2 lines, 87 characters
$ cd /oracle/optware/prod*
$ ls
11.1
$ cd *
$ ls
db_1
$ cd /oracle
$ vi usr_login
"usr_login" [New file]
oratab=/oracle/oratab
db=$1
if [ `grep "^$db:" $oratab | wc -l` -eq 1 ]
then
LINE=`grep "^$db:" $oratab`
ORACLE_SID=`echo $LINE | cut -d":" -f3`
ORACLE_HOME=`echo $LINE | cut -d ":" -f2`
PATH=$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_SID ORACLE_HOME $PATH LD_LIBRARY_PATH
alias sid=`echo ORACLE_SID= $ORACLE_SID; echo ORACLE_HOME=$ORACLE_HOME`
else
echo "no $db"
fi
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
"usr_login" [New file] 19 lines, 400 characters
$ ls
README.html flash_recovery_area optware oratab product tmp
admin lfe_arch oraInventory pfile_lfe.ora rcsavwr upgrade.log
diag lost+found oradata pfile_oradb.ora sqlnet.log usr_login
$
$ ps -ef | grep pmon
oracle 4606 1 0 15:36:46 ? 0:00 ora_pmon_lfe
oracle 2136 1 0 14:32:14 ? 0:00 ora_pmon_oradb
oracle 5631 3833 0 15:50:07 ttyp1 0:00 grep pmon
$ pwd
/oracle
$ chmod 755 usr_login
$ . ./usr_login oradb
sh: /oracle/product/10.2/db_1/bin:/oracle/optware/product/11.1/db_1/bin:/oracle/product/10.2/db_1/bin:/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/usr/contrib/Q4/bin:/opt/perl/bin:/opt/hparray/bin:/opt/nettladm/bin:/opt/fcms/bin:/usr/bin/X11:/opt/resmon/bin:/usr/contrib/kwdb/bin:/opt/wbem/bin:/opt/wbem/sbin:/opt/graphics/common/bin:/opt/upgrade/bin:/opt/sec_mgmt/bastille/bin:/opt/dsau/bin:/opt/dsau/sbin:/opt/gnome/bin:/opt/mozilla:/opt/sec_mgmt/spc/bin:/opt/ssh/bin:/opt/hpsmh/bin:/opt/gwlm/bin:/usr/contrib/bin/X11:/opt/pb/bin:/oracle/product/10.2/db_1/bin: This is not an identifier.
$
$ vi usr_login
"usr_login" 19 lines, 400 characters
oratab=/oracle/oratab
db=$1
if [ `grep "^$db:" $oratab | wc -l` -eq 1 ]
then
LINE=`grep "^$db:" $oratab`
ORACLE_SID=`echo $LINE | cut -d":" -f3`
ORACLE_HOME=`echo $LINE | cut -d ":" -f2`
PATH=$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_SID ORACLE_HOME $PATH LD_LIBRARY_PATH
alias sid='echo ORACLE_SID= $ORACLE_SIDn echo ORACLE_HOME=$ORACLE_HOME'
else
echo "no $db"
fi
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
"usr_login" 19 lines, 401 characters
$ . ./usr_login oradb
sh: /oracle/product/10.2/db_1/bin:/oracle/product/10.2/db_1/bin:/oracle/optware/product/11.1/db_1/bin:/oracle/product/10.2/db_1/bin:/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/usr/contrib/Q4/bin:/opt/perl/bin:/opt/hparray/bin:/opt/nettladm/bin:/opt/fcms/bin:/usr/bin/X11:/opt/resmon/bin:/usr/contrib/kwdb/bin:/opt/wbem/bin:/opt/wbem/sbin:/opt/graphics/common/bin:/opt/upgrade/bin:/opt/sec_mgmt/bastille/bin:/opt/dsau/bin:/opt/dsau/sbin:/opt/gnome/bin:/opt/mozilla:/opt/sec_mgmt/spc/bin:/opt/ssh/bin:/opt/hpsmh/bin:/opt/gwlm/bin:/usr/contrib/bin/X11:/opt/pb/bin:/oracle/product/10.2/db_1/bin: This is not an identifier.
$ vi usr_login
"usr_login" 19 lines, 401 characters
oratab=/oracle/oratab
db=$1
if [ `grep "^$db:" $oratab | wc -l` -eq 1 ]
then
LINE=`grep "^$db:" $oratab`
ORACLE_SID=`echo $LINE | cut -d":" -f3`
ORACLE_HOME=`echo $LINE | cut -d ":" -f2`
PATH=$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_SID ORACLE_HOME $PATH LD_LIBRARY_PATH
alias sid='echo "ORACLE_SID=$ORACLE_SIDnORACLE_HOME=$ORACLE_HOME"'
else
echo "no $db"
fi
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
"usr_login" 19 lines, 396 characters
$ . ./usr_login oradb
sh: /oracle/product/10.2/db_1/bin:/oracle/product/10.2/db_1/bin:/oracle/product/10.2/db_1/bin:/oracle/optware/product/11.1/db_1/bin:/oracle/product/10.2/db_1/bin:/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/usr/contrib/Q4/bin:/opt/perl/bin:/opt/hparray/bin:/opt/nettladm/bin:/opt/fcms/bin:/usr/bin/X11:/opt/resmon/bin:/usr/contrib/kwdb/bin:/opt/wbem/bin:/opt/wbem/sbin:/opt/graphics/common/bin:/opt/upgrade/bin:/opt/sec_mgmt/bastille/bin:/opt/dsau/bin:/opt/dsau/sbin:/opt/gnome/bin:/opt/mozilla:/opt/sec_mgmt/spc/bin:/opt/ssh/bin:/opt/hpsmh/bin:/opt/gwlm/bin:/usr/contrib/bin/X11:/opt/pb/bin:/oracle/product/10.2/db_1/bin: This is not an identifier.
$ sid
sh: sid: not found.
$
$ vi usr_login
"usr_login" 19 lines, 396 characters
oratab=/oracle/oratab
db=$1
if [ `grep "^$db:" $oratab | wc -l` -eq 1 ]
then
LINE=`grep "^$db:" $oratab`
ORACLE_SID=`echo $LINE | cut -d":" -f3`
ORACLE_HOME=`echo $LINE | cut -d ":" -f2`
PATH=$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_SID ORACLE_HOME $PATH LD_LIBRARY_PATH
#alias sid='echo "ORACLE_SID=$ORACLE_SIDnORACLE_HOME=$ORACLE_HOME"'
else
echo "no $db"
fi
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
"usr_login" 19 lines, 397 characters
$ . ./usr_login oradb
sh: /oracle/product/10.2/db_1/bin:/oracle/product/10.2/db_1/bin:/oracle/product/10.2/db_1/bin:/oracle/product/10.2/db_1/bin:/oracle/optware/product/11.1/db_1/bin:/oracle/product/10.2/db_1/bin:/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/usr/contrib/Q4/bin:/opt/perl/bin:/opt/hparray/bin:/opt/nettladm/bin:/opt/fcms/bin:/usr/bin/X11:/opt/resmon/bin:/usr/contrib/kwdb/bin:/opt/wbem/bin:/opt/wbem/sbin:/opt/graphics/common/bin:/opt/upgrade/bin:/opt/sec_mgmt/bastille/bin:/opt/dsau/bin:/opt/dsau/sbin:/opt/gnome/bin:/opt/mozilla:/opt/sec_mgmt/spc/bin:/opt/ssh/bin:/opt/hpsmh/bin:/opt/gwlm/bin:/usr/contrib/bin/X11:/opt/pb/bin:/oracle/product/10.2/db_1/bin: This is not an identifier.
$ vi usr_login
"usr_login" 19 lines, 397 characters
oratab=/oracle/oratab
db=$1
if [ `grep "^$db:" $oratab | wc -l` -eq 1 ]
then
LINE=`grep "^$db:" $oratab`
ORACLE_SID=`echo $LINE | cut -d":" -f3`
ORACLE_HOME=`echo $LINE | cut -d ":" -f2`
PATH=$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_SID ORACLE_HOME PATH LD_LIBRARY_PATH
alias sid='echo "ORACLE_SID=$ORACLE_SIDnORACLE_HOME=$ORACLE_HOME"'
else
echo "no $db"
fi
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
"usr_login" 19 lines, 395 characters
$ . ./usr_login oradb
$ sid
ORACLE_SID=oradb
ORACLE_HOME=/oracle/product/10.2/db_1
$
$
$ sqlplus "/ as sysdba"
SQL*Plus: Release 10.2.0.4.0 - Production on Thu Jul 21 15:55:46 2011
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
$ ps -ef | grep pmon
oracle 4606 1 0 15:36:46 ? 0:00 ora_pmon_lfe
oracle 6105 3833 0 15:56:12 ttyp1 0:00 grep pmon
$ pwd
/oracle
$ . ./usr_login oradb11g
$ sid
ORACLE_SID=oradb
ORACLE_HOME=/oracle/optware/product/11.1/db_1
$
$
$ sqlplus -version
SQL*Plus: Release 11.1.0.6.0 - Production
$
$
$ sqlplus "/ as sysdba"
SQL*Plus: Release 11.1.0.6.0 - Production on Thu Jul 21 15:56:46 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup upgrade
ORACLE instance started.
Total System Global Area 931164160 bytes
Fixed Size 2112240 bytes
Variable Size 507512080 bytes
Database Buffers 415236096 bytes
Redo Buffers 6303744 bytes
ORA-00201: control file version 11.1.0.6.0 incompatible with ORACLE version
11.0.1.0.0
ORA-00202: control file: '/oracle/oradata/oradb/control01.ctl'
SQL> shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
$ cd $ORACLE_HOME
$ cd dbs
$ ls
hc_lfe.dat initdw.ora initoradb.ora lkORADB
hc_oradb.dat initlfe.ora initoradb.ora.bak.bak peshm_lfe_0
init.ora initlfe.ora.bak lkLFE peshm_oradb_0
$ vi initoradb.ora
"initoradb.ora" 31 lines, 1024 characters
oradb.__db_cache_size=415236096
oradb.__java_pool_size=4194304
oradb.__large_pool_size=4194304
oradb.__shared_pool_size=499122176
oradb.__streams_pool_size=0
*.audit_file_dest='/oracle/optware'
#i'/oracle/admin/oradb/adump'
*.audit_sys_operations=TRUE
*.audit_trail='DB'
*.diagnostic_dest='/oracle/optware'
#*.background_dump_dest='/oracle/admin/oradb/bdump'
*.compatible='11.1.0'
#i'10.2.0.3.0'
*.control_files='/oracle/oradata/oradb/control01.ctl','/oracle/oradata/oradb/control02.ctl','/oracle/oradata/oradb/control03.ctl'
*.core_dump_dest='/oracle/admin/oradb/cdump'
#*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_name='oradb'
*.job_queue_processes=10
*.local_listener='LISTENER_ORADB'
*.log_archive_dest_1='location=/oracle/oradb_arch'
*.open_cursors=300
*.pga_aggregate_target=309329920
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.resource_limit=TRUE
*.sga_target=929038336
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
#*.user_dump_dest='/oracle/admin/oradb/udump'
~
~
~
~
~
~
~
~
~
~
~
~
~
"initoradb.ora" 31 lines, 1024 characters
$ sqlplus "/ as sysdba"
SQL*Plus: Release 11.1.0.6.0 - Production on Thu Jul 21 15:57:32 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup upgrade
ORACLE instance started.
Total System Global Area 931164160 bytes
Fixed Size 2112240 bytes
Variable Size 507512080 bytes
Database Buffers 415236096 bytes
Redo Buffers 6303744 bytes
ORA-00201: control file version 11.1.0.6.0 incompatible with ORACLE version
11.1.0.0.0
ORA-00202: control file: '/oracle/oradata/oradb/control01.ctl'
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
$ dbs
sh: dbs: not found.
$ cd $ORACLE_HOME
$ cd dbs
$ vi initoradb.ora
"initoradb.ora" 31 lines, 1024 characters
oradb.__db_cache_size=415236096
oradb.__java_pool_size=4194304
oradb.__large_pool_size=4194304
oradb.__shared_pool_size=499122176
oradb.__streams_pool_size=0
*.audit_file_dest='/oracle/optware'
#i'/oracle/admin/oradb/adump'
*.audit_sys_operations=TRUE
*.audit_trail='DB'
*.diagnostic_dest='/oracle/optware'
#*.background_dump_dest='/oracle/admin/oradb/bdump'
*.compatible='11.1.0.6.0'
#i'10.2.0.3.0'
*.control_files='/oracle/oradata/oradb/control01.ctl','/oracle/oradata/oradb/control02.ctl','/oracle/oradata/oradb/control03.ctl'
*.core_dump_dest='/oracle/admin/oradb/cdump'
#*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_name='oradb'
*.job_queue_processes=10
*.local_listener='LISTENER_ORADB'
*.log_archive_dest_1='location=/oracle/oradb_arch'
*.open_cursors=300
*.pga_aggregate_target=309329920
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.resource_limit=TRUE
*.sga_target=929038336
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
#*.user_dump_dest='/oracle/admin/oradb/udump'
~
~
~
~
~
~
~
~
~
~
~
~
~
"initoradb.ora" 31 lines, 1028 characters
$
$ sqlplus "/ as sysdba"
SQL*Plus: Release 11.1.0.6.0 - Production on Thu Jul 21 15:58:05 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> startup
ORA-00443: background process "CKPT" did not start
SQL> shutdown immediate
ORA-01012: not logged on
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
$ ps -ef | grep oradb
oracle 6375 3833 1 15:58:28 ttyp1 0:00 grep oradb
$ sqlplus '/ as sysdba'
SQL*Plus: Release 11.1.0.6.0 - Production on Thu Jul 21 15:58:31 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup upgrade
ORACLE instance started.
Total System Global Area 931164160 bytes
Fixed Size 2112240 bytes
Variable Size 507512080 bytes
Database Buffers 415236096 bytes
Redo Buffers 6303744 bytes
Database mounted.
Database opened.
SQL> -- pls process upgrade
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/8337095/viewspace-1052843/ ,如需转载,请注明出处,否则将追究法律责任。