Change the data file path of the standby Database

Source: Internet
Author: User

Change the data file path of the standby database to change the data file path of the standby database [oracle @ bldc02 ~] $ Sqlplus/nologSQL * Plus: Release 11.2.0.3.0 Production on Mon Aug 26 10:44:57 2013 Copyright (c) 1982,201 1, Oracle. all rights reserved. SQL> conn/as sysdbaConnected. -- view the standby_file_management parameter SQL> show parameter standby_file_management; NAME TYPE VALUE ----------- specify standby_file_management string AUTO -- standby_file_management. Set this parameter to MANUAL first, to change the data file path, otherwise ERROR at line 1: ORA-01511: error in renaming log/data filesORA-01275: Operation RENAME is not allowed if standby file management is automatic. SQL> alter system set standby_file_management = 'manual'; System altered. SQL> shutdown immediate; copy the data file to the new directory cp/u02/oradata/orcl01.dbf/oradata/orcl01.dbf Delete the old data file SQL> startup mount; SQL> alter database rename file '/u02/oradata/orcl01.dbf' to '/oradata/orcl01.dbf' SQL> alter database open; check whether the data file is changed to the corresponding file directory. SQL> select name from v $ datafile; SQL> create pfile = '/home/oracle/initorcl. ora 'from spfile; change the pfile (initorcl. ora) set standby_file_management from manual to auto to add or modify db_file_name_convert = '/u02/oradata/', '/oradata/' SQL> shutdown immediate; SQL> create spfile from pfile = '/home/oracle/initorcl. ora 'SQL> startup momount; SQL> alter database mount standby database; SQL> alter database open read only; -- apply the SQL> alter database recover managed standby database disconnect from session;

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.