设为首页收藏本站

Botang唐波's Oracle Station

查看: 180|回复: 1

课程第36/37次(2018-04-25星期三,2018-05-02星期三)

[复制链接]

640

主题

995

帖子

7333

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
7333
发表于 2018-4-25 21:41:05 | 显示全部楼层 |阅读模式
  1. select  * from v$transportable_platform
  2. order by 2;
复制代码

全新创建数据库和修复控制文件的差别:

Screenshot.png

传送数据库如果在目的地做:
  1. RUN {
  2.   CONVERT
  3.   FROM PLATFORM 'Microsoft Windows IA (32-bit)'
  4.   PARALLELISM 1
  5. DATAFILE 'C:\APP\ADMINISTRATOR\ORADATA\ORCL\SYSTEM01.DBF' FORMAT 'C:\DATA\WINORCL\DATA_D-ORCL_I-1347195613_TS-SYSTEM_FNO-1_02T18K04'
  6. DATAFILE 'C:\APP\ADMINISTRATOR\ORADATA\ORCL\SYSAUX01.DBF' FORMAT 'C:\DATA\WINORCL\DATA_D-ORCL_I-1347195613_TS-SYSAUX_FNO-2_03T18K0J'
  7. DATAFILE 'C:\APP\ADMINISTRATOR\ORADATA\ORCL\EXAMPLE01.DBF' FORMAT 'C:\DATA\WINORCL\DATA_D-ORCL_I-1347195613_TS-EXAMPLE_FNO-5_04T18K12'
  8. DATAFILE 'C:\APP\ADMINISTRATOR\ORADATA\ORCL\UNDOTBS01.DBF' FORMAT 'C:\DATA\WINORCL\DATA_D-ORCL_I-1347195613_TS-UNDOTBS1_FNO-3_05T18K16'
  9. DATAFILE 'C:\APP\ADMINISTRATOR\ORADATA\ORCL\TBSZHS.DBF' FORMAT 'C:\DATA\WINORCL\DATA_D-ORCL_I-1347195613_TS-TBSZHS_FNO-6_06T18K19'
  10. DATAFILE 'C:\APP\ADMINISTRATOR\ORADATA\ORCL\USERS01.DBF' FORMAT 'C:\DATA\WINORCL\DATA_D-ORCL_I-1347195613_TS-USERS_FNO-4_07T18K1A'
  11. ; }
复制代码

  1. SQL> conn / as sysdba
  2. Connected.
  3. SQL> alter tablespace temp add tempfile '/u01/app/oracle/oradata/winorcl/temp01.dbf' size 30M ;
  4. alter tablespace temp add tempfile '/u01/app/oracle/oradata/winorcl/temp01.dbf' size 30M
  5. *
  6. ERROR at line 1:
  7. ORA-00604: error occurred at recursive SQL level 1
  8. ORA-06553: PLS-801: internal error [56327]
  9. ORA-00604: error occurred at recursive SQL level 1
  10. ORA-06553: PLS-801: internal error [56327]


  11. SQL> select  open_mode from v$database;

  12. OPEN_MODE
  13. ------------------------------------------------------------
  14. READ WRITE

  15. SQL> shutdown immediate
  16. Database closed.
  17. Database dismounted.
  18. ORACLE instance shut down.
  19. SQL> startup upgrade
  20. ORACLE instance started.

  21. Total System Global Area  855982080 bytes
  22. Fixed Size                    2218152 bytes
  23. Variable Size                  503318360 bytes
  24. Database Buffers          343932928 bytes
  25. Redo Buffers                    6512640 bytes
  26. Database mounted.
  27. Database opened.
  28. SQL> alter tablespace temp add tempfile '/u01/app/oracle/oradata/winorcl/temp01.dbf' size 30M ;

  29. Tablespace altered.

  30. SQL> <span id="kM0.5294751346252459">@?/rdbms/admin/utlirp</span>
复制代码

DOC>#######################################################################
DOC>#######################################################################
DOC>   utlirp.sql completed successfully. All PL/SQL objects in the
DOC>   database have been invalidated.
DOC>
DOC>   Shut down and restart the database in normal mode and run utlrp.sql to
DOC>   recompile invalid objects.
DOC>#######################################################################
DOC>#######################################################################
DOC>#


查询无效对象:
  1. select  * from dba_objects  o
  2. where o.status <> 'VALID';

  3. alter package olapsys.DBMS_ODM  compile;
复制代码
  1.   crsctl query has releaseversion
复制代码
  1. SQL> conn / as sysdba
  2. Connected to an idle instance.
  3. SQL> startup
  4. ORACLE instance started.

  5. Total System Global Area  855982080 bytes
  6. Fixed Size                    2233160 bytes
  7. Variable Size                  507514040 bytes
  8. Database Buffers          339738624 bytes
  9. Redo Buffers                    6496256 bytes
  10. Database mounted.
  11. ORA-01092: ORACLE instance terminated. Disconnection forced
  12. ORA-00704: bootstrap process failure
  13. ORA-39700: database must be opened with UPGRADE option
  14. Process ID: 17366
  15. Session ID: 530 Serial number: 3
复制代码
  1.   startup upgrade   //其实就是禁用新特性
  2.     spool filename.log
  3.     @utlu112i.sql            
  4.     @catupgrd.sql
  5.     自动shutdown immediate
  6.     startup
  7.     @utlu112s.sql
  8.     @catuppst.sql
  9.     @utlrp.sql   2h         
复制代码


回复

使用道具 举报

0

主题

11

帖子

86

积分

注册会员

Rank: 2

积分
86
QQ
发表于 2018-5-7 12:31:16 | 显示全部楼层
老师 我在恢复好控制文件后又碰到新的问题  这次控制文件是用rman convert生成的
1.png
2.png
3.png
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Botang唐波's Oracle Station   

GMT+8, 2018-5-26 00:44 , Processed in 0.104412 second(s), 27 queries .

快速回复 返回顶部 返回列表