How to rename a database

Hello Gurus,
Due to some reason I need to rename my database.Can anybody tell me how to rename a database.
Secondly,What should be the criteria to fix the size of archive log.i.e.What should we keep in mind while deciding the size of archive log?
Thanx

For the first question:
http://www.google.co.uk/search?hl=en&q=oracle+rename+database&btnG=Google+Search&meta=
With regards to the archive logs, these are needed to recover your backed up datafiles. So, what you keep is largely determined by your backup strategy. Check out:
http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14220/backrec.htm#sthref2338

Similar Messages

  • How to rename oracle9i database in windows 2000

    Hi All,
    I am trying to rename an oracle database on windows 2000. I am having some issues...can anyone help me how to fix it.
    Trace file is created from existing database (ORCLDB) using alter database backup controlfile to trace
    and the following steps are followed....
    Modify (and optionally rename) the created trace file:
    Find the line reading # Set #2. RESETLOGS case
    Remove all lines above this line.
    Change the line containing the database name from CREATE CONTROLFILE REUSE DATABASE "ORA9" RESETLOGS NOARCHIVELOG
    to
    CREATE CONTROLFILE SET DATABASE "CAT" RESETLOGS NOARCHIVELOG
    Note, in my case, the database is running in noarchive log mode. The corresponding line reads ARCHIVELOG otherwise.
    Remove the line reading RECOVER DATABASE USING BACKUP CONTROLFILE.
    Remove lines starting with #.
    the edited .trc file is saved as rename.sql
    STARTUP NOMOUNT
    CREATE CONTROLFILE SET DATABASE "NEWORCLDB" RESETLOGS NOARCHIVELOG
    -- SET STANDBY TO MAXIMIZE PERFORMANCE
    MAXLOGFILES 16
    MAXLOGMEMBERS 2
    MAXDATAFILES 30
    MAXINSTANCES 1
    MAXLOGHISTORY 454
    LOGFILE
    GROUP 1 'd:\oracle\databases\redo1.ora' SIZE 100M,
    GROUP 2 'd:\oracle\databases\redo2.ora' SIZE 100M,
    GROUP 3 'd:\oracle\databases\redo3.ora' SIZE 100M
    -- STANDBY LOGFILE
    DATAFILE
    'd:\oracle\datafile\system.dbf',
    'd:\oracle\datafile\undo.dbf',
    'd:\oracle\datafile\data.dbf'
    CHARACTER SET WE8ISO8859P1
    ALTER DATABASE OPEN RESETLOGS;
    ALTER TABLESPACE TEMP ADD TEMPFILE 'd:\oracle\Ora90\databases\temp.dbf'
    SIZE 104857600 REUSE AUTOEXTEND OFF;
    shutdown the ORCLDB databas from windows services
    Moved the old control file to other location
    The database name are changed in the new initneworcldb.ora
    Bcaz there is no SVRMGRL in 9i....How do i connect ??
    Which instance should i connect?
    I tried from c:\>sqlplus "/ as sysdba"
    Its asking for username and password?
    Which username/password@instnace should i login?
    What is the username and password....should i give for username....while funning sqlplus " / as sysdba"
    Thanks,
    Message was edited by:
    user444626

    As you said added the entry in the sqlnet.ora file
    sqlnet.authentication_services=(NTS)
    C:\>ORADIM -NEW -SID newdb -SRVC OracleServicenewdb -STARTMODE a
    C:\>set ORACLE_SID=NEWDB
    C:\>SQLPLUS /NOLOG
    SQL*Plus: Release 9.0.1.0.1 - Production on Fri Dec 9 20:28:18 2005
    (c) Copyright 2001 Oracle Corporation. All rights reserved.
    SQL> @C:\CR_CONTROL.SQL
    ORA-01031: insufficient privileges
    SP2-0734: unknown command beginning "STANDBY LO..." - rest of line ignored.
    SP2-0640: Not connected
    SP2-0734: unknown command beginning "Recovery i..." - rest of line ignored.
    SP2-0734: unknown command beginning "or if the ..." - rest of line ignored.
    SP2-0640: Not connected
    Media recovery complete.
    SP2-0734: unknown command beginning "All logs n..." - rest of line ignored.
    SP2-0640: Not connected
    SP2-0734: unknown command beginning "Database c..." - rest of line ignored.
    SP2-0640: Not connected
    SQL>
    Message was edited by:
    user444626

  • How to rename a Database - 10g

    Hello Experts,
    Can anyone please provide me all steps to rename a stand alone database. Any pointers would be of much help.
    Thanks

    D:\>NID
    DBNEWID: Release 10.2.0.1.0 - Production on Thu Jan 5 13:11:53 2012
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Keyword Description (Default)
    TARGET Username/Password (NONE)
    DBNAME New database name (NONE)
    LOGFILE Output Log (NONE)
    REVERT Revert failed change NO
    SETNAME Set a new database name only NO
    APPEND Append to output log NO
    HELP Displays these messages NO

  • How to rename database in oracle 8.0.5 unix?

    how to rename database in oracle 8.0.5 unix? for example from 'DBDEV' to 'DBTEST'

    Dear Amardeep,
    The OP opened 2 threads, one how to clone and other one how to rename a database 8. The article I send show how to clone the DB (one of the steps in the clone article is how to rename the DB from"PROD" to "Test"). ;)
    This is the other thread:
    easy way to clone database
    Cheers,
    Francisco Munoz Alvarez
    www.oraclenz.com

  • How to Rename Oracle 11g Database in the Linux

    I want to Rename Database.How I must do this problem.Please help me
    Edited by: 850512 on Apr 7, 2011 1:18 AM
    Edited by: 850512 on Apr 7, 2011 1:22 AM

    850512 wrote:
    Step by step pleaseBefore you proceed any further, you need to define the real problem you are trying to solve. "renaming" a database may or may not be the appropriate solution - not to mention that "rename the database" could mean several things and we don't know your definition of that phrase.

  • How to rename database with secondary indexes.

    Hi,
    could somebody advise how to run correct next operation:
    I have database with secondary indexes in a single file and I need to rename that db file.
    As I understand I have to
    1) close and delete all database handles
    2) remove from db file all secondary indexes with DbEnv::dbremove
    3) rename db file with DbEnv::dbrename
    4) create primary db
    5) create once again all secondary indexes and associate them with primary db
    Appreciate in advance.

    Hi,
    Your question has two possible cases:
    1. A single file contains main DB and its secondary indexes.
    2. A file contains several secondary indexes of main DB, another file contains the main DB.
    For the first case, the main database could be renamed directly, but all of the secondary databases do not continue to work. That means no new index items will be added automatically into exist secondary databases. So these secondary databases should be removed and created, you could also just run a DB->associate to re-associate it again. But in the later way, the re-associated secondary DB won't automatic index these records that are added before associating.
    That means, if main db is renamed and then inserted a record 'A'. Then secondary DB is re-associated to main db. The secondary DB still does not index record 'A'. And currently there is not method to let secondary DB manually index 'A' again. So it is better to remove and create a new secondary DB with DB_CREATE flag. That will make the new secondary DB scan current items and index them.
    For the second case, the result is the same, main database could be remained directly. Then all of the secondary databases should be re-created or re-associated. Still for the described reason, we prefer the first way.
    And, removing old secondary databases before renaming main database is also work in above cases.
    Thanks,
    Victor Yang

  • How can i rename my database  ???

    hi,
    can any body can help me rename my database ...???
    - chetan

    CHETAN YADAV wrote:
    hi,
    can any body can help me rename my database ...???
    - chetanTo changing database name you have to use create controlfile set database statement.Perform below steps.
    Consider that we have database which name is "TEST"
    1.Backup controlfile to trace
    C:\Documents and Settings\chinar>set ORACLE_SID=TEST
    C:\Documents and Settings\chinar>sqlplus "sys/sm as sysdba"
    SQL*Plus: Release 10.2.0.2.0 - Production on Thu Aug 26 11:33:04 2010
    Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> select name from v$database;
    NAME
    TEST
    SQL> alter database backup controlfile to trace as 'c:\c.txt' reuse;
    Database altered.2.Edit your pfile change db_name=NEWTEST and remove your old all controlfiles,otherwise you will get an error,shutdown your database.
    SQL> shutdown immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup  nomount pfile='D:\oracle\product\10.2.0\admin\TEST\pfile\init
    .ora.76201010739'
    ORACLE instance started.
    Total System Global Area  138412032 bytes
    Fixed Size                  1288172 bytes
    Variable Size              62916628 bytes
    Database Buffers           67108864 bytes
    Redo Buffers                7098368 bytes
    SQL> CREATE CONTROLFILE SET DATABASE "NEWTEST" RESETLOGS
      2      MAXLOGFILES 16
      3      MAXLOGMEMBERS 3
      4      MAXDATAFILES 100
      5      MAXINSTANCES 8
      6      MAXLOGHISTORY 292
      7  LOGFILE
      8    GROUP 1 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\REDO01.LOG'  SIZE 50M,
      9    GROUP 2 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\REDO02.LOG'  SIZE 50M,
    10    GROUP 3 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\REDO03.LOG'  SIZE 50M
    11  DATAFILE
    12    'D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\SYSTEM01.DBF',
    13    'D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\UNDOTBS01.DBF',
    14    'D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\SYSAUX01.DBF',
    15    'D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\USERS01.DBF',
    16    'D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\EXAMPLE01.DBF';
    Control file created.
    SQL> alter database open resetlogs;
    Database altered.
    SQL>
    SQL> select name from v$database;
    NAME
    NEWTEST
    SQL>

  • Can we rename the database name in oracle 10g

    Hi,
    Can we rename the database name in oracle 10g.
    Please help

    Yes as already said, using DBNEWID Utility can renamed the database name.
    You can also take a look at the Oracle Metalink Note:429674.1 (Which was written by me) - Subject: How We Used the Oracle DBNEWID Utility to Change the Database Name
    Regards,
    Sabdar Syed.

  • How to start a database by copying the files(tablespace, redo, ctl files)

    Hi,
    I have two databases called Q1 and Q2. I am planning to copy from a cold backup files from Q1 to Q2 database.
    could anybody will provide the steps involved in how to copy from one database to another and how to rename the target database after copying and renaming the files in the target database to up and run?
    Please help.
    Thank you.

    For Oracle version from 9i the steps are :
    Perform Cold Backup of the Production database
    1. Note down the datafile, controlfile and redologfile locations on proddb
    2. Shutdown the production database Ensure clean shutdown.
    3. Copy the database files (datafiles, logfiles, controlfiles and parameter file) into the clone destination.
    4. Modify the parameter CONTROL_FILES in the pfile for clonedb to reflect
    the new path of the control files.
    1. Mount the database and rename the datafiles and redolog files.
    export ORACLE_SID=clonedb
    DB02> sqlplus / as sysdba
    DB02> startup mount
    DB02> alter database rename file '/u01/<path_to_proddb_files>/<filename>' to '/u01/<path_to_clonedb_files>/<filename>'
    2. Rename the database with the dbnewid (nid) utility
    3. Edit the pfile and update the new database name
    Modify parameter DB_NAME to reflect the new database name.
    also ensure you make necessary changes to the environment for ORACLE_SID, ORACLE_HOME
    as needed.
    4. Open the clone database.

  • Error while renaming Search databases

    followed below steps to rename search dbs.
    http://blogs.technet.com/b/wbaer/archive/2013/12/18/how-to-rename-search-service-application-databases-on-the-same-server.aspx
    But getting error while pointing to new renamed DB. Please advice
    $SearchService | Set-SPEnterpriseSearchServiceApplication -
    DatabaseName SSA -DatabaseServer SPDEV
    Set-SPEnterpriseSearchServiceApplication : The remote procedure call failed.
    (Exception from HRESULT: 0x800706BE)
    At line:1 char:18
    + $SearchService | Set-SPEnterpriseSearchServiceApplication -DatabaseName SSA
    -Dat ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~
        + CategoryInfo          : InvalidData: (Microsoft.Offic...viceApplication:
       SetSearchServiceApplication) [Set-SPEnterpriseSearchServiceApplication], C
      OMException
        + FullyQualifiedErrorId : Microsoft.Office.Server.Search.Cmdlet.SetSearchS
       erviceApplication

    did you stop the Search service Application before staring the process. 
    Are you on the SharePoint Server? try to Run the SharePoint powershell console as Administrator.
    Also make sure the account under which you are running powershell having the rights on the new Databases.
    try this one and see if you can get the searchservices application name:
    $SearchService = Get-SPEnterpriseSearchServiceApplication <SearchServiceApplicationName> 
    $SearchService
    here is the technet for the same process.
    http://technet.microsoft.com/en-us/library/jj219654(v=office.15).aspx
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • How to modify the database name

    Hi people
    Im a developer and it's the first time that I use the Xe version of oracle. I need to modify the database name but I don't know how to make this. Im finding the commands but I don't meet this.
    Anyone can help me?
    Thanks
    Best Regards

    Hi,
    XE is XE is XE ... ;-)
    If you'd like to rename it you may get a database license for at least a STANARD EDITION ONE database, upgrade your XE to SE-ONE and then rename your database.
    But (as it has been noted before) for obvious reasons there's no way to rename an XE database to something else :-)
    Kind regards
    Mike

  • How to Create new database from cold backup files.

    Dear Experts,
    I have an oracle 10g databae on windows 2003 server.
    The database is in Archive log mode and backup strategy is Taking cold backup ever night.
    Backup steps:
    shut down database.
    copy data files, control files, redo logs, archive logs and parameter files to safe location.
    Startup.
    I have taken a backup at Tuesdaay 1AM and I have archive logs also.
    On Wednesday, I want to Create a new database on another server with the available cold backup files and archive logs. I want to recover the database upto 4PM Wednesday. How can I do this.
    I am not using control file auto backup or control file backup to trace.
    Please help me how can I do this. I am new to oracle database Administration.
    --Thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    The steps :
    shut down database.
    copy data files, control files, redo logs, archive logs and parameter files to safe location -- you mean the alternate location for the new databaseare correct (except that I would say "alternate location for the new database").
    If you do not have controlfile backups, you cannot either OPEN the database or RECOVER the database until and unless you CREATE the Controlfiles. You have to generate a CREATE CONTROLFILE script using a BACKUP CONTROLFILE TO TRACE from the Production serer and create the controlfile on the new server.
    BEFORE the Startup, I would use
    RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL;The "using backup controlfile" tells Oracle to continue attempting Recovery -- ie doing a RollForward -- till the last archivelog made available to it.
    For the Recover command, you then keep applying the ArchiveLogs from the Tuesday 1am ColdBackup upto Wednesday 4pm.
    Once you have applied the last ArchiveLog, you do an
    ALTER DATABASE OPEN RESETLOGS;Here are my notes of doing a RollForward "Recovery" from a Cold Backup :
    http://hemantoracledba.blogspot.com/2007/05/rollforward-from-cold-backup.html
    If you are attempting all these steps on a different server from your current Production database, you should be safe.
    Once you OPEN the database, you can use CREATE CONTROLFILE or the NID utility to rename the database.
    If you are attempting to create the new database on the same server there are many other precautions you have to take and unless you have experience with cloning databases, I would advice you against doing so (only the RMAN DUPLICATE DATABASE command has a safer method of cloning a database).
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • Renaming a database

    Is there anyway to rename a database using Oracle 9i on Linux?
    Thanks

    You can also use the nid utility. This is from windows, there should be one on linux aswell - check the documentation on how to use it.
    C:\>nid
    DBNEWID: Release 9.2.0.1.0 - Production
    Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved
    Keyword Description (Default)
    TARGET Username/Password (NONE)
    DBNAME New database name (NONE)
    LOGFILE Output Log (NONE)
    REVERT Revert failed change NO
    SETNAME Set a new database name only NO
    APPEND Append to output log NO
    HELP Displays these messages NO

  • Rename of database

    how can database be renamed. i m using oracle10g.

    Hi
    How does it work in case of rac instances. I guess it does not changes because it is the datbase name we are changing and database name is the same for rac/non-rac. How about the instance names though? Is there anything that we need to be aware when changing instance names? The reason I ask is we have _ in our instance name and database name and I want to remove the _.
    I can use the nid tool to rename the database. For the instance name, I should just change the init.ora and recreate password file (actually this should be done for db name change and not really instance name change).
    Anything else that need to be changed ?
    MSK

  • How to rename db fields, parameter fields

    Hi,
    I am using the XI 3.1 RAS .NET SDK and I am trying to rename all db fields and parameter fields of existing reports.
    I able to list all the db fields and the parameter fields but have no way to rename them. I would like to rename them such that all references to these fields are also updated.
    Thanks,
    Jithin

    Hi Jithin,
    As noted in the Report Designer you can not rename the database table fields, you can Alias the table name but that is all. Same in the SDK. In the Report Designer, right click on the database/table in the Database Wizard and selectRename.
    Only option is to use a Stored Procedure or a View and use the DB Server to alias your field names.
    Or use a Command Object and write your own SQL to alias the field names if your DB and the connection support it. You however cannot set lcoation for an existing report based on tables to a comand object so you'll have to recreate the report.
    For more info on how to us Command Objects or recreating your report post your question in the Report Design forum.
    Thank you
    Don

Maybe you are looking for