Cloning a prod database

Suppose I have 2 databases, the prod is running on version 9.2.0.6 on a unix SunOS 5.8 and a test database running 9.2.0.6 on unix SunOS 5.8 (but a different physical box).
The prod server has nightly hot backups and is in archive log mode. Requirement is to clone the production database into the test database. (To make it look exactly the same). In other words, the test can be completely wiped out and everything in prod be brought over. Can this be achieved without a downtime in prod server ? If so, how ? Can I get the steps needed to achieve this ? (I have done a clone before but that involved a cold backup from prod and the prod was affordable for a shutdown, but here that flexibility isn't there)

Hi,
Yes,this is possible to create a clone database from hot backup.
Resore backup into new machine;
startup mount;
rename datafile if required.(if dbf locations is diff then primary database)
recovery database until cancel;
alter database open resetlogs;
**Also apply archivelog that are generated from prod database inbetween the time of creating clone database.
and Recover upto the latest archivelog.
and open with resetlogs option.
Thanks
Kuljeet Pal Singh

Similar Messages

  • Inconsistency while storing Spanish Characters in Devl Vs Prod Databases:

    Hi there,
    We have setup dev and prod database instances with the same NLS Characterset settings,
    However, when a Spanish character is saved in the devl instance,
    the character is saved to the database correctly.
    However the same character when saved in prod, is stored as ampersand, pound, 0255; not á.
    Although the character displays correctly via sqldeveloper as well as in the reports,
    any ideas as to why there is inconsistency in the behavior.
    SQL> select instance_name from V$instance;
    INSTANCE_NAME
    utf8devl
    SQL> select * from nls_database_parameters
    where parameter like '%CHARACTERSET';
    PARAMETER                VALUE
    NLS_CHARACTERSET          AL32UTF8
    NLS_NCHAR_CHARACTERSET          AL16UTF16
    SQL> desc tblpersoninfo
    Name Null? Type
    ACTIVE VARCHAR2(1)
    ID NOT NULL NUMBER(9)
    LAST_NAME VARCHAR2(255)
    FIRST_NAME VARCHAR2(255)
    MI VARCHAR2(12)
    SQL>select last_name from tblpersoninfo where id=2;
    LAST_NAME
    xxxxx     á
    SQL> select instance_name from V$instance;
    INSTANCE_NAME
    utf8prod
    SQL> select * from nls_database_parameters
    where parameter like '%CHARACTERSET';
    PARAMETER                VALUE
    NLS_CHARACTERSET          AL32UTF8
    NLS_NCHAR_CHARACTERSET          AL16UTF16
    SQL>select mi from tblpersoninfo where id=2;
    MI
    á
    (although the character renders properly here, it is saved as ampersand, pound, 0255;)
    SQL>select length(mi) from tblpersoninfo where id=2;
    LENGTH(MI)
    6
    when I was expecting 1 as the result for the above query.
    best regards,
    NK
    Edited by: NK on Jan 13, 2012 10:03 AM
    Edited by: NK on Jan 13, 2012 10:04 AM

    NK wrote:
    The programmer who has reported this problem is using the same application just switching between the 2 environments;
    á Typ=1 Len=6 CharacterSet=AL32UTF8: 26,23,32,32,35,3bI guess Srini is correct in asking for the process in which this is stored. E.g. What does above "just switching" actually involve?
    Above characters & #225 ; implies "html character entities" input, which means prod does not behave same as dev. (Oracle would not, by itself, cause that kind of "conversion".)
    Investigate input at client side (e.g. web server form).
    Note, to clarify for readers of this thread: the rendering of the html entity to character glyph (á) occurs in forum post.
    Edit:
    added a missing and crucial "not"
    Edited by: orafad on Jan 13, 2012 8:31 PM
    Edited by: orafad on Jan 13, 2012 8:33 PM
    Edited by: orafad on Jan 13, 2012 9:19 PM

  • Cloning Non EBS Database with Rapid Clone.

    Hi DBAs,
    It might sound weird but I was curious that - Can you clone the regular oracle database (Non EBS) using rapid clone. Lets suppose if I copy over appsutil directory from a EBS database and manually edit the context file with current instance information. Also if I need to do some changes in shell/perl scripts of rapid clone etc.
    Have any one done it in past by doing some magic and tricks or Is there automated script based cloning available for regular databases?
    Thanks
    -Naveed-

    Hi Naveed,
    I believe it is not possible as Rapid Clone is an Oracle Apps utility, so Oracle does not support cloning non-Apps databases using Rapid Clone.
    In addition, there is no context file or AutoConfig in such a database, which is required for Rapid Clone to work properly.
    Is there automated script based cloning available for regular databases? For this cloning, you can use the manual method, export/import, or RMAN.
    Note: 458450.1 - Steps to Manually Clone a Database
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=458450.1
    Note: 388431.1 - Creating a Duplicate Database on a New Host
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=388431.1
    Note: 1009100.6 - How to Create a Duplicate Database in Unix (Via Export/Import)
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=1009100.6
    Regards,
    Hussein

  • Error while creating standby database for ebs prod database

    Hi,
    We are getting error while trying to create a standby database for EBS database by using RMAN DUPLICATE commands,
    Steps followed:
    1.) Backup the primary database (Ebs PROD db). This was done on 12-Mar-2012
    ***RMAN backups are scheduled to run @10:00 pm every night. Flash Recovery Area has been configured and backup is taken at this location
    everyday.
    2.) Tar the backupset, autobackup, archivelogs etc in FRA .... and copy this to the target server (STANDBY).
    *** Copy(oracle rdbms binaries and FRA) completed @12:00AM on 14-Mar-2012
    3.) Tried to create standby database by using RMAN duplicate on 14-Mar-2012
    RMAN> rman sys/sys@PROD auxiliary /
    RMAN> duplicate target database for standby dorecover nofilenamecheck;
    After, some time the RMAN DUPLICATE process errors out with,
    ORA-19563: header validation failed for file
    We are not sure about the cause of this error. While searching in Metalink, we got several notes (ex, 352074.1) but all the causes stated for this error
    are not applicable in our case. We double checked our instance to confirm this.
    We have also found that in PROD database there are 65 datafiles and after the RMAN DUPLICATE errors out in the targer server (STANDBY) the RMAN managed to restore 51 datafiles before erroring out.
    # Please note PROD database was also backed up on 13-Mar-2012. We have a suspicion that backup on 13-Mar may be a possible cause for this error but we are
    not sure.
    Need suggestions if there can be any other possible causes???
    We are in a fix and it would be appreciable if we get some quick suggestions..
    Regards,
    Rupdipt
    Edited by: orarup on Mar 14, 2012 12:29 AM

    When opening the file to be placed in a copy or backup set, to be inspected, or used as the target for an incremental restore, its header was not recognized as a valid file header for a file of the indicated type (data file, archived log, or control file) belonging to the current database.
    Kindly Ensure that the correct files are being specified for the copy or backup operation.
    Regs,
    Bhavi Savla.

  • Creating a standby control file for cloning a standby database

    Hi
    I am in the process of trying to document the cloning of a standby database. I am trying to amalgamate three different documents - one for a normal clone, one for the creation of a SB database, and the other a formal Oracle document - the Business Continuity doc.
    Among the several things that confuse me, is the issue of creating (or not) a standby control file.
    I am not doing any kind of data file deletion / copying from source to target, as the SB database is updated all day with data file changes. I am doing a complete copying over of the APPL_TOP and techstacks.
    My question then, is this: should I be worried about creating a standby control file? I am told by our Senior here that "you can get away with not doing it", which sounds like too much of a risk to me.
    I am under a bit of pressure for this and I am not 100% sure about certain issues (see my other post for knowing how many DATA_TOPS we have on the SB, for instance).
    Thanks for listening.
    AIX 5.2.
    Oracle 10g.
    DA

    Do you already have a Standby running ? (then it may be using a standby controlfile).
    Yes. And there is already a standby control file there. It seems to me, that if the data (logs) transfers are done each minute or whatever between source and SB, and the SB is a copy of the db, then we dont need to worry about any kind of data files, since they should be identical. The only things I will need to change are the configuration files like the ifile in both dbs and tns_names, listener, tnsnames.ora, and the init.ora.
    b. Are you creating a document about the process of creating standby from production ? If you plan to use DataGuard, you will need a standby controlfile. Otherwise , it depends on how you configure the standby.
    No. I am creating a doc for how to clone from Production to a SB environment. A reason behind this is that the Apps side of the SB is about 9 patches behind the Production box, and we need to update it. I believe this is the main reason for doing this.
    c. Just to check : You are NOT using Storage Mirroring -- ie D.R. ?
    No, no DR on this environment.
    Thanks.
    DA

  • Cloning the Oracle Database Server which has Grid 11.2.03 and DB 11.2.0.3

    Hi DBA's,
    Did anybody came across cloning a database servers? If i have the OFA for Grid and DB homes i.e /u01/app/oracle so after clone it will be the same across all servers. So the inventory structure will be same also. After cloning changing the listener.ora files to point to new IP/Hostname can bring up the listener. What else? Did anybody tried this things and what all issues have come or what all issues could come.
    Thanks,
    Bhushan Altekar

    Ok. I got the cloned VM . I did the same steps as we use for normal grid and db cloning. Below are the steps i did.
    1) change the ip address
    2) reboot
    3) after reboot wait for few minutes till the ASM comes up automatically
    4) as root run the below command
    /u01/app/oracle/product/11203/grid/crs/install/roothas.pl -deconfig –force
    5) Change the hostname with system-config-network-tui - Edit DNS Configuration and change the hostname here
    6) Edit the /etc/hosts file and enter the ip address and the hostname
    7)Reboot
    8) After the reboot as root run the command
    /u01/app/oracle/product/11203/grid/root.sh
    ================================
    #output of step 8
    [root@cat ~]# /u01/app/oracle/product/11203/grid/root.sh
    Performing root user operation for Oracle 11g
    The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME= /u01/app/oracle/product/11203/grid
    Enter the full pathname of the local bin directory: [usr/local/bin]:
    The contents of "dbhome" have not changed. No need to overwrite.
    The contents of "oraenv" have not changed. No need to overwrite.
    The contents of "coraenv" have not changed. No need to overwrite.
    Entries will be added to the /etc/oratab file as needed by
    Database Configuration Assistant when a database is created
    Finished running generic part of root script.
    Now product-specific root actions will be performed.
    Using configuration parameter file: /u01/app/oracle/product/11203/grid/crs/install/crsconfig_params
    LOCAL ADD MODE
    Creating OCR keys for user 'oracle', privgrp 'dba'..
    Operation successful.
    LOCAL ONLY MODE
    Successfully accumulated necessary OCR keys.
    Creating OCR keys for user 'root', privgrp 'root'..
    Operation successful.
    CRS-4664: Node cat successfully pinned.
    Adding Clusterware entries to inittab
    cat 2012/08/23 13:14:02 /u01/app/oracle/product/11203/grid/cdata/cat/backup_20120823_131402.olr
    Successfully configured Oracle Grid Infrastructure for a Standalone Serveror a Standalone Server
    ===============================
    9) stop the HAS service
    crsctl stop has
    10) Add the listener
    srvctl add listener
    11) Add the asm instance as new cloned grid don’t know about it. So we have to add it and see its added or not.
    12) srvctl add asm -d '/dev/oracleasm/disks/*' # Note here if you specify wrong diskstring. Your Oracle restart stack wont come up automatically after reboot. so please specify it correctly.
    13) crsctl status res # check all the resources are added or not
    14) edit the listener.ora file and change the hostname ( HOST = XXXX part of the file)
    15) crsctl enable has
    Congrats we have successfully cloned the database server itself.
    Please check the steps i did. And add if you think it should be added and taken care of.
    Thanks,
    Bhushan Altekar
    Edited by: user13368428 on Aug 23, 2012 3:13 PM
    Edited by: user13368428 on Aug 31, 2012 4:58 PM

  • Cloning a 10g Database using DBCA and templates

    I have created a template from a 10G database (structure and data) and want to use this template and data to create a clone of the database on another server using the DBCA on the standby server. Where does DBCA ask for the names of the templates of my clone database? It seems to only have templates for its pre-existing databases (wharehouse, general purpose, custom, etc.).

    Thanks. I figured this out on my own and seems work fine. My problem is I am connected over a Window network domain and the transfer speed is very slow. I finally had to kill the job and manually move the critical control, init, redo, and data files that DBCA missed. I also had to use the DBCA again to create the EM DBconsole server as well as copy over the, initPROD.ora file as well as the tnsnames.ora, listener.ora and sqlnet.ora files over to the $ORACLE_HOME/Network/Admin directory. SPFILE was create using create spfile command, I had to perform a recover database once in the initial startup of the database clone.
    If I do this operation again I will move datafiles and DBCA template components from the server to a USB SCCI Drive connected locally to the source server then connect this remote disk to the target server rather than transfer files over a domain network.
    Any other tips that anyone can over on cloning a database using DBCA in 10G please let me know any things to avoid, traps, bugs, best practices would be greatly appreciated.
    RR.

  • Help in refrshing TEST from PROD database

    Hi All,
    I need to refresh one of my test server with Production instance from the cold backup.
    Please post a detailed steps i need to perform to do this.
    Both of databases are in different servers and both are windows servers.
    Appreciate helping me to learn.
    Regards
    Arun

    Hi, are you sharing storage between the prod an test database?
    If not, why dou want to rename the datafiles?
    However, if you want to rename the datafiles, you have to change the datafiles name at S.O. level (I suggest you to copy -duplicate- the datafiles and, once you have renamedthe datafiles and checked that the database works fine, then delete the "old" datafiles).
    I don't suggest you to rename system's datafile! (But internet is full of procedures for do it)
    For change datafiles names at dabase level (ergo, at logical level) you have to do the following:
    startup mount;
    and, for each datafile:
    alter database rename file 'old_name' to 'new_name';
    You can check the old names, and your progress querying the v$datafile view.
    I hope this help.
    Regards.

  • Cloning Of Production Database

    Hi,
    I have a production database on 8.1.6 which I need to upgrade to 10gR2. The upgrade path will be 8.1.6>8.1.7>10gR2.
    Now as the testing and development will not be done on the production database, there is a separate test and development machine without any of the Oracle version installed.
    I want to avoid export/import and as I have been suggested, the only other means is Cloning.
    Can somebody give me a bigger picture as to how can I restore or use the clone image to create a 8.1.6 copy on the test machine?
    Thanks.
    Rajeev

    Hi,
    The easiest way to do that would IMO to use RMAN's DUPLICATE statement. There's a sample at the end of the linked doc.
    This doc is for 9i, but IIRC this should work all the same in 8i RMAN, as far as the CLONE statment was deprecated in... 8.0 ?
    Regards,
    Yoann.

  • Need Help: Generate Customer Data from Prod Database

    Hi All,
    My company have an Oracle Financial System, with and old version Oracle Application 11.0.3 and Oracle Database 8.0.5. The database name PROD. This system has been use for more than 7 years and in between there were many stuff resigned without handover and therefore many records and supporting steps cannot be trace back. However the system is still keep running and updated daily.
    Recently we have a user request to generate out a list of customer company name, and their related products purchase from the database, this is because they does not have any methods to print out the list from application. Unfortunately, we do not know which tables or index is actualy storing the name of the customer and products. We have the list of below users accounts that able to log in to the database.
    PA/PA
    APPLSYS/APPS
    APPS/APPS
    ALR/ALR
    AX/AX
    AK/AK
    GL/GLRG/RG
    FA/FAHR/HR
    SSP/SSP
    HXT/HXT
    OTA/OTA
    RLA/RLA
    VEH/VEH
    QA/QA
    ICX/ICX
    AZ/AZ
    AP/AP
    AR/AR
    OE/OE
    OSM/OSM
    NSM/NSM2020
    CN/CN
    MFG/MFG
    INV/INV
    PO/PO
    BOM/BOM
    ENG/ENG
    MRP/MRP
    CRP/CRP
    WIP/WIP
    CZ/CZ
    PJM/PJM
    FLM/FLM
    MSC/MSC
    CS/CS
    CE/CE
    EC/EC
    JG/JG
    APPS/APPS
    All the reference documents is no longer exist. I am able to use SQL Plus to generate the list of tables with the command : select table_name from user_tables. Each user accounts will return different kind of table names. But still I cant locate which table that actually storing the name of the customers and products.
    Is that anybody got hands on this case before? Urgent

    We have this table: And need to unload this table data in flat file format.
    Need help with unload SQL file with these two columns:
    AMT_PAID_ORIG, AMT_PAID_ADJ
    SQL> desc flconv.claim_adj_less
    Name Null? Type
    SAK_CLAIM_ADJ_LESS NUMBER(10)
    SAK_CLAIM_ADJ NUMBER(10)
    ADJ_CLAIM_ICN NUMBER(13)
    ORIGINAL_CLAIM_ICN NUMBER(13)
    DATE_PAID_ORIG NUMBER(8)
    DATE_PAID_ADJ NUMBER(8)
    AMT_PAID_ORIG NUMBER(10,2)
    AMT_PAID_ADJ NUMBER(10,2)
    SAK_PROV_LOC NUMBER(9)
    SAK_FUND_CODE NUMBER(9)
    CHECK_SAK NUMBER(9)
    SAK_PUB_HLTH NUMBER(9)

  • Discoverer EUL for mutilple PROD database -- USER duplicates

    I currently have an EUL that is using a database instance (PROD) but in the near future I will be needing to also use (preferably in same EUL tables) TWO other production database instances.
    There may be DUPLICATE database user accounts between the THREE database instances; how does one handle this ?

    Hi,
    The reason the report fails with "Item dependency not found in EUL " error is most likely because the user does not have access to one of the business areas in the EUL or user in the database does not have access to a table/view or function used in the EUL. Is the EUL a database or Apps EUL? Check that the user can access all the EUL folders and items that are used in the report.
    The users' settings such as fan trap detection are held in the PC registry and so usually not overwritten by a re-install.
    Rod West

  • Change NEXT_RUN_DATE in test to match with the Prod database NEXT_RUN_DATE

    i have job name "REFRESH_MN_ADDRESSES_J" in Schema "MESH_FOR" in Test database . What i want is that the this job NEXT_RUN_DATE should be chnaged to the Production database NEXT_RUN_DATE. How to do that in Oracle 10g database
    In test database
    <code>
    Select next_run_date from ALL_SCHEDULER_JOBS where OWNER='MESH_FOR'and job_name='REFRESH_MN_ADDRESSES_J'
    NEXT_RUN_DATE :
    27.07.2010 05:30:00,000000000 +02:00
    </code>
    In Production database
    <code>
    Select next_run_date from ALL_SCHEDULER_JOBS where OWNER='MESH_FOR'and job_name='REFRESH_MN_ADDRESSES_J'
    NEXT_RUN_DATE :
    27.07.2010 10:30:00,000000000 +02:00
    </code>
    Edited by: user9173572 on Jul 27, 2010 1:28 AM

    SET_SCHEDULER_ATTRIBUTE is a procedure of the DBMS_SCHEDULER package.
    See also: http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_sched.htm#CIHDAIIH
    It depends a little bit how your job is set up. But you might change the next running date with a statement like this one.
    untested
    begin
       DBMS_SCHEDULER.SET_ATTRIBUTE (
       'REFRESH_MN_ADDRESSES_J',
       'start_date',  /* works only if the job has no schedule */
       '07/15/2010 10:30:00'
    end;
    commit;

  • Can the instance name of prod. database and standby database may be same

    Hi all,
    Actually I knew that while configuring Physical Standby
    1> Database name should be same
    2> Instance name should be different
    But,today I saw a DR system where the database name and instance names are the same. So I came to know that it can be done.
    I just wanted to know that what are the trade-offs of putting DB name and instance name same?

    There isn't a tradeoff. By default, the instance_name is the same as the db_name unless if specified differently in teh pfile. What matters is the service name connecting to the instance.

  • Recovering production database after a loss to Prod database server and SAN

    So I was asked this morning... can we recover our database if we lose both the database server and the SAN.
    A bit of information:
    Database: 10gR2
    Using ASM
    Backing up to ASM
    SAN is onsite
    My initial response was of course we backup at least twice a day, and then once a week move those backups to an offsite location.
    Then I started thinking about it some more. If we lose the SAN we have offsite backups of the entire SAN once a week so we could recover the SAN. If we were to lose the server we would lose the diskgroups where the backups are being stored.
    So my question is… and don’t laugh for me never thinking about it before please lol, but do I need to backup the ASM instance in order to be able to restore ASM to be able to get to my backups which are stored inside ASM diskgroups? If so do I need to do this old school by shutting it down and backing it up since there isn’t any archiving going on? If not does anyone recommend a certain way of going about this type of thing?
    Thanks in advance
    Luke

    Hi Luke,
    I think the answers to your questions are fluid, and can be stated as "it depends". If your SAN backup was created as a "snap", for example, a BCV on EMC systems, then likely you can get all your database in your ASM diskgroups. As long as all the disks in the diskgroups were snapped at the same time. Really, though, your best bet is always an RMAN backup which can be done even if your database is not in archive log mode. You can use rman to stop the database, restart it to mount mode and then back up the entire database, though I would suggest that if this is a production system that you do run in archive log mode.
    Cheers!
    Jay
    http://www.grumpy-dba.com

  • Cloning of production Database to Development

    We are planning to clone the development box same as the production box.
    After the cloning, do we have to change any setting or values or take care of any data dependencies?
    We are using Oracle Warehouse Builder (OWB).
    Cedric
    Edited by: user10950010 on Mar 30, 2009 1:35 PM

    metalink note id 434272.1 details what you have to do to update the service and metadata after cloning a 10.2 or 11g OWB installation, you can hack the node configuration directly but its better to use the supported scripts, I have had to drop and recreate locations occasionally
    Chris

Maybe you are looking for

  • E75 - Mail stop syncing

    Hi, I have a serious problem with my E75. After updating to the new email 3.09 application, my sync to my imap account is stopped. I don't use the Nokia Messaging Service and I connect via IMAP directly to my email server. The polling time of my acco

  • Hi ppl help me out in removing bug

    package helloclient; import java.util.Properties; import javax.naming.Context; import javax.naming.InitialContext; import javax.rmi.PortableRemoteObject; import Hello.*; import org.omg.CORBA_2_3.ORB; import org.omg.CosNaming.NamingContextExt; import

  • What are the steps to change the text of a flash file

    the flash file I am using is from monster templates, and I am trying to change words that is already in the flash movie. I don't know how to locate the text that is already on it and change the words

  • Artist Sorting Issues

    Hey, I recently downloaded IOS 7 for my Ipod Touch. My problem is that songs not made by an artist show up under them. For example, I click "Artists" then scroll down to "Our Lady Peace." The songs are all separated by album, great. However, the song

  • New to Report Server

    I am working with Portals 3.0.9 (where report server resides). My question is .... Can I run a report from report server on my web browser? I have followed the configuration. I have set up Report server in my TNSNames.ora file. Or do I have to use Po