Rename the database 11g

Hi all

11.2.0.1

AIX 6.1

I restore the database backup of PROD1, PROD2.

My original db name was PROD2, and now it became PROD1. I want to rename the PROD1, PROD2 in dbname.


I googled and found DBNEWID utility.


This process is correct?


===========

Only change the name of the database

The following steps describe how to change the name of the database without changing the DBID.

  1. Ensure that you have a recoverable full backup.
  2. Make sure that the target database is mounted but is not open, and it was to stop systematically before mounting. For example:
    SHUTDOWN IMMEDIATE STARTUP MOUNT 
  3. Call the command line utility, specify a user validates with the SYSDBA privilege (you will be asked a password). You must specify both the DBNAME and SETNAME parameters. This example changes the name of test_db :
    % nid TARGET=SYS DBNAME=test_db SETNAME=YES 

    DBNEWID performs validations in the headers of the control files (not the data files) before attempting I/O files. If the validation is successful, then DBNEWID prompts, changes the name of data base in control files, the database stops and leaves. Here is an example of what the output for this would look like:

    . . . Control Files in database: /oracle/TEST_DB/data/cf1.dbf /oracle/TEST_DB/data/cf2.dbf  The following datafiles are offline clean: /oracle/TEST_DB/data/tbs_61.dbf (23) /oracle/TEST_DB/data/tbs_62.dbf (24) /oracle/TEST_DB/data/temp3.dbf (3) These files must be writable by this utility.  The following datafiles are read-only: /oracle/TEST_DB/data/tbs_51.dbf (15) /oracle/TEST_DB/data/tbs_52.dbf (16) /oracle/TEST_DB/data/tbs_53.dbf (22) These files must be writable by this utility.  Changing database name from PROD to TEST_DB Control File /oracle/TEST_DB/data/cf1.dbf - modified Control File /oracle/TEST_DB/data/cf2.dbf - modified Datafile /oracle/TEST_DB/data/tbs_01.dbf - wrote new name Datafile /oracle/TEST_DB/data/tbs_ax1.dbf - wrote new name Datafile /oracle/TEST_DB/data/tbs_02.dbf - wrote new name Datafile /oracle/TEST_DB/data/tbs_11.dbf - wrote new name Datafile /oracle/TEST_DB/data/tbs_12.dbf - wrote new name Datafile /oracle/TEST_DB/data/temp1.dbf - wrote new name Control File /oracle/TEST_DB/data/cf1.dbf - wrote new name Control File /oracle/TEST_DB/data/cf2.dbf - wrote new name Instance shut down  Database name changed to TEST_DB. Modify parameter file and generate a new password file before restarting. Successfully changed database name. DBNEWID - Completed successfully. 

    If validation is not successful, then DBNEWID ends and leaves the database intact target. You can open the database, fix the error, and then resume the DBNEWID operation or continue to use the database without changing the name of the database. (For an example of what looks like the output for an unsuccessful validation, see step 3 of "changing the DBID and database name").

  4. Define the DB_NAME initialization parameter in the settings file to initialize (PFILE) to the new database name is . Note: The DBNEWID utility does not change the server settings file ( SPFILE ). Therefore, if you use SPFILE to start your Oracle database, then you must recreate the settings file to boot from the server settings file, delete the file from the server settings, change it DB_NAME in the initialization parameter file and then recreate the server settings file.
  5. Create a new password file.
  6. Start the database and resume normal use. For example:
    STARTUP 

    Because you have changed only the name of the database and not the database ID, it is not necessary to use the RESETLOGS option when you open the database. This means that all previous backups are still usable.

    ==========

    Thank you

    pK

These steps are quite right. Please follow the steps carefully. And special attention to step 4. concerning

Tags: Database

