Steps to clone database in other server with restore daily

Hi,
I think i know what is the steps but need a guru that give me the ok.
I have been asked to perform a clone database (11.2.0.3 with ASM) in another server. The original database (call PROD) has full backup everyday that it automatically (with crontab and a script i guess) restore the second database. The problem i see its that the original database is a RAC (2 nodes) but the second database is standalone (call TEST)
I think the steps are:
1) create a standalone database in second server with same number of diskgroups and same directories
2) copy full backup to TEST server.
3) duplicate with rman:
connect auxiliary sys/password@TEST
connect target /
startup auxiliary nomount;
run {
allocate auxiliary channel ch1 type disk;
duplicate target database to 'TEST' nofilenamecheck;
release channel ch1;
4) copy PFILE from PROD and modify (like standalone database) at TEST
5) startup nomount; --test database
6) restore controlfile from '< backup piece name of controlfile auto backup copied in step 2>'; --at test database
7) alter database mount; --test database
8) recover, restore from full backup and open database-->
run {
allocate channel d1 device type disk format ' <path of the copied backup in step 2 >';
set until sequence < sequence> thread < thread# >;
restore database;
recover database;
SQL> alter database open resetlogs;
9) like its a backup that has 2 undo tablespaces, should i drop 1?:
SQL> drop tablespace UNDOTBS2 including contents and datafiles;
All this steps at first time, are they right?, to do it automatically in the script i should use 2) 5) 6) 7) 8)?
-- like the databases names are different, should i have any problem when restore de controlfile? if yes, how to avoid it?
Thanks in advance and sorry for the inconveniences
Edited by: Me_101 on 30-jul-2012 5:46

Me_101 wrote:
Hi,
I think i know what is the steps but need a guru that give me the ok.
I have been asked to perform a clone database (11.2.0.3 with ASM) in another server. The original database (call PROD) has full backup everyday that it automatically (with crontab and a script i guess)Why guess? Can't you look at the crontab schedule and see for yourself?
restore the second database. The problem i see its that the original database is a RAC (2 nodes) but the second database is standalone (call TEST)
That should not be an issue. Even with RAC there is still only a single database to duplicate.
I think the steps are:
1) create a standalone database in second server with same number of diskgroups and same directories
2) copy full backup to TEST server.
3) duplicate with rman:
connect auxiliary sys/password@TEST
connect target /
startup auxiliary nomount;
run {
allocate auxiliary channel ch1 type disk;
duplicate target database to 'TEST' nofilenamecheck;
release channel ch1;
4) copy PFILE from PROD and modify (like standalone database) at TEST
5) startup nomount; --test database
6) restore controlfile from '< backup piece name of controlfile auto backup copied in step 2>'; --at test database
7) alter database mount; --test database
8) recover, restore from full backup and open database-->
run {
allocate channel d1 device type disk format ' <path of the copied backup in step 2 >';
set until sequence < sequence> thread < thread# >;
restore database;
recover database;
SQL> alter database open resetlogs;
9) like its a backup that has 2 undo tablespaces, should i drop 1?:
SQL> drop tablespace UNDOTBS2 including contents and datafiles;
All this steps at first time, are they right?, to do it automatically in the script i should use 2) 5) 6) 7) 8)?
-- like the databases names are different, should i have any problem when restore de controlfile? if yes, how to avoid it?
Thanks in advance and sorry for the inconveniences
Edited by: Me_101 on 30-jul-2012 5:46Take a look at the DUPLICATE DATABASE command in rman. Key is to connect to the production db as target, duplicate databse as auxiliary
connect catalog rman/cat@rmcat
connect target sys/pswd@proddb
connect auxiliary /
run {                        
duplicate target database to NEWDBSID;
}                                        where NEWDBSID is the name of the new database
Put together what you think is the correct procedure and give it a shot. If you have specific problems, bring them to the forum.

