[20180224]Startup Upgrade做什么.txt
1.环境:
SCOTT@book> @ &r/ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
SYS@book> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@book> startup upgrade
ORACLE instance started.
Total System Global Area 634732544 bytes
Fixed Size 2255792 bytes
Variable Size 197133392 bytes
Database Buffers 427819008 bytes
Redo Buffers 7524352 bytes
Database mounted.
Database opened.
2.检查alert文件:
Completed: ALTER DATABASE MOUNT
Sat Feb 24 09:06:57 2018
ALTER DATABASE OPEN MIGRATE
--//打开OPEN MIGRATE.
ALTER SYSTEM enable restricted session;
--//实例mount之后启用了限制会话特性
ALTER SYSTEM SET _system_trig_enabled=FALSE SCOPE=MEMORY;
--//_system_trig_enabled参数控制一些系统触发器是否被启用,例如某些登录审计触发器
--//(system trigger facilities are used as an additional audit trail or as a mechanism to prevent certain actions taking
--//place or as part of a virtual private database solution)
Autotune of undo retention is turned off.
ALTER SYSTEM SET _undo_autotune=FALSE SCOPE=MEMORY;
ALTER SYSTEM SET undo_retention=900 SCOPE=MEMORY;
--//关闭undo retention is turned off
--//设置_undo_autotune=FALSE,undo_retention=900
ALTER SYSTEM SET aq_tm_processes=0 SCOPE=MEMORY;
--//设置aq_tm_processes参数为0,相当于禁用了对信息队列的监控和控制
ALTER SYSTEM SET enable_ddl_logging=FALSE SCOPE=MEMORY;
--//在11g中增加了新的DDL日志功能,这里需要通过设置enable_ddl_logging为false来禁用该特性
Resource Manager disabled during database migration: plan '' not set
ALTER SYSTEM SET resource_manager_plan='' SCOPE=MEMORY;
ALTER SYSTEM SET recyclebin='OFF' DEFERRED SCOPE=MEMORY;
Resource Manager disabled during database migration
--//设置resource_manager_plan='',关闭回收站功能.
replication_dependency_tracking turned off (no async multimaster replication found)
Completed: ALTER DATABASE OPEN MIGRATE
--//这里可以看到startup upgrade只是migrate模式的发展
--//除去以上部分初始化参数的修正外,upgrade升级模式下还会"隐瞒"不报一部分常见的非致命错误,这些常见错误并不影响升级进程;
--//这样做的用意是为了让在升级过程中只有真正致命(fatal)的错误才被反映和记录下来。
--//这部分升级常见错误包括:
--//ORA-00942:"table or view does not exist" --alter table/view 或 drop table/view时可能出现
--//以上述ORA-00942错误为例:
SYS@book> drop table not_exist;
Table dropped.
--//可以发现这些命令不报错.
/* 任意drop或alter不存在的表或索引都不会报错而会通过,以下错误也是类似的 */
ORA-01418: "specified index does not exist" --DROP索引时可能出现
ORA-00955:"name is already used by an existing object" --当创建某些对象时可能出现
ORA-01430:"column being added already exists in table" --ALTER TABLE 时可能出现
ORA-04043:"object %s does not exist" --修改对象时可能出现
// *Cause: An object name was specified that was not recognized by the system.
// There are several possible causes:
// -- An invalid name for a table, view, sequence, procedure, function,
// package, or package body was entered. Since the system could not
// recognize the invalid name, it responded with the message that the
// named object does not exist.
// -- An attempt was made to rename an index or a cluster, or some
// other object that cannot be renamed.
// *Action: Check the spelling of the named object and rerun the code. (Valid
// names of tables, views, functions, etc. can be listed by querying
// the data dictionary.)