The processing method of RAC environment data file mistakenly built into local file system

Source: Internet
Author: User
Tags file system oracle database backup

Applies To:

Oracle database-enterprise edition-version 10.2.0.1 and later

Information in this document applies to any platform.

Symptoms

User add datafile for RAC DataBase in the local node

Sql> alter tablespace system add datafile ' FRA ' SIZE 250M autoextend on NEXT 50M MAXSIZE Unlimited;

Then when he query Dba_data_files

Ora-01157:cannot identify/lock data file 66-see DBWR trace file

Ora-01110:data file: '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/fra '

CHANGES

Datafiles add to System tablespace by mistake in the local Node instead of shared diskgroup

Cause

This is expected as it's RAC DB and it suppose to create the new datafile on the shared disk No on the local node

When the user add data file using sql> alter TABLESPACE system add datafile ' FRA ' SIZE 250M autoextend on NEXT 50M MAXSIZE Unlimited;

Its add the datafile in the default OMG location db_create_file_dest

Sql> Show Parameter Db_create_file_dest

NAME TYPE VALUE

This column more highlights: http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/

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

Db_create_file_dest string

And when it is Null the default locaion $OH/dbs

SOLUTION

-Open The DB in Mount state

-Copy the created datafile to the shared Disk Group

Please note that the DB must is in the archive mode.

rman> copy datafile '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/fra ' to ' +fra ';

Starting backup at 06-jan-14

Using target database control file instead of recovery catalog

Allocated Channel:ora_disk_1

Channel ora_disk_1:sid=8 INSTANCE=TESTDB12 Device Type=disk

Channel ora_disk_1:starting datafile Copy

Input datafile file number=00066 Name=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/fra

Output file name=+fra/testdb1/datafile/system.284.836141149 tag=tag20140106t132548 recid=1 STAMP=836141162

Channel ora_disk_1:datafile copy complete, elapsed time:00:00:15

Finished backup at 06-jan-14

-Using SQL PLUS Rename the datafile to the New location

Sql>alter database Rename file '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/fra ' to ' +fra/testdb1/datafile/ System.284.836141149 ';

-Open the DB

Sql> alter DATABSE Open;

-Remove the old file

$ rm/u01/app/oracle/product/11.2.0/dbhome_1/dbs/fra

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.