日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

oracle resetlogs 误删,oracle undo表空间误删恢复

發布時間:2024/7/23 编程问答 39 豆豆
生活随笔 收集整理的這篇文章主要介紹了 oracle resetlogs 误删,oracle undo表空间误删恢复 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

有rman備份常規恢復

[oracle@localhost pahc]$ mv undotbs01.dbf undotbs01.dbf.bak

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup

ORACLE instance started.

Total System Global Area? 221331456 bytes

Fixed Size????? 2251856 bytes

Variable Size??? 163578800 bytes

Database Buffers??? 50331648 bytes

Redo Buffers????? 5169152 bytes

Database mounted.

ORA-01157: cannot identify/lock data file 3 - see DBWR trace file

ORA-01110: data file 3: '/u01/oracle/app/oradata/pahc/undotbs01.dbf'

[oracle@localhost ~]$ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Tue Apr 5 11:08:51 2016

Copyright (c) 1982, 2011, Oracle and/or its affiliates.? All rights reserved.

connected to target database: PAHC (DBID=1813560051, not open)

RMAN> restore datafile 3;

Starting restore at 05-APR-16

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=17 device type=DISK

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00003 to /u01/oracle/app/oradata/pahc/undotbs01.dbf

channel ORA_DISK_1: reading from backup piece /u01/oracle/app/fast_recovery_area/HCDBDG/backupset/2016_04_05/o1_mf_nnndf_TAG20160405T110319_cj6bqr7f_.bkp

channel ORA_DISK_1: piece handle=/u01/oracle/app/fast_recovery_area/HCDBDG/backupset/2016_04_05/o1_mf_nnndf_TAG20160405T110319_cj6bqr7f_.bkp tag=TAG20160405T110319

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:07

Finished restore at 05-APR-16

RMAN> recover datafile 3;

Starting recover at 05-APR-16

using channel ORA_DISK_1

starting media recovery

media recovery complete, elapsed time: 00:00:00

Finished recover at 05-APR-16

SQL> alter database open;

Database altered.

沒有備份非正常關閉數據庫

沒有備份正常關閉數據庫

修改pfile參數

*.undo_management='MANUAL'

*._allow_resetlogs_corruption=true

_corrupted_rollback_segments=('_SYSSMU1$','_SYSSMU2$','_SYSSMU3$','_SYSSMU4$','_SYSSMU5$','_SYSSMU6$','_SYSSMU7$','_SYSSMU8$','_SYSSMU9$','_SYSSMU10$')

_offline_rollback_segments=('_SYSSMU1$','_SYSSMU2$','_SYSSMU3$','_SYSSMU4$','_SYSSMU5$','_SYSSMU6$','_SYSSMU7$','_SYSSMU8$','_SYSSMU9$','_SYSSMU10$')

SQL> select * from v$rollname;

USN NAME

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

0 SYSTEM

1 _SYSSMU1_3724004606$

2 _SYSSMU2_2996391332$

3 _SYSSMU3_1723003836$

4 _SYSSMU4_1254879796$

5 _SYSSMU5_898567397$

6 _SYSSMU6_1263032392$

7 _SYSSMU7_2070203016$

8 _SYSSMU8_517538920$

9 _SYSSMU9_1650507775$

10 _SYSSMU10_1197734989$

11 rows selected.

SQL> show parameter undo

NAME???????? TYPE? VALUE

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

undo_management ?????? string? AUTO

undo_retention??????? integer? 900

undo_tablespace ?????? string? UNDOTBS1

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup mount pfile='/u01/oracle/app/oracle/product/11.2/dbhome_1/dbs/initpahc.ora';

ORACLE instance started.

Total System Global Area? 221331456 bytes

Fixed Size????? 2251856 bytes

Variable Size??? 163578800 bytes

Database Buffers??? 50331648 bytes

Redo Buffers????? 5169152 bytes

Database mounted.

SQL> select * from v$recover_file;

FILE# ONLINE? ONLINE_

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

ERROR???????????? CHANGE#

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

TIME

---------

3 ONLINE? ONLINE

FILE NOT FOUND?????????? 0

SQL> alter database datafile 3 offline drop;

Database altered.

SQL> alter database open;

Database altered.

SQL> create undo tablespace undotbs02 datafile '/u01/oracle/app/oradata/pahc/undotbs02.dbf' size 100m;

Tablespace created.

SQL> show parameter undo

NAME???????? TYPE? VALUE

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

undo_management ?????? string? MANUAL

undo_retention??????? integer? 900

undo_tablespace ?????? string

SQL> alter system set undo_tablespace=undotbs02;

alter system set undo_tablespace=undotbs02

*

ERROR at line 1:

ORA-02097: parameter cannot be modified because specified value is invalid

ORA-30014: operation only supported in Automatic Undo Management mode

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup mount pfile='/u01/oracle/app/oracle/product/11.2/dbhome_1/dbs/initpahc.ora';

ORACLE instance started.

Total System Global Area? 221331456 bytes

Fixed Size????? 2251856 bytes

Variable Size??? 163578800 bytes

Database Buffers??? 50331648 bytes

Redo Buffers????? 5169152 bytes

Database mounted.

SQL> alter database open;

Database altered.

SQL> show parameter undo

NAME???????? TYPE? VALUE

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

undo_management ?????? string? AUTO

undo_retention??????? integer? 900

undo_tablespace ?????? string? UNDOTBS02

SQL> create spfile from pfile;

File created.

SQL>

總結

以上是生活随笔為你收集整理的oracle resetlogs 误删,oracle undo表空间误删恢复的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。