Renaming the instance DB – simple procedure. Here are the steps for Windows. For other OS need to make amendments to the specific features, such as: names of environment variables, file paths, operating system commands, etc. So.

  1. Make a backup.
  2. For instance, who are planning to rename, execute, for example, in sqlplus ( ” sqlplus / as sysdba“) as follows:
    • Optionally, it is possible:
      alter system switch logfile;
    • In fact, we get a team creating control-file only in one version – a RESETLOGS:
      alter database backup controlfile to trace as 'c: \ control.bkp' resetlogs;
    • Create init.ora for the possibility of launching a new instance with the old settings:
      create pfile from spfile;
    • Stop the instance of and exit from sqlplus:
      shutdown immediate;
      exit;
  3. To create a new instance, perform the following steps:
    • Copy (or rename)% ORACLE_BASE% / oradata / olddb in% ORACLE_BASE% / oradata / newdb.
    • Copy init.ora resulting in a new one. For example:
      copy% ORACLE_HOME% / database / INIT <olddb> .ORA% ORACLE_HOME% / database / INIT <newdb> .ORA
    • Edit the% ORACLE_HOME% / database / INIT <newdb> .ORA so that all occurrences of the old name of the instance have been replaced with a new instance name.
    • Deleted (or copy aside) the existing control-files wherever placed copies (can be found in the ‘% ORACLE_HOME% / database / INIT <olddb> .ORA’).
    • The ‘c: \ control.bkp’ change all occurrences of the old name of the instance to the new instance name.
    • The ‘c: \ control.bkp’ line:
      CREATE CONTROLFILE REUSE DATABASE newdb RESETLOGS NOARCHIVELOG

      change on

      CREATE CONTROLFILE SET DATABASE newdb RESETLOGS NOARCHIVELOG

      Or rather – ” REUSE” change to ” SET“.

    • Next, at the command prompt:
      • Expose the environment variable to the new value of the instance:
        set oracle_sid = newdb
      • Create an instance:
        oradim -new -sid% ORACLE_SID% -syspwd qwerty123 -startmode auto -srvcstart system

        Where:
        % ORACLE_SID% – variable created in the preceding paragraph;
        qwerty123 – password to access the database.

      • Connect to the newly created instance, for example, using sqlplus:
        sqlplus / as sysdba
    • in sqlplus:
      • If the instance is started, stop:
        shutdown immediate;
      • Raise the instance without mounting:
        startup nomount;
      • You will create a control-file from the c: \ control.bkp (performs part of the text, beginning with the “CREATE CONTROLFILE SET” and up to the first occurrence of “;” inclusive).
      • Perform instance recovery:
        RECOVER DATABASE USING BACKUP CONTROLFILE

        What we find most likely a similar message:

        ORA-00279: change 31413210566 generated at 07/15/2013 17:55:31 needed for
        thread 1
        ORA-00289: suggestion:
        D: \ ORACLE \ FAST_RECOVERY_AREA \ OLDDB \ ARCHIVELOG \ 2013_07_15 \ O1_MF_1_69238_% U_.ARC
        ORA-00280: change 31413210566 for thread 1 is in sequence # 69238
        
        
        Specify log: {<RET> = suggested | filename | AUTO | CANCEL}

        The argument should be the full name (including the path) redo-file. For example, ‘D: \ oracle \ oradata \ newdb \ redo01.log’ (redo-file can be a different number – sequence # and the file in which it is housed, can be found in alert.log). After that will appear:

        Log applied.
        Media recovery complete.
      • Open the database:
        ALTER DATABASE OPEN RESETLOGS;
      • Execute the command ” ALTER TABLESPACE TEMP ADD TEMPFILE…” (can be found in the ‘c: \ control.bkp’).
      • Create spfile from the existing pfile:
        create spfile from pfile;
      • Perestartovyvaem instance, that he began to use the spfile:
        shutdown immediate;
        startup;
  4. We set up the listener and check the operation.
(Visited 45 times, 1 visits today)
adminOracleTips
Renaming the instance DB - simple procedure. Here are the steps for Windows. For other OS need to make amendments to the specific features, such as: names of environment variables, file paths, operating system commands, etc. So. Make a backup. For instance, who are planning to rename, execute, for example, in...

Do you want to be notified about new DBA updates, releases, jobs and free tips? Join our email newsletter. It's fast and easy. You will be among the first to know about hot new DBA updates and stuff, it will help you enhance your DBA skills.
We take your privacy very seriously