Similar Questions

  • Rename the database

    Recently, I had request to refresh the entire DB_DEST base, so what I did I cloned the source DB_SOURCE database and recreated the DB_NEW database with a different name.

    Now I would like to name this new DB_NEW database with the DB_DEST of existing destination database. For this, I did stop the DB_DEST and the DB_DEST comment in tnsnames.ora and listner.ora and/etc/oratba /.

    Now, I would like to follow the procedure to rename the database below.

    http://www.adp-GmbH.ch/ora/Admin/rename_db.html

    What are the problems do you think I could hit when I do this?
    SQL> select * from v$version;
    
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    PL/SQL Release 10.2.0.5.0 - Production
    CORE    10.2.0.5.0      Production
    TNS for HPUX: Version 10.2.0.5.0 - Production
    NLSRTL Version 10.2.0.5.0 - Production

    FYI: Since Oracle9i from, you can use the DBNEWID utility to rename the base of data and/or DBID.

    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14215/dbnewid.htm

    Thank you

  • The upgrade of the database 11g dbua utility

    Hello world

    I installed oracle 11g R2 on windows and I ve created the vesrion 11.2.0.1.0 database. I tried to upgrade the database to a higher version using dbua. But in this destination both is showing that 11.2.0.1.0 & utility source please let me know is it possible to upgrade the database 11.2.0.1.0 to the higher version using dbua

    not possible, you must set up a new oracle home

  • 6i/reports 6i forms in the database 11g R2

    Hello
    We have forms and reports 6i developed.
    It works very well with the 8i database.

    I installed a new database 11g R2. When I run my forms all is good. The shape, I call my report when I do this
    Windows connection will appear.

    How can this be lost or info spent so that the window does not appear and users don't need to reconnect the info anywhere or run reports.

    I use the following code

    Rep: = FIND_REPORT_OBJECT ('EMP017');
    set_report_object_property (REPID, report_other, hold1);
    v_rep: = run_report_object (repid);

    I would like to know if there is a work around.
    Appreciate your help.

    Thank you
    Laba

    It may be a problem with the password policy in Oracle 11 g. By default, passwords are now case sensitive. Your DBA can disable this option.

  • Changing the character set in the database 11G

    Running Windows 2008 Server 64-bit and Oracle 11 g (V 11.2.0.1.0). I would like to change my default character set when installing from 11 G to CS AL32UTF8.

    I read the utility Guide and Guide Support for globalization (http://docs.oracle.com/cd/B28359_01/server.111/b28298/ch11charsetmig.htm#g1011430), but none of these documents shows how you can effectively change everything / the character set of the migration. I would do this using the export and import utilities since this seems to be the most popular recommendation. But I'm really not sure of the procedure to follow to change the CS. For example, should I first export and then import then run the CSCHANGE script that is described in the globalization support Guide?

    I would be grateful any guidance on how to actually change the character set to AL32UTF8 and all documentation that explains not only the concepts, but the STEPS of HOW this can be done. Thank you, J

    Salvation;

    Please see:

    Change the character set of database - a brief overview Doc ID: 225912.1
    The National character located in Oracle 9i, 10g and 11g Doc ID: 276914.1
    Change the character set of database - definitions valid superset Doc ID: 119164.1

    Respect of
    HELIOS

  • GoldenGate 12 c on the database 11g

    Hello

    Wanted to know if Oracle Goldengate 12 c is compatible with Oracle Database 11.2.0.3?

    Thanks in advance,

    System requirements and Instructions preinstallation - 12 c (12.1.2)

    (Integrated capture mode) To use capture integrated with a database of the source Oracle 11.2.0.3, download and install the 11.2.0.3 specific set of databases to extract patch integrated. See the My Oracle Support 1557031.1 article for all the fixes delivered version of Oracle database. This mode uses a server logmining on the source system or in an Oracle database downstream. For more information,.

    So to use OGG 12 c IC minimum version requirement database are.

    1 > oracle 11.2.0.3 + apply a specific fix - MOS 1557031, or 2 > to use Oracle 11.2.0.4

    On the side of applying it, you can use OGG 12 c apply integrated features (parallelism) with Oracle 11.2.0.3 even without applying a specific patch - 1557031

    Pradeep

  • OWB 11.1 is compatible with the database 11g cubes/dimensions

    I heard OWB 11.1 stores the data in the format of 10g and it is not compatible with the format of 11g. However AWM 11.1 creates 11g data compatible. Is this true? Any idea?

    Thank you

    Hello

    That's right, that both OWB 10 g 2 and 11 GR 1 disclosed material generate OLAP 10 g style cubes using the api AWXML. AWM 11.1 can create/manage 10g and 11g cubes of styles. Needless to say, it takes a little time to catch up with a changing API... lots of fun things to come ;-)

    See you soon
    David

  • By specifying the host name for the database during installation

    I installed the database 11g r2 as a Server Desktop, anywhere during the installation it asked me to review or change the host name. It is automatically used as the host name "localhost" and wrote in listener.ora, so no other machine on the network is able to use it. Only, it connects since within the same machine. Please help how to specify the host name during installation.

    Published by: user4928701 on July 8, 2011 23:15

    user4928701 wrote:
    I installed the database 11g r2 as a Server Desktop, anywhere during the installation it asked me to review or change the host name. It is automatically used as the host name "localhost" and wrote in listener.ora, so no other machine on the network is able to use it. Only, it connects since within the same machine. Please help how to specify the host name during installation.

    Published by: user4928701 on July 8, 2011 23:15

    lsnrctl stop

    move/rename listener.ora to new/other file name

    lsnrctl start

  • Migration of database 11g (11.2.0.1) to 12 c (12.1.0.2)

    Hello

    I have two RAC environment of node on windows 2008 R2 with Oracle 11 g (11.2.0.1) 64. At the same time I built another environment of 12 c (12.1.0.2) software install only on windows 2012 64-bit using ASM. It is once again two-node RAC

    I want to migrate the database 11g (size about 400GB) on the 12 c environment.

    My preference is to use RMAN. Could you get it someone pls let me know what is the best way to perform this migration.

    Note: I don't do this in the Test environment so no issue on time.

    Any help would be appreciated.

    Concerning

    Hello

    The minimum version required to upgrade to 12 c is 11.2.0.2.0

    The version of your database is 11.2.0.1, so first you must upgrade to 11.2.0.2 or later and then update can be performed.

    This requirement applies to the backup rman as well.

    We do not have this restriction with datapump

    You can also check for TTS, Golden gate methods.

    Thank you

    Krishna

  • How to rename the directory to DATABASE_B in ASMCMD DATABASE_A?

    Hi all

    I need to rename the database CURRENTLY [size 500 GB] of DATABASEB, that uses ASM filesystem. If I try to copy the files from the directory ' + DATA\DATABASEA\datafiles\ * ' to + DATA\DATABASEB\datafiles\ * ' his required too much time and thus increase the load on the server.


    So please let me know is possible to rename the directory in the ASMdisk group.


    Thank you

    Updated with step by step above updated post.

    Levi Pereira

  • can I use "Oracle Database 12 c: performance management and Tuning" training for the certification "Oracle Database 11g: Performance Tuning 1Z0-054 '"»

    I took "Oracle Database 12 c: new performance management and Tuning" the oracle University training. Now I would like to get certified on "Oracle Database 11g: Performance Tuning 1Z0-054 ' exam. Is this possible?

    I guess you ask if you can use the course 12 c as long as the condition of course for the review of 11g.  Over 12 c is not listed as one of the options for the 11 g certification and course requirements are normally specific version - at least with DBA certifications.  If you are already an Oracle OCP DBA, of course, there is no requirement of course for the review of performance tuning.  From what I know the training requirements for other certifications, I do not that you will be able to use it. However, Brandye will provide a definitive answer to whether the course 12 c would be acceptable for 11g certification.

    That said, I'm with John - 12 c review is about a community of 85 to 90% in the review of the 11g and is currently about 20% of the price while it is in beta.  What is the point of trying to cross the releases?

  • Problems connecting to the database msaccess 32 bit on 64 bit 11G

    Here's the question:

    I have a database to 9i (32-bit windows) with a connection hsodbc to an old one to an Access database so once the schema can see and copy data from an access database has said, everything works fine.

    I'm about to move the 64 bit 11.2.0.3 on windows 2008 server 64-bit database, database is migrated and tested ok.

    The problem comes from the connection dg4odbc, I created the AS400 database connections and they are ok, but I set up an ODBC for the access database, using the 32-bit ODBC interface as MS recommends, but I always get this error message:

    ERROR on line 1:

    ORA-28500: connection between ORACLE and a non-Oracle system has sent this message:

    [Microsoft] [ODBC driver manager] The specified DSN contains an architecture

    incompatibility between the driver and the Application {IM014}

    ORA-02063: preceding 2 lines of RADERDB

    According to MS technet, it is do not use the c:\Windows\SysWOW64\odbcad32.exe to set up the ODBC connection, but I used only executable, when I use the ordinary 64-bit ODBC admin I can't even see msaccess drivers first.

    The funny thing is, when I point the tnsnames.ora on the old server 9i entry, it uses the ODBC connection and then the dblink 11G and then works fine. However, it is a band-aid solution and I want to get everything works from the new production database server.

    Any suggestions?

    Thanks in advance...

    The message means you are using a 32-bit with a 64-bit program ODBC driver. It does not work. If you want to connect with the 64-bit DG4ODBC, you must use a 64-bit ODBC driver. A package is available on the Microsoft Technet site (AccessDatabaseEngine_x64 - http://www.microsoft.com/en-gb/download/details.aspx?id=13255 ) that ships the drivers ODBC 64-bit for their Excel/Access programs.

    Please note that product installation gateway 32-bit on Windows 64-bit is NOT supported.

    -Klaus

  • Import of XML in the oracle 11g database

    I have some difficulty parsing of an XML file in the oracle 11g database.

    Currently using Oracle 11 g Express Edition (XE)

    Here's how my XML file looks like this:


    <? XML version = "1.0" encoding = "UTF-8" standalone = "yes"? >
    -< AccountMap xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" >
    -< account >
    -< AccountMapping >
    < AccountID > 0000000000000 - 000 < / AccountID >
    < AccountName > XLS < / AccountName >
    Excel < AccountType > < / AccountType >
    < AccountOwner > system < / AccountOwner >
    < / AccountMapping >
    -< AccountMapping >
    < AccountID > 0000000000000 - 001 < / AccountID >
    < AccountName > XLSS < / AccountName >
    Excel2 < AccountType > < / AccountType >
    System2 < AccountOwner > < / AccountOwner >
    < / AccountMapping >
    -< AccountMapping >

    and so now the file continues... I have the xml file that is saved on my hard drive

    I created a package in SQL Developer

    create or replace
    PACKAGE XML_FILEHANDLER AS

    type TRecord is (record
    Account_ID varchar2 (100)
    , Varchar2 (100) AccountName
    , Varchar2 (30) AccountType
    , AccountOwner varchar2 (100)
    );

    type TRecordTable is table of the TRecord;

    getRows function (p_directory in varchar2, p_filename in varchar2) return TRecordTable pipeline;

    END XML_FILEHANDLER;

    -BODY

    create or replace
    PACKAGE BODY XML_FILEHANDLER AS

    getRows function (p_directory in varchar2, p_filename in varchar2) return TRecordTable AS pipeline

    nb_rec NUMBER: = 1;
    tmp_xml CLOB.
    tmp_file CLOB.
    REC TRecord;

    BEGIN

    DBMS_LOB.CREATETEMPORARY (tmp_file, true);
    tmp_file: = dbms_xslprocessor.read2clob (p_directory, p_filename);

    recomm. Account_ID: = regexp_replace (tmp_file, '. * <>(. *) Account_ID < / Account_ID >. *', '\1', 1, 1, 'n');
    recomm. AccountName: = regexp_replace (tmp_file, '. * < AccountName >(.*) < / AccountName >. *', '\1', 1, 1, 'n');
    recomm. AccountType: = regexp_replace (tmp_file, '. * < AccountType >(.*) < / AccountType >. *', '\1', 1, 1, 'n');
    recomm. AccountOwner: = regexp_replace (tmp_file, '. * < AccountOwner >(.*) < / AccountOwner >. *', '\1', 1, 1, 'n');

    loop

    -This regexp is instance (s) of this model: "<? XML...? ' > < root_tag >... < / root_tag >.
    tmp_xml: = regexp_substr ([tmp_file, ' < \?xml[^?] +------? > \s+ < ([^ >] +) >. *? < / \1 > ', 1, nb_rec, 'n');
    When the output length (tmp_xml) = 0;
    -dbms_output.put_line (tmp_rec);
    nb_rec: = nb_rec + 1;

    SELECT Account_ID AccountName, AccountType, AccountOwner
    in rec. Account_ID, rec. AccountName, AccountType rec. rec. AccountOwner
    from xmltable)
    "Accounts/AccountMapping" in the way of xmltype (tmp_xml) columns
    Path of varchar2 (100) Account_ID 'Account_ID '.
    , Path of varchar2 (100) AccountName "AccountName".
    , AccountType varchar2 (30) path 'AccountType '.
    , Path of varchar2 (100) AccountOwner "AccountOwner.
    );

    line (CRE);

    end loop;

    DBMS_LOB.freeTemporary (tmp_file);

    GetRows END;

    END XML_FILEHANDLER;

    -I call my function using the following sql query

    Select * from table (XML_FileHandler.getRows ("XML", "test.xml"));

    Here is the error I get

    ORA-29283: invalid file operation
    ORA-06512: at "SYS." UTL_FILE", line 536
    ORA-29283: invalid file operation
    ORA-06512: at "XDB". DBMS_XSLPROCESSOR', line 265
    ORA-06512: at "user. XML_FILEHANDLER', line 13
    29283 00000 - "invalid file operation.
    * Cause: An attempt was made to read from a file or a directory which is
    not exist, or the file or directory access was denied by the
    Operating system.
    * Action: Check access privileges to the file and directory on the file system
    and if reading, check that the file exists.

    I did the following

    -Provided appropriate access to the user (read, write), including directory access rights
    -ensure that the directory exists
    -to ensure the existence of the file

    I have searched all over google and metalink but am unable to get this to run... Help, please!

    >
    SELECT Account_ID AccountName, AccountType, AccountOwner
    in rec. Account_ID, rec. AccountName, AccountType rec. rec. AccountOwner
    from xmltable)
    "Accounts/AccountMapping" in the way of xmltype (tmp_xml) columns
    Path of varchar2 (100) Account_ID 'Account_ID '.
    , Path of varchar2 (100) AccountName "AccountName".
    , AccountType varchar2 (30) path 'AccountType '.
    , Path of varchar2 (100) AccountOwner "AccountOwner.
    );
    >
    implement

    SELECT Account_ID, AccountName, AccountType, AccountOwner
    into rec.Account_ID, rec.AccountName, rec.AccountType, rec.AccountOwner
    from xmltable(
    'AccountMap/Accounts/AccountMapping' passing xmltype(tmp_xml) columns
    Account_ID varchar2(100) path 'Account_ID'
    , AccountName varchar2(100) path 'AccountName'
    , AccountType varchar2(30) path 'AccountType'
    , AccountOwner varchar2(100) path 'AccountOwner'
    );
    
    SQL> SELECT Account_ID, AccountName, AccountType, AccountOwner
      2  --into rec.Account_ID, rec.AccountName, rec.AccountType, rec.AccountOwner
      3  from xmltable(
      4  'AccountMap/Accounts/AccountMapping' passing
      5  xmltype('
      6  
      7  
      8  
      9  0000000000000-000
     10  XLS
     11  Excel
     12  System
     13  
     14  
     15  0000000000000-001
     16  XLSS
     17  Excel2
     18  System2
     19  
     20  
     21  ')
     22  columns
     23  Account_ID varchar2(100) path 'Account_ID'
     24  , AccountName varchar2(100) path 'AccountName'
     25  , AccountType varchar2(30) path 'AccountType'
     26  , AccountOwner varchar2(100) path 'AccountOwner'
     27  );
    
    ACCOUNT_ID                                                                       ACCOUNTNAME                                                                      ACCOUNTTYPE                    ACCOUNTOWNER
    -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ------------------------------ --------------------------------------------------------------------------------
                                                                                     XLS                                                                              Excel                          System
                                                                                     XLSS                                                                             Excel2                         System2
    
    SQL> 
    

    AccountID use AccountID not Account_ID

    Account_ID varchar2(100) path 'AccountID'
    

    Published by: Alexandr on August 9, 2012 12:35 AM

  • Generated 11g report from the database?

    Is there a way to run a report of Oracle 11g from the database?
    I want to just out of the PDF file.

    "Event-Driven Publishing API is an API of PL/SQL, which allows automated submission jobs report Oracle within the data base Services."
    http://docs.Oracle.com/CD/E21764_01/bi.1111/b32121/pbr_evnt.htm#g1011531

  • Can I install OBIEE 11 g and database 11g on the same machine?

    Hi experts

    I have some confusion...
    I have the oracle database 11g on my server.
    I want to install OBIEE 11 g on this same machine...
    I just want to be sure that it will cause any problem or conflict...
    because I put ORACLE_HOMe=/home/oracle/app/oracle/product/11.2.0/dbhome_1
    and I have to set ORACLE_HOME for OBIEE also...

    Please let me know what how to give... and is there another way

    Thank you
    Abhishek Anand

    Hi Abhishek,

    You can install or mount the DB and OBIEE on the same machine, but check the disk space and memory required should be more to accommodate the.

    See you soon,.
    KK

Maybe you are looking for