Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to find correct SCN for RMAN duplicate

user9536198Nov 18 2020

Setup:
=> location of RMAN backup files known
=> RMAN files should include archivelogs, datafiles, spfile and controlfile
=> Duplicate without target (duplicate database to testdb1....)
=> these are monthly backups with files located in date specific folders (ie., ../monthly/2020_10_01)
=> assume i don't have an RMAN output log of the backup taken to find the datetime to use

Scenario:
=> How do I determine the best SCN (or datetime) to use so for the RMAN duplicate using the RMAN backup files known
=> I'm assuming (and tried) I would need to restore a controlfile from the RMAN files. They are tagged with CTRL_xxx, but is there another way to make sure i'm using the right controfile to restore. Perhaps looking at the last set of files and just running "restoring controlfile from ..." and see what happens
=> After restoring controlfile, what's the best way to determine which SCN to use.

  • As an example, i reviewed a successful RMAN duplicate from backup location with no SCN or datetime and noticed it choose to restore a controlfile from a non CTRL_xxx filename (not sure what happened in our backup script there) and then noticed the SCN the RMAN dup used. I tried running some queries to determine why it choose that SCN based on some other things people have put out there on the interweb to get this number, to no avail.
  • when I just did a database preview from the restored controlfile, the results came back with daily and monthly files, which are a big problem because the daily files roll off after 30 days.

I can provide more details as questions come.
thanks all who reply.

Comments

Tubby

Johnny B wrote:

Hi all,

Have a materialized view defined as refresh fast on commit:

CREATE MATERIALIZED VIEW mat_vw_name REFRESH FAST ON COMMIT WITH ROWID AS

Importing data to the table that is part of the mat view using SQL Loader. The query is taking a long time to process.

Do I need to perform anything after the bulk import is done? Is the mat view running after the bulk import?

Is there a way to see if any process is running in the background?

Thanks in advance.

Johnny

using: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit

The materialized view based on the table you are loading will be updated as part of the transaction that is loading the base table. If you wanted to see what was going on you could query for the session doing the data load and watch what is being executed (v$ views, OEM, TOAD, etc will all allow you to view what the session is doing).

Cheers,

Johnny B
Answer

Very weird, it was not showing locked items. Now it is working fine as it was before I incorporate the loader.

Thanks for your help.

Marked as Answer by Johnny B · Sep 27 2020
1 - 2

Post Details

Added on Nov 18 2020
1 comment
1,132 views