新安装了一台数据库服务器,版本是10.2.0.1的,因为现在最新的是10.2.0.4的。版本低了,bug多。所以就对数据库做了一个升级。
服务器是windows2003的系统,都是可视话操作。下一步的问题。10.2.0.4的patchset里面也有详细的安装说明。之做个总结,是因为这次用了DBUA工具,以前做升级,都是用脚本来的。这次常个新鲜。基本步骤还是差不多。
升级步骤如下:
1.从metalink上下载10.2.0.4的patchset,编号是:p6810189
2.关闭数据库,做个冷备份,防止安装失败。
3.安装patchset软件,这里要注意,ORACLE_HOME要和以前的一样。
4.执行脚本或者用DBUA工具
5.检查确认升级是否成功。
下面是readme上面的说明:
UpgradingaRelease10.2Database
Afteryouinstallthepatchset,youmustperformthefollowingstepsoneverydatabaseassociatedwiththeupgradedOraclehome:
Note: Ifyoudonotrunthecatupgrd.sqlscriptasdescribedinthissectionandyoustartupadatabasefornormaloperation,thenORA-01092:ORACLEinstanceterminated.DisconnectionforcederrorswilloccurandtheerrorORA-39700:databasemustbeopenedwithUPGRADEoptionwillbeinthealertlog. |
1.Loginwithadministratorprivileges.
2.ForOracleRACinstallations,startlisteneroneachnodeoftheclusterasfollows:
C:/>ORACLE_BASE/ORACLE_HOME/bin/srvctlstartlistener-nnode
3.IfyouareusingAutomaticStorageManagement,starttheAutomaticStorageManagementinstance.
4.Forsingle-instanceinstallations,startthelistenerasfollows:
C:/>lsnrctlstart
5.Forsingle-instanceinstallations,useSQL*PlustologintothedatabaseastheSYSuserwithSYSDBAprivileges:
C:/>sqlplus/NOLOG
SQL>CONNECTSYSASSYSDBA
Enterpassword:SYS_password
Usersofsingle-instanceinstallationsnowproceedtostep7.
6.ForOracleRACinstallations:
A.UseSQL*PlustologintothedatabaseastheSYSuserwithSYSDBAprivileges:
C:/>sqlplus/NOLOG
SQL>CONNECTSYSASSYSDBA
Enterpassword:SYS_password
SQL>STARTUPNOMOUNT
B.SettheCLUSTER_DATABASEinitializationparametertoFALSE:
SQL>ALTERSYSTEMSETCLUSTER_DATABASE=FALSESCOPE=spfile;
C.Shutdownthedatabase:
SQL>SHUTDOWN
7.EnterthefollowingSQL*Pluscommands:
SQL>STARTUPUPGRADE
SQL>SPOOLpatch.log
SQL>@ORACLE_BASE/ORACLE_HOME/rdbms/admin/catupgrd.sql
SQL>SPOOLOFF
8.Reviewthepatch.logfileforerrorsandinspectthelistofcomponentsthatisdisplayedattheendofcatupgrd.sqlscript.
ThislistprovidestheversionandstatusofeachSERVERcomponentinthedatabase.
9.Ifnecessary,rerunthecatupgrd.sqlscriptaftercorrectinganyproblems.
10.Restartthedatabase:
SQL>SHUTDOWNIMMEDIATE
SQL>STARTUP
11.Runtheutlrp.sqlscripttorecompileallinvalidPL/SQLpackagesnowinsteadofwhenthepackagesareaccessedforthefirsttime.Thisstepisoptionalbutrecommended.
SQL>@ORACLE_BASE/ORACLE_HOME/rdbms/admin/utlrp.sql
Whenthe10.2.0.4patchsetisappliedtoanOracleDatabase10gStandardEditiondatabase,theremaybe54invalidobjectsaftertheutlrp.sqlscriptruns.Theseobjectsbelongtotheunsupportedcomponentsanddonotaffectthedatabaseoperation. Ignoreanymessagesindicatingthatthedatabasecontainsinvalidrecyclebinobjectssimilartothefollowing: BIN$4lzljWIt9gfgMFeM2hVSoA==$0
|
12.Runthefollowingcommandtocheckthestatusofallthecomponentsaftertheupgrade:
SQL>SELECTCOMP_NAME,VERSION,STATUSFROMSYS.DBA_REGISTRY;
Intheoutputoftheprecedingcommand,thestatusofallthecomponentsshouldbeVALIDforasuccessfulupgrade.
13.IfyouareusingtheOracleRecoveryManagercatalog,enterthefollowingcommand:
C:/>rmancatalogusername/password@alias
RMAN>UPGRADECATALOG;
14.ForOracleRACinstallations:
A.SettheCLUSTER_DATABASEinitializationparametertoTRUE:
SQL>ALTERSYSTEMSETCLUSTER_DATABASE=TRUESCOPE=spfile;
B.Restartthedatabase:
SQL>SHUTDOWNIMMEDIATE
SQL>STARTUP
C.Startanydatabaseservicesthatyouwanttouse:
C:/>ORACLE_BASE/ORACLE_HOME/bin/srvctlstartservice-ddb_name-sservice_name
15.ToconfigureandsecureEnterpriseManagerfollowthesesteps:
EnsurethedatabaseandListenerareoperational.
Inthecaseofasingleinstance,execute
emca-upgradedb
InthecaseofOracleRealApplicationClusters(RAC),execute
emca-upgradedb-cluster
DBUA工具提供了一个可视化的界面,它的作用等同于执行catupgrd.sql等脚本,dbua工具能升级Oracle的一些组件。组件升级之后,该工具会自动编译无效的对象,这个功能还是挺方便的。省得自己手动的去执行编译脚本了。
SQL>SELECTCOMP_NAME,VERSION,STATUSFROMSYS.DBA_REGISTRY;
COMP_NAMEVERSIONSTATUS
OracleDatabaseCatalogViews10.2.0.4.0VALID
OracleDatabasePackagesandTypes10.2.0.4.0VALID
OracleWorkspaceManager10.2.0.4.3VALID
JServerJAVAVirtualMachine10.2.0.4.0VALID
OracleXDK10.2.0.4.0VALID
OracleDatabaseJavaPackages10.2.0.4.0VALID
OracleExpressionFilter10.2.0.4.0VALID
OracleDataMining10.2.0.4.0VALID
OracleText10.2.0.4.0VALID
OracleXMLDatabase10.2.0.4.0VALID
OracleRuleManager10.2.0.4.0VALID
OracleinterMedia10.2.0.4.0VALID
OLAPAnalyticWorkspace10.2.0.4.0VALID
OracleOLAPAPI10.2.0.4.0VALID
OLAPCatalog10.2.0.4.0VALID
Spatial10.2.0.4.0VALID
OracleEnterpriseManager10.2.0.4.0VALID