暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

Oracle-修复-nomount状态重建undo表空间

若能在一滴眼泪中闭关 2018-12-10
760

(1)用spfile创建pfile,然后修改参数

#*.undo_tablespace='UNDOTBS1'?

#*.undo_management='AUTO'?


*.undo_management='MANUAL'

*.rollback_segments='SYSTEM'?




***   实际操作   ***

[root@db ~]# su - oracle

[oracle@db ~]$ sqlplus / as sysdba


SQL*Plus: Release 11.2.0.4.0 Production on Mon Dec 10 13:53:29 2018


Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to an idle instance.


SQL> startup nomount;

ORACLE instance started.


Total System Global Area 1.0689E+11 bytes

Fixed Size                  2265864 bytes

Variable Size            5.1808E+10 bytes

Database Buffers         5.5029E+10 bytes

Redo Buffers               55242752 bytes

SQL> create pfile='/oracle/init201812101356.ora' from spfile;


File created.


SQL> shutdown immediate;

ORA-01507: database not mounted



ORACLE instance shut down.




***   编辑操作   ***

[root@db alert]#  cat /oracle/init201812101356.ora 

nccd.__db_cache_size=55029268480

nccd.__java_pool_size=1610612736

nccd.__large_pool_size=268435456

nccd.__oracle_base='/oracle'#ORACLE_BASE set from environment

nccd.__pga_aggregate_target=42412802048

nccd.__sga_target=64961380352

nccd.__shared_io_pool_size=0

nccd.__shared_pool_size=6979321856

nccd.__streams_pool_size=536870912

*.audit_file_dest='/oracle/admin/nccd/adump'

*.audit_trail='db'

*.compatible='11.2.0.4.0'

*.control_files='/oradata/nccd/control01.ctl','/oracle/fast_recovery_area/nccd/control02.ctl'

*.db_block_size=8192

*.db_domain=''

*.db_files=2000

*.db_name='nccd'

*.db_recovery_file_dest='/oracle/fast_recovery_area'

*.db_recovery_file_dest_size=5218762752

*.db_writer_processes=3

*.diagnostic_dest='/oracle'

*.memory_max_target=107374182400

*.memory_target=107374182400

*.nls_language='SIMPLIFIED CHINESE'

*.nls_territory='CHINA'

*.open_cursors=300

*.processes=500

*.remote_login_passwordfile='EXCLUSIVE'

*.sessions=555

#*.undo_tablespace='UNDOTBS1'

#*.undo_management='AUTO'

*.undo_management='MANUAL'

*.rollback_segments='SYSTEM'

(2)用修改后的pfile,启动DB

?SQL>?STARTUP ? pfile='E:\oracle\db\dbs\pfile20140814.ora' ??


ORACLE 例程已经启动。


Total System Global Area? 251658240 bytes

Fixed Size????????????????? 1290012 bytes

Variable Size???????????? 222298340 bytes

Database Buffers?????????? 20971520 bytes

Redo Buffers??????????????? 7098368 bytes

数据库装载完毕。




***   实际操作   ***

SQL> startup pfile='/oracle/init201812101356.ora';

ORACLE instance started.


Total System Global Area 1.0689E+11 bytes

Fixed Size                  2265864 bytes

Variable Size            5.1808E+10 bytes

Database Buffers         5.5029E+10 bytes

Redo Buffers               55242752 bytes

Database mounted.

Database opened.

(3)删除原来的UNDO表空间进行重建


SQL> drop tablespace undotbs1 including contents and datafiles;


SQL> create undo tablespace undotbs1 datafile 'E:\oracle\oradata\pcweb\UNDOTBS1_20G_01.DBF' size 20g autoextend off;




***   实际操作   ***

SQL> drop tablespace undotbs1 including contents and datafiles;


Tablespace dropped.


SQL> create undo tablespace undotbs1 datafile '/oradata/nccd/undotbs01.dbf' size 20g autoextend off;


Tablespace created.


(4)关闭数据库,修改pfile参数,然后用新的pfile创建spfile,在正常启动数据库


*.undo_tablespace='UNDOTBS1'?


*.undo_management='AUTO'?


#*.undo_management='MANUAL'?


#*.rollback_segments='SYSTEM'

--------------------- 

作者:jiejie5945 




***   实际操作   ***

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.




***   编辑操作   ***

[root@db alert]#  cat /oracle/init201812101356.ora 

nccd.__db_cache_size=55029268480

nccd.__java_pool_size=1610612736

nccd.__large_pool_size=268435456

nccd.__oracle_base='/oracle'#ORACLE_BASE set from environment

nccd.__pga_aggregate_target=42412802048

nccd.__sga_target=64961380352

nccd.__shared_io_pool_size=0

nccd.__shared_pool_size=6979321856

nccd.__streams_pool_size=536870912

*.audit_file_dest='/oracle/admin/nccd/adump'

*.audit_trail='db'

*.compatible='11.2.0.4.0'

*.control_files='/oradata/nccd/control01.ctl','/oracle/fast_recovery_area/nccd/control02.ctl'

*.db_block_size=8192

*.db_domain=''

*.db_files=2000

*.db_name='nccd'

*.db_recovery_file_dest='/oracle/fast_recovery_area'

*.db_recovery_file_dest_size=5218762752

*.db_writer_processes=3

*.diagnostic_dest='/oracle'

*.memory_max_target=107374182400

*.memory_target=107374182400

*.nls_language='SIMPLIFIED CHINESE'

*.nls_territory='CHINA'

*.open_cursors=300

*.processes=500

*.remote_login_passwordfile='EXCLUSIVE'

*.sessions=555

*.undo_tablespace='UNDOTBS1'

*.undo_management='AUTO'

#*.undo_management='MANUAL'

#*.rollback_segments='SYSTEM'




***   SQL操作   ***

SQL> startup pfile='/oracle/init201812101356.ora';

ORACLE instance started.


Total System Global Area 1.0689E+11 bytes

Fixed Size                  2265864 bytes

Variable Size            5.1808E+10 bytes

Database Buffers         5.5029E+10 bytes

Redo Buffers               55242752 bytes

Database mounted.

Database opened.

SQL> create spfile from pfile='/oracle/init201812101356.ora';


File created.


SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup;

ORACLE instance started.


Total System Global Area 1.0689E+11 bytes

Fixed Size                  2265864 bytes

Variable Size            5.1808E+10 bytes

Database Buffers         5.5029E+10 bytes

Redo Buffers               55242752 bytes

Database mounted.

Database opened.

SQL>


文章转载自若能在一滴眼泪中闭关,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论