Переименую базу в primary (исключительно для удобства) на сервере.


$ rman target /
RMAN> backup full database noexclude include current controlfile spfile;
RMAN> quit;


$ sqlplus / as sysdba
SQL> shutdown immediate;
SQL> startup mount;

SQL> create pfile='/u01/app/oracle/product/11.2/dbs/initprimary.ora' from spfile;

SQL> quit

$ nid TARGET=sys/master dbname=primary SETNAME=Y logfile=/u01/oradata/nid.log

$ cat /u01/oradata/nid.log

DBNEWID: Release - Production on Fri May 6 20:54:10 2011

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Connected to database ORA112 (DBID=272513945)

Connected to server version 11.2.0

Control Files in database:

Changing database name from ORA112 to PRIMARY
    Control File /u02/oradata/ora112/control01.ctl - modified
    Control File /u03/oradata/ora112/control01.ctl - modified
    Datafile /u02/oradata/ora112/system01.db - wrote new name
    Datafile /u02/oradata/ora112/sysaux01.db - wrote new name
    Datafile /u02/oradata/ora112/undotbs01.db - wrote new name
    Datafile /u02/oradata/ora112/users01.db - wrote new name
    Datafile /u02/oradata/ora112/temp01.db - wrote new name
    Control File /u02/oradata/ora112/control01.ctl - wrote new name
    Control File /u03/oradata/ora112/control01.ctl - wrote new name
    Instance shut down

Database name changed to PRIMARY.
Modify parameter file and generate a new password file before restarting.
Succesfully changed database name.
DBNEWID - Completed succesfully.
[[email protected] ~]$ cd /u01/app/oracle/product/11.2/dbs/
[[email protected] dbs]$ orapwd file=orapwprimary password=master entries=1

vi /u01/app/oracle/product/11.2/dbs/initprimary.ora


$ vi ~/.bash_profile


$ source ~/.bash_profile

$ sqlplus / as sysdba

SQL> startup

SQL> create spfile from pfile='/u01/app/oracle/product/11.2/dbs/initprimary.ora';

SQL> select name from v$database;


SQL> shutdown immediate;
SQL> startup;

Необходимо, чтобы сервер был стартован из spfile

SELECT DECODE(value, NULL, 'PFILE', 'SPFILE') "Init File Type"
FROM sys.v_$parameter WHERE name = 'spfile';

Init F

# vi /etc/oratab