Rman-06056:could not access DataFile 6 and the other two issues raised when Oracle Rman backup occurs ____oracle

Source: Internet
Author: User

Backing up with RmanDatabaseThe following error occurred:
[Oracle@mzl orcl]$ Rman target/

Recovery manager:release 10.2.0.1.0-production on Wed Feb 13 15:36:06

Copyright (c) 1982, 2005,. All rights reserved.

Connected to target DATABASE:ORCL (dbid=1172558471)

rman> backup Database;

Starting backup at 13-feb-08
Using target database control file instead of recovery catalog
Allocated Channel:ora_disk_1
Channel ora_disk_1:sid=137 Devtype=disk
Could not read file header for datafile 6 error reason 1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR message STACK follows ===============
RMAN-00571: ===========================================================
Rman-03002:failure of Backup command at 02/13/2008 15:36:14
Rman-06056:could not access DataFile 6

1 View Data 6 What is the file
Sql> select File#,name from V$datafile;

file#
----------
NAME
--------------------------------------------------------------------------------
1
/u01/app/oracle/oradata/orcl/system01.dbf

2
/u01/app/oracle/oradata/orcl/undotbs01.dbf

3
/u01/app/oracle/oradata/orcl/sysaux01.dbf


file#
----------
NAME
--------------------------------------------------------------------------------
4
/u01/app/oracle/oradata/orcl/users01.dbf

5
/u01/app/oracle/oradata/orcl/example01.dbf

6
/u01/app/oracle/product/10.2.0/db_1/dbs/missing00006


Solution:
Look at the MISSING00006 based on that tablespace and then delete the table space

Select A.file#,a.name,b.name

From V$datafile A,v$tablespace b

where a.ts#=b.ts#

See the table space corresponding to file 6 is users.

sql> drop tablespace users;

However, a problem arises at this point: Ora-12919:can not drop the default permanent tablespace

Sys@ora10g> SELECT * from database_properties where property_name= ' default_permanent_tablespace ';

Property_name Property_value DESCRIPTION
---------------------------- -------------- ------------------------------------
Default_permanent_tablespace USERS Name of default permanent tablespace

The default permanent table space for this system is the users

. default permanent table space deletion method
Since the "default" permanent tablespace cannot be deleted, we simply specify the default permanent tablespace to other tablespaces, and the Users table space can be successfully deleted.
1 Adjust the default permanent table space of the database system to Tbs_sec_d
sys@ora10g> ALTER DATABASE default tablespace tbs_sec_d;

Database altered.

2) Confirm the adjustment effect
Sys@ora10g> SELECT * from database_properties where property_name= ' default_permanent_tablespace ';

Property_name Property_value DESCRIPTION
---------------------------- -------------- ------------------------------------
Default_permanent_tablespace tbs_sec_d Name of default permanent tablespace

3 Delete the original default permanent table space users
Sys@ora10g> drop tablespace USERS including contents and datafiles;

At this point, helpless, there is a new problem:

Sql> drop tablespace users including contents;
Drop tablespace users including contents
*
ERROR at line 1:
Ora-22868:table with lobs contains segments in different tablespaces

Solution:

Sql> Select Owner,table_name,tablespace_name from dba_lobs where tablespace_name= ' USERS ';

OWNER table_name Tablespace_name
---------- ------------------------------ ------------------------------
OE PurchaseOrder USERS
OE PurchaseOrder USERS
OE PurchaseOrder USERS
OE PurchaseOrder USERS
OE PurchaseOrder USERS
OE PurchaseOrder USERS
OE PurchaseOrder USERS
OE action_table USERS
OE lineitem_table USERS
OE lineitem_table USERS
SCOTT plan_table USERS

Rows selected.

Sql> Select COUNT (*) from Oe.purchaseorder;

COUNT (*)
----------
132

sql> drop user OE cascade;

User dropped.

Sql> drop tablespace users including contents;

Tablespace dropped.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.