Quaresma,If you have run an RMAN DUPLICATE DATABASE command you should see an "set until scn." in the "contents of Memory Script" that RMAN creates.That is how it does incomplete recovery and subsequently does an OPEN RESETLOGS.Hemant K Chitale.
[oracle@Nsm-linux01 admin]$ cd /data2/app/oracle/product/11.2.0/network/admin, (ORACLE_HOME = /data2/app/oracle/product/11.2.0), (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)), Here global_name is nothing but service name and sid_name is instance name, Now reload the listener and check the services, LSNRCTL for Linux: Version 11.2.0.1.0 Production on 01-APR-2015 12:46:41. They are just registered in the controlfile. dbi services est une entreprise spcialise dans le consulting et les services IT. Anonymous,The header contains more information than you think.See http://hemantoracledba.blogspot.com/2008/02/database-recovery-rollforward-from.htmlHemant K Chitale, Hi Hemant,Nice explinationI've cloned a database using create control file command,then i received two errors1) copatibility issue the version 10.2.0.1.0 is not compatible with 10.0.0.0----so in this case if we want to clone database with differrent compatible parameters, then is it possible to do so?2)your database name is 'old one' it is not 'new one'----to solve it i tried to change all the related parameters in theinit.ora file but could not resolve it, guide me, I wouldn't set COMPATIBLE to 10.0.0.0. 10.2.0.1 or 10.2.0.4)Changing the init.ora file doesn't change the database name. Some blogs mention to backup the controlfile and/or switch the logfile, but this is not required. TGT for the new, the target DB-name. We are headquartered in India with offices spread across North America, Middle-east and SEA. Quaresma,If you don't specify a SET UNTIL you have to ensure that the DUPLICATE has all the ArchiveLogs required to recover upto the SCN of the target controlfile.I cannot allow further conversation on this topic as it is not relevant to this blog post.Hemant K Chitale, Hi I have to rename database while restoring db from backup and I have to apply few archivelogs. To subscribe to this RSS feed, copy and paste this URL into your RSS reader. due to changed company rules, you need to rename all your DBs Now we have executed again, this time we get different error, check below. on OS-level, we replace all SRC by TGT entries (not only the DB-name) and kick out all the heading lines: Since 12.2. the password must contain at least 8 characters and at least 1 special character. I have Oracle database and I know SYS password and service name. And it tells us that all the archives and backups are obsolete. So you could use either log_archive_dest_1='' or set it to USE_DB_RECOVERY_FILE_DEST after having added db_recovery_file_dest and db_recovery_file_dest_size to your instance parameter file.So, two databases can have two different archive locations.You can run two databases side-by-side, provided you have enough CPU and Memory resources, besides disk space. Hi1-)Even there is no active user in the database, there is always activity by oracle processesand scn increments every commit.What kind of action oracle perfoms in the background so this current_scn increments every second?2-)Even Im the only active session in the database.When I check the user datafile, I see that it is being used by some other process.And it is always being used.How can this happen?fuser /oracle/u01/oradata/orcl/users01.dbf/oracle/u01/oradata/orcl/users01.dbf: 1388o 1382o 1380o 1378o 1376o, SCN isn't only incremented on commit. or controlfile is older than redo, etc..so that I dont need open resetlogs.I can compare controlfile and datafile with v$datafile and v$datafile_header.How about redo? Making statements based on opinion; back them up with references or personal experience. Hi Hemant,Nice one.One question what was the need to do this?Cant you use duplicate database to do all these (you loose your redologs anyway).
(and not rman)I take a cold backup on Monday.My database is crushed on Friday.Once I restore Mondays backup I should issue"recover database using backup controlfile" clause to rollfoward until Friday.or "recover database" would be enough? Because a RECOVER, by default (i.e. All rights reserved.
Additionally there is one more MOS note for known issues while duplicating RMAN. We did a snapshot clone with our fancy new PureStorage. You use the current controlfile, if you have it, so as to be able to do a COMPLETE Recovery. It is not "need current controlfile" it is "use current controlfile". SQL> select name, open_mode, log_mode from v$database; PROD READ WRITE ARCHIVELOG. So, we need links to the files for both old-SID and new-SID and set the variable: *** (if you do not want to copy a bulk load of *aud files, please modify the scp-command). [oracle@Nsm-linux01 admin]$ mkdir -p /data2/prod, [oracle@Nsm-linux01 admin]$ mkdir -p /backup/archive. SQLNET.AUTHENTICATION_SERVICES = (NTS,NONE), #NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT). How can I confirm a database is Oracle & what version it is using SQL? rev2022.7.21.42639. And also see (from the ORACLE-BASE Blog): Duplicate a Database Using RMAN in Oracle Database 11g Release 2.
All rights reserved. That information can be inferred by Oracle based on a backup controlfile or a created controlfile plus the first archivelog you apply and the log_archive_dest and log_archive_format OR your db_recovery_file_dest (ie your FRA)Hemant. This email has been checked for viruses by Avast antivirus software.
To learn more, see our tips on writing great answers. Ltd. Good Contents Are Everywhere, But Here, We Deliver The Best of The Best.Please Hold on! Is that right?According to oracle manuals, duplicate command will also open the database with resetlogs option implicitly. If your DUPLICATE does not specify an UNTIL, it keeps reading the current SEQ#s from the target database controlfile -- so it keeps expecting archivelogs.Hemant K Chitale. First, I want to mention that all I found in the Internet was incomplete even the Oracle Database Utilities and MOS Doc Id 2258871.1. If your shutdown wasn't NORMAL or IMMEDIATE, the datafiles would not be consistent with the redo logs and controlfiles.In your case, all three sets of files are consistent. John,A RECOVER DATABASE would be enough.Hemant. Hemant;1-)Assume;I take a cold backup on Monday.My database is crushed on Friday.Once I restore Mondays backup I should issue"recover database using backup comtrolfile"clause to rollfoward until Friday.This is the only way.Am I right?2-)Is above scenerio same for hot backup? Thanks sir.When I issue "recover database using backup controlfile" , the information in controlfile is not deleted, am I right?I notice that v$archived_log has same records. Incorrectly using AUTOTRACE and EXPLAIN PLAN. Starting recover at 05-FEB-11using channel ORA_AUX_DISK_1 starting media recovery RMAN-00571: ===========================================================RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============RMAN-00571: ===========================================================RMAN-03002: failure of Duplicate Db command at 02/05/2011 22:46:38RMAN-03015: error occurred in stored script Memory ScriptRMAN-06053: unable to perform media recovery because of missing logRMAN-06025: no backup of log thread 1 seq 3024 lowscn 5366311185 found to restoreRMAN-06025: no backup of log thread 1 seq 3023 lowscn 5366310982 found to restoreRMAN-06025: no backup of log thread 1 seq 3022 lowscn 5366310786 found to restoreRMAN-06025: no backup of log thread 1 seq 3021 lowscn 5366310462 found to restoreRMAN-06025: no backup of log thread 1 seq 3020 lowscn 5366310260 found to restoreRMAN-06025: no backup of log thread 1 seq 3019 lowscn 5366310044 found to restoreRMAN-06025: no backup of log thread 1 seq 3018 lowscn 5366309846 found to restoreRMAN-06025: no backup of log thread 1 seq 3017 lowscn 5366309646 found to restoreRMAN-06025: no backup of log thread 1 seq 3016 lowscn 5366309451 found to restoreRMAN-06025: no backup of log thread 1 seq 3015 lowscn 5366309117 found to restoreRMAN-06025: no backup of log thread 1 seq 3014 lowscn 5366308914 found to restoreRMAN-06025: no backup of log thread 1 seq 3013 lowscn 5366308702 found to restoreRMAN-06025: no backup of log thread 1 seq 3012 lowscn 5366308505 found to restoreRMAN-06025: no backup of log thread 1 seq 3011 lowscn 5366308151 found to restore, Quaresma,Your comment DOES NOT relate to this blog post. RMAN-00571: ===========================================================, RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============, RMAN-03002: failure of Duplicate Db command at 03/31/2015 16:01:01, RMAN-03015: error occurred in stored script Memory Script, RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/31/2015 16:01:01, ORA-17629: Cannot connect to the remote database server, ORA-17627: ORA-12154: TNS:could not resolve the connect identifier specified, Then we have searched for solutions, we get one MOS note, This note gives some idea like causes and solutions from that we have checked in our databases on destination server there are wrong parameters, in sqlnet.ora then we have corrected the sqlnet.ora file as follows, [oracle@Nsm-linux01 admin]$ cat sqlnet.ora, # sqlnet.ora Network Configuration File: /data2/app/oracle/product/11.2.0/network/admin/sqlnet.ora. SQL> create pfile=/backup/rman_backup/initprod.ora from spfile; [oracle@Snsm-linux02 dbs]$orapwd file=orapwprod password=oracle, Copy the password file and init file to destination $ORACLE_HOME/dbs directory using scp or ftp, scp orapwprod oracle@172.16.110.18:/data2/app/oracle/product/11.2.0/dbs/, scp /backup/rman_backup/initprod.ora oracle@172.16.110.18:/data2/app/oracle/product/11.2.0/dbs/. Creating a Duplicate Database on the Local Host, Duplicate a Database Using RMAN in Oracle Database 11g Release 2, How APIs can take the pain out of legacy system headaches (Ep. By clicking Post Your Answer, you agree to our terms of service, privacy policy and cookie policy. So simply startup and Is moderated livestock grazing an effective countermeasure for desertification? But that is not possible in earlier versions. When you cloned a DB, you probably started it with a new name and cloning (duplicating) with RMAN provided a new DBID, right? What are the "disks" seen on the walls of some NASA space shuttles? I want to clone database and want to deploy this copy on this database server, but I want have other service name for access to copy. Where developers & technologists share private knowledge with coworkers, Reach developers & technologists worldwide, Which Oracle version? How to clone Oracle database from one service name to other service name? How can I use parentheses when there are math parentheses inside? Note: From here on I will use SRC for the original, the source DB-name and I love sed. TK,The controlfile has *information* about Checkpoints and SCNs.It, itself, doesn't need to be compared.However, if say, the highest available SCN recorded by the controlfile (which you would see in v$DATAFILE and V$LOG) is lower than the SCN in datafile headers, Oracle would "know" that the controlfile is older than the datafiles -- that it is a "backup" controlfile. Most blogs tell you ALTER SYSTEM SET DB_NAME=T01B; and start your DB . The database sees no need to do a Recovery.A "USING BACKUP CONTROLFILE" tells Oracle that the controlfiles are not current -- therefore it has to assume that the database is not current and roll-forward needs to be made.Hemant. Generate a CREATE CONTROLFILE script (using ALTER DATABASE BACKUP CONTROLFILE TO TRACE), shutdown the database, rename datafiles at the OS level (using "move" or "mv" or "ren" commands), edit the CREATE CONTROLFILE script to specify the new locations and then run it so that the controlfile reads and sets the new path names of the datafiles.2. Tags: Database, Different host, duplicate, Duplicate Database, Oracle, Rman, rman backup, RMAN Duplicate, RMAN restore, Same DB name, same directory structure, Awesome post presented by you..your writing style is fabulous and keep update with your blogs AWS Online Training. Issue the command to duplicate the database. Maybe RMAN hasn't been implemented yet. In your environment you may have more volumes. If the Recovery is satisfied by the Online Redo Logs, it is Instance Recovery. After dig out the error we get to know that there is no directory structure is available on destination server to accommodate data files and control Files, we have created the directory structure and execute the duplicate command again, this time has successful. Finally, you should be able to start the cloned DB with its new namee. It is obtained at the start of a transaction and remains incremented even if the transaction is rolled-back.The background processes and any server process for a user session that last accessed the datafile would have a file pointer open -- even if not currently doing any reads/writes.Hemant. First, before a rename, the DB needs a clean shutdown. Asking for help, clarification, or responding to other answers. Hi Let say instance crashed and shutdown abort occurred.Instance recovery has to be done once I startup the database.When I startup the database, oracle has to determine the transactions in redologs which has not been written to disk and write them.How does oracle understand which transaction is already written or not?
SQL> select value from v$parameter where name=spfile; /data2/app/oracle/product/11.2.0/dbs/spfileprod.ora, NAME TYPE VALUE, spfile string /data2/app/oracle/product/11.2. Therefore, I write this article with the word completely at the end. Just to remember the commands we did a snapshot and copied the volumes to the target server: Then we mounted the volumes and were already able to and start the DB done I have already copied accross backupsets which includes archivelogs.RMAN> run{DUPLICATE TARGET DATABASE TO TESTLOGFILE1GROUP 1 ('F:\ORACLE\ORADATA\TEST\REDOLOGS\TEST_REDO1A.LOG','G:\ORACLE\ORADATA\TEST\REDOLOGS\TEST_REDO1B.ORA') SIZE 50m REUSE,GROUP 2 ('F:\ORACLE\ORADATA\TEST\REDOLOGS\TEST_REDO2A.LOG', 'G:\ORACLE\ORADATA\TEST\REDOLOGS\TEST_REDO2B.ORA') SIZE 50m REUSE,GROUP 3 ('F:\ORACLE\ORADATA\TEST\REDOLOGS\TEST_REDO3A.LOG', 'G:\ORACLE\ORADATA\TEST\REDOLOGS\TEST_REDO3B.ORA') SIZE 50m REUSENOFILENAMECHECK;}. Why did the gate before Minas Tirith break so very easily? Hi Hemant;I need current controlfile during recovery because it stores the information about archivelogs and therefore it knows where to go.Is that right? Oracle TNS: net service name is incorrecly specified. RMAN> DUPLICATE TARGET DATABASE TO prod FROM ACTIVE DATABASE NOFILENAMECHECK; using target database control file instead of recovery catalog, channel ORA_AUX_DISK_1: SID=63 device type=DISK. Copyright - Netsoftmate IT Solutions Pvt. By clicking Accept all cookies, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy. If one or more of the datafile headers is much older, media recovery requires ArchiveLogs.Hemant K Chitale. Check database whether it is running in archive log mode.
Connect and share knowledge within a single location that is structured and easy to search.