Oracle modifies the spfile file path

Source: Internet
Author: User

Oracle modifies the path of the spfile file. Background: today, my colleague found that the oracle spfile file was used as a resource under + DG_DATA during the database dual-host switch, it was originally found in + DG_ORA that the spfile path was created incorrectly, but the reconstruction resulted in a problem when starting the spfile by default, in this scenario, it is illegal to directly modify the spfile path. Therefore, you can use pfile as the intermediate temporary storage implementation process: [sqlplus/as sysdba] 1. Create pfile in the spfile scenario: SQL> create pfile = '/opt/oracle/init_pfile.ora'; 2. create a New spfile: SQL> create spfile = '+ DG_ORA/$ {ORACLE_SID}/spfile $ {SID }. ora 'from pfile = '/opt/oracle/init_pfile.ora'; 3. Stop the database and start it in pfile mode: SQL> startup pfile = '/opt/oracle/init_pfile.ora '; 4. Modify the spfile path: SQL> alter system set spfile = '+ DG_ORA/$ {ORACLE_SID}/spfile $ {SID }. ora '; 5. Stop the database and start it again in spfile mode: SQL> startup 6. query the spfile path: SQL> show parameter spfile; summary: spfile and pfile can be switched to each other for backup. It is best to both have backup files, preferably at the same time on the same date, so as to facilitate consistency during recovery.

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.