Similar Messages

  • Move large database to other server using RMAN in less downtime

    Hi,
    We have large database around 20TB. We want to migrate (move) the database from one server to other server. We do not want to use standby option.
    1)     How can we move database using RMAN in less downtime
    2)     Other than RMAN is there any option is available to move the database to new server
    For option 1 (restore using RMAN),
    Whether below options are valid?
    If this option is valid, how to implement this?
    1)     How can we move database using RMAN in less downtime
    a)     Take the full backup from source (source db is up)
    b)     Restore the full backup in target (source db is up)
    c)     Take the incremental backup from source (source db is up)
    d)     Restore incremental backup in target (source db is up)
    e)     Do steps c and d, before taking downtime (source db is up)
    f)     Shutdown and mount the source db, and take the incremental backup (source db is down)
    g)     Restore last incremental backup and start the target database (target is up and application is accessing this new db
    database version: 10.2.0.4
    OS: SUN solaris 10
    Edited by: Rajak on Jan 18, 2012 4:56 AM

    Simple:
    I do this all the time to relocate file system files... But the principle is the same. You can do this in iterations so you do not need to do it all at once:
    Starting 8AM move less-used files and more active files in the afternoon using the following backup method.
    SCRIPT-1
    RMAN> BACKUP AS COPY
    DATAFILE 4 ####"/some/orcl/datafile/usersdbf"
    FORMAT "+USERDATA";
    Do as many files as you think you can handle during your downtime window.
    During your downtime window: stop all applications so there is no contention in the database
    SCRIPT-2
    ALTER DATABASE DATAFILE 4 offline;
    SWITCH DATAFILE 4 TO COPY;
    RECOVER DATAFILE 4;
    ALTER DATABASE DATAFILE 4 online;
    I then execute the delete of the original file at somepoint later - after we make sure everything has recovered and successfully brought back online.
    SCRIPT-3
    DELETE DATAFILECOPY "/some/orcl/datafile/usersdbf"
    For datafiles/tablespaces that are really busy, I typically copy them later in the afternoon as there are fewer archivelogs that it has to go through in order to make them consistent. The ones in the morning have more to go through, but less likelihood of there being anything to do.
    Using this method, we have moved upwards 600G at a time and the actual downtime to do the switchover is < 2hrs. YMMV. As I said, this can be done is stages to minimize overall downtime.
    If you need some documentation support see:
    http://docs.oracle.com/cd/E11882_01/server.112/e18951/asm_rman.htm#CHDBDJJG
    And before you do ANYTHING... TEST TEST TEST TEST TEST. Create a dummy tablespace on QFS and use this procedure to move it to ASM to ensure you understand how it works.
    Good luck! (hint: scripts to generate these scripts can be your friend.)

  • Attempting to restore database to same server with different name.

    I have just restored my production database to an earlier backup to recover from a major application error.
    I now need to reatore a second copy of the database to recover some data which was lost as a result of the restore. The only place I can do this is on the same server.
    I can't use duplicate database because the time I want is before the resetlogs time of the current version.
    I don't think I can use recover using backup controlfile because restoring the control file will have the old database name. Can I restore the control file, rename the database and still use the rman backups of the original database?
    If so how?
    Can use set incarnation to get round the resetlogs issue without affecting the current database?
    10gR2
    Windows 2008 64-bit
    Edited by: Jim Smith on Oct 27, 2011 8:54 PM

    Hi
    Database name can be the same ORACLE_SID must be unique on the machine and in specific ORACLE_HOME.
    So effectively you can have 2 databases with the same name but instance names must be unique.
    Paul

  • Restoring the backup on other server with different patch level

    Hi Gurus,
    I have one HP-UX B11.31 server which holds ORACLE software with 10.2.0.4 patch level, and I have restored one database with the same patch level from HP DataProtector successfully. Now, I want to restore two node RAC database backup with Oracle Patch level of 10.2.0.2 into the Restore server which is of 10.2.0.4 patch level, the RAC database uses ASM, here are the steps which I am going to follow;
    1. Create a new database with the same schema as like the RAC database in ASM.
    2. Restore & Recover the RAC database backup from Data Protector.
    But, I have one question, can I restore & recover the backup which is in lower grade Oracle software patch level i.e; 10.2.0.2 on a higher grade Oracle software patch level ie; 10.2.0.4 ???
    ?:|
    Even after restoring & recovering can the database will work? PLEASE guide.
    Thanks in Advance.

    Thanks again!!!
    The point of upgrading the database comes when there is already a database and one is upgrading the ORACLE software version and then upgrading the database to its version using the scripts you suggest.
    Here is the scenario where I have to restore and recover a 10.2.0.2 RAC database backup on 10.2.0.4 sotware version,
    *my question is that, whether there will be any conflict of patch version as the Oracle Brain will be of the latest version? Oracle software will successfully restore and recover the database backup with a lower patch version? or it will throw any error when restoring the backup like compatibility unmatched between the software and the backup you are trying to restore & recover?*
    yes the RAC database is in ASM.
    Thanks & Regards

  • HT4974 Changing service data storage to other server with RAID

    We have an mac mini server 10.7.5 and an xserve with 10.5.8. with RAID. We want to change the service data storage location from the Lion server to the RAID of the xserve (Leopard). But this share is not available in the list. Any suggestions?

    Very late but these might help...I hope you've moved on from the xserve by now though: Mac Pro is a beast!
    https://discussions.apple.com/thread/4704949?tstart=0
    https://discussions.apple.com/thread/4244237?tstart=0
    https://discussions.apple.com/message/21134374#21134374#21134374
    https://discussions.apple.com/thread/4991270

  • Error connecting a visual application of 2008 to a database in sql server with mk3100 device with Windows Embedded Compact 7

    en System.Data.SqlClient.SqlConnection.OnError(SqlException exception, TdsParserState state) en System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, TdsParserState state) en System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
    en System.Data.SqlClient.TdsParser.Connect(String host, SqlInternalConnection connHandler, Int32 timeout) en System.Data.SqlClient.SqlInternalConnection.OpenAndLogin() en System.Data.SqlClient.SqlInternalConnection..ctor(SqlConnection connection, Hashtable
    connectionOptions) en System.Data.SqlClient.SqlConnection.Open() en mk300.Form1.Form1_Load(Object sender, EventArgs e) en System.Windows.Forms.Form.OnLoad(EventArgs e) en System.Windows.Forms.Form._SetVisibleNotify(Boolean fVis) en System.Windows.Forms.Control.set_Visible(Boolean
    value) en System.Windows.Forms.Application.Run(Form fm) en mk300.Form1.Main()
    this is the error.
    the application in the emulator works.
    tanks.....

    Hi Santiago,
    Thanks for your post.
    This forum is to discuss problems of Windows Mobile Development . Your question is not related to the topic of this forum.So I suggest that you can post your issue to
    here for professional response.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Must Move 10g Database To Another Server

    Good morning,
    Well, right in the middle of my implementation, I've learned that we must change to a different physical server for the 10 g database. Wonderful.
    I have installed several patches. Will a consistent backup of the db capture those patches? After I restore to the new server, will I have to reinstall all patches?
    Don't most patchsets modify the Oracle instance as well as the database?
    Thanks, John

    Have you tried the clone features? On DBCA, there is a clone database option. If you use Enterprise Grid Control, they have a clone database from one server to another and you can choose different instance name and different file structure. This has the additional benefits of no need to bring down the current database. Also you can try the clone.pl to clone the oracle_Home. I have not tried one with patches but I guess it will include every thing under ORACLE_HOME. It will handle most but I still have trouble with the data control setup but then I recreate everything from scratch

  • How to get the entire database from remote server to my server

    Hi,
    I am running a web application with sample data. Now i need to access the original data through this application. But the original data is located in the other server which is located in Mumbai.
    Now i need the copy of that database to my system(Chennai). with minimum effort.
    It is very urgent...
    Thanks in advance...
    Chaitanya.

    Hi
    Nicolas is right. You can also take advantage of exp/imp utility. That would not only get the entire db in one file but also the size will be a fraction of the entire db size.You can search for DataPump (that uses expdp and impdp) utility to expedite the export/import process.
    For simple exp/imp you can do the following.
    From Remote site(MUMBAI) issue
    ORACLE_HOME\BIN\exp file=c:\fulldbexp09sept05.dmp log=c:\fulldbexp09sept05log.log FULL=Y userid=system/pwd@connectstringOfyourdb
    Get a copy of fulldbexp09sept05.dmp and place it on your local drive in Chennai
    On Local Site (Chennai)
    ORACLE_HOME\BIN\imp file=fulldbexp09sept05.dmp log=fulldbimp09sept05 FULL=Y userid=system/pwd@connectstringOfyourlocaldb
    By this you can take advantage of having a different db name on remote and local sites. This is a fairly easy exercise. You just need to be sure that in your TNSNAMES.ORA you have correctly defined the connectString for your db.
    PS: Create a database on local server with default settings.
    Make use of following to create appropriate tablespaces and users if you desire ie.
    1. On Remote Site open SQLPLUS session and issue this command to find out the tablespaces, datafiles and their sizes
    SQL>SELECT SUBSTR(file_name,1,60) FILE_NAME, tablespace_name, bytes
    FROM dba_data_files
    GROUP BY tablespace_name, file_name;
    Now create the tablespaces on local sites using the result of the above query.
    2. On Remote Site open SQLPLUS session and issue this command to spool user creation script.
    SQL>spool c:\createuserscript.lst
    SQL> SELECT 'CREATE USER ||' IDENTIFIED BY VALUES '||'"'||PASSWORD||'"'||' DEFAULT TABLESPACE '||DEFAULT_TABLESPACE||' TEMPORARY TABLESPACE '||TEMPORARY_TABLESPACE||';'
    FROM dba_users
    WHERE username NOT IN ('SYS','SYSTEM')
    ORDER BY username;
    SQL>spool off
    Now edit this createuserscript using any editor and replace " with '. Copy this file to the local server and run it using @. This will create appropriate users.
    Let me know if you have any problems.
    Regards
    Adnan Mashhadi
    Nicolas I am not sure as how to eliminate the " in my script. Any comment will be appreciated.

  • How to use the same OC4j server with different port number

    How to use the same OC4j server with different port numbers..?
    I have to OC4J installed on my machine on different hard disk drives....
    I want to be able to run both the server simultaneously..?
    is it possible ..it yes then how..?
    for that i have changed the port number of one server...
    but when i am trying to start the other server with different port number..it says that JVM -Bind already...
    Is there any clues...?
    Nilesh G

    In the config directory:
    default-web-site.xml: Change the port the HTTP listener listens on
    jms.xml: Change the port the JMS service listens on
    rmi.xml: Change the port the ORMI listener listens on.
    Or, you can add another web-site.xml file, and deploy your applications to 1 server, and bind the web applications to the different web sites. This way you only have to deploy your applications to 1 place.
    Rob
    Oracle

  • Unable to connect to essbase server with Smart View

    Hi,
    I'm having trobules connecting Smart View in order to make some adhoc analysis, however I could perfectly establish connection with Planning and navigate through web forms in excel.
    The address I'm using to connect to Essbase is: http://<server>:19000/aps/SmartView and the planning url is http://<server>:19000/HyperionPlanning/SmartView
    I've been already using those urls in other server with version 11.1.2 but now that I'm trying to connect to a server with v11.1.1.3 I just can't. Whenever I connect to Planning in order to see the forms a prompt appears with the message saying that "I'm connecting to a server with an older version" but I could perfectly work with the forms. When I connect to essbase, I can see the Applications but I just can't make any adhoc analysis.
    Could anyone have any idea of what could be happening?
    Thanks in advance
    Edited by: user9143843 on Jan 13, 2011 4:58 AM

    Thanks for your response, I've already checked that port and keep getting the same message "Common Provider null datasource error". I can see the applications but can't get any further than that, no analysis adhoc, no smart slice, only disconnect :(

  • Integrating java application running on OC4J server with EP Iview

    Hi,
         I Want to Integrate Java Application running on OC4J server with my Enterprise portal
    Can any one please help me out in this??
    Regards
    Padma N

    Hi Padma
    Its possible to integrate a java application running in the other server with enterprise portal.In portal i think there is a IView template call Java application template.Using this generally we can do this.But in you case what type of a java application is it?Just a class or webapplication or a server side application.This you can also acheive using a webdynpro applications as these are very flexible with integration into EP.In webdynpro you can use suspend and resume plugs to navigate from one application to other application.I have given my ideas how to implement.But integration mainly depends upon your landscape and version compatibilities and type of the application you need to integrate.
    Hope this answer helps you in implementation.
    Regards
    Kalyan

  • Clone database with backup sets from another server

    Hi, I want to clone a database in Host A with a backup set stored in Host B.
    My script in Host A (where i want the cloned DB to be created) is as follows:
    ORACLE_SID=test8; export ORACLE_SID
    rman target sys/XXX@OriginalDB_in_HostB catalog prodifs/prodifs@CatalogDB_in_HostB
    connect auxiliary / ;
    configure channel device type disk clear;
    configure default device type to disk;
    configure device type disk parallelism 3;
    run{
    set until scn 317776086;
    set newname for datafile 1 to '/o2/oradata/test8/system01.dbf';
    set newname for datafile 2 to '/o2/oradata/test8/undotbs01.dbf';
    duplicate target database to test8
    logfile
    group 1 ('/o1/oradata/test8/redo0101.rdo','/o2/oradata/test8/redo0102.rdo') size 104858112,
    group 2....;
    How do I specify in this script that backup files to be restored are not saved in current Host (A) but in Host B? Is it something that i should edit in the "configure channel" sentence ?
    A workaround for this is to copy all backup files from HostB to the same location in HostA but I would prefer to do it in a more elegant way. Thanks and regards,
    Leandro

    Hi,
    You have to set DB_FILE_NAME_CONVERT or LOG_FILE_NAME_CONVERT parameters.
    Duplicating a Database on a Remote Host with the Same Directory Structure
    http://download-uk.oracle.com/docs/cd/B14117_01/server.101/b10734/rcmdupdb.htm#1006630
    go through below link
    http://dbataj.blogspot.com/2006/12/duplicating-database-with-recovery.html
    hope this helps
    regards
    Taj

  • Create a new Database in an other server using a copie of RMAN backup

    Hi all,
    I want to create an other instance for our production database. We have disk and tape in rman backup. My question is can i create a new database using our disk backup in an other server?
    If some procedure or steps is there, email it to my adresse [email protected]
    Hamid.
    Thanks

    By means of the use of Recovery Manager it is possible to duplicate a database out from a previously taken rman backup. The method will be outlined in the next few lines.
    Let's assume a source database named SRCDB and the target database, named GEMINI. A unix like environment is assumed, but it can be implemented on windows as well, just beware of the particular Oracle implementation on a windows platform (orapwd file name, service creation, path format)
    1. Create a password file for the Cloned (GEMINI) instance:
    orapwd file=/u01/app/oracle/product/9.2.0.1.0/dbs/orapwGEMINI password=password entries=10
    2. Configure tnsnames.ora and listner.ora
    Properly identify the database at the tnsnames.ora and have the instance manually registered against the listener.ora files, both files located at the $ORACLE_HOME/network/admin directory.
    2.a Manually register the database against the listener (listener.ora)
    (SID_DESC =
    (ORACLE_HOME = /u01/app/oracle/product/9.2.0.1.0)
    (SID_NAME = GEMINI)
    2.b Added the target GEMINI to the tnsnames.ora
    GEMINI =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = myhost.mydomain.com)(PORT = 1521))
    (CONNECT_DATA =
    (ORACLE_SID = GEMINI)
    2.c Reload the listener
    lsnrctl reload
    3. Create a new init.ora for the cloned database.
    Next create an init.ora file for the cloned database. In case the same paths cannot be used on the target host, either because it is the same source host or because those paths are not reproducible on the target, then DB_FILE_NAME_CONVERT and LOG_FILE_NAME_CONVERT may be required to be defined
    DB_NAME=GEMINI
    CONTROL_FILES=(/u02/oradata/GEMINI/control01.ctl,
    /u02/oradata/GEMINI/control02.ctl,
    /u02/oradata/GEMINI/control03.ctl)
    # Convert file names to allow for different directory structure.
    DB_FILE_NAME_CONVERT=(/u02/oradata/SRCDB/,/u02/oradata/GEMINI/)
    LOG_FILE_NAME_CONVERT=(/u01/oradata/SRCDB/,/u01/oradata/GEMINI/)
    # block_size and compatible parameters must match those of the source database
    DB_BLOCK_SIZE=8192
    COMPATIBLE=9.2.0.0.0
    4. Connect to the cloned instance
    ORACLE_SID=GEMINI; export ORACLE_SID
    sqlplus /nolog
    conn / as sysdba
    5. Create an SPFILE based on the init.ora
    CREATE SPFILE FROM PFILE='/u01/app/oracle/admin/GEMINI/pfile/init.ora';
    6. Start the database in NOMOUNT mode:
    STARTUP FORCE NOMOUNT;
    7. Connect to the TARGET, CATALOG and AUXILIARY databases.
    By means of the rman three connections are open, one for the Source Database (SOURCEDB), another for the Catalog database (RCAT), and one more for the cloned database (GEMINI)
    ORACLE_SID=GEMINI; export ORACLE_SID
    rman TARGET sys/password@SRCDB CATALOG rman/rman@RCAT AUXILIARY /
    8. Complete or Incomplete clone (recover)
    From the rman the database using one of the following commands:
    8.a Clone the database by means of a complete recover.
    DUPLICATE TARGET DATABASE TO GEMINI;
    8.b Clone the database up to a defined point in time in the past by means of an incomplete recover
    DUPLICATE TARGET DATABASE TO GEMINI UNTIL TIME 'SYSDATE-2';
    9. Process finished.
    Once the process is finished, the newly created GEMINI database is ready to be used as an independent new cloned database.
    Ref. RMAN Clone a Database
    ~ Madrid

  • Is it possible to create a Clone database with the same name of source db ?

    Is it possible to create a Clone database with the same name of source db using RMAN ...
    DB version is 11.2.0.2
    Is it possible to clone a 11.2.0.2 database to 11.2.0.3 home location directly on a new server . If it starts in a upgrade mode , it is ok ....

    user11919409 wrote:
    Is it possible to create a Clone database with the same name of source db using RMAN ...
    yes
    >
    DB version is 11.2.0.2
    Is it possible to clone a 11.2.0.2 database to 11.2.0.3 home location directly on a new server . If it starts in a upgrade mode , it is ok ....yes
    Handle:     user11919409
    Status Level:     Newbie (10)
    Registered:     Dec 7, 2009
    Total Posts:     102
    Total Questions:     28 (22 unresolved)
    why do you waste time here when you rarely get any answers to your questions?

  • How to migrate an existing Microsoft SSIS deployment if it is decided to replace SQL Server with an Oracle database?

    Hi Oracle Gurus!
    Currently, I am designing an ETL solution that transforms and loads a lot of data from flat files and sends it to an SQL Server 2008 R2 database for storage. However, at a future point of time, it may be decided to add or even replace SQL Server with an Oracle 11g database.
    Currently, I am writing script transforms in C# to dynamically generate SSIS packages to tansform and load the data into SQL Server. But considering that in future, an Oracle 11g or 12c database might be added to, or replace the SQL Server database, how do I make my script transforms (or whatever else I am developing currently for SQL Server) reusable to the extent possible?
    Or more precisely, what steps do I take, from an Oracle point of view, to ensure that any future migration of data to an Oracle database would be smooth to the extent possible?
    Looking up to my Oracle Gurus for enlightenment in this matter!
    Novice Kid

    When you're writing your on C# code to load data into the SQL Server you have to modify the routines so that they will work with Oracle.
    One approach is to use the extproc agent which would allow you to directly call external programs with all the logic in it to perform the load of your files and to put the data into the Oracle database. Another option would be to use utl_file package (or equivalents) which will allow you to open external files from your Oracle database and to directly read its content and then to pass it to the related tables.

Maybe you are looking for