Forum Stats

  • 3,825,176 Users
  • 2,260,477 Discussions
  • 7,896,431 Comments

Discussions

Only my catalog i would like know my SCN ou sequence

rugbyRCT
rugbyRCT Member Posts: 25 Bronze Badge
edited Feb 12, 2020 3:17PM in Recovery Manager (RMAN)

hello Gurus,

      I have losed my database and i have only my catalog i would like know with Rman what is my last SCN that may retrieve.

or the last date ? I see only next :

1 -  rman catalog rman/[email protected]

2 - List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
332780  332869  OACNXXX 4087574822       PARENT  7885740707 28/05/2014 03:35:04
332780  332781  OACNXXX 4087574822       CURRENT 7885741546 28/05/2014 03:36:07
551262  551364  OACNXXX 4230980567       PARENT  7885741546 28/05/2014 03:36:07
551262  551263  OACNXXX 4230980567       CURRENT 5981904335925 13/11/2018 22:31:54
564848  564950  OACNXXX 4231659307       PARENT  7885741546 28/05/2014 03:36:07
564848  564849  OACNXXX 4231659307       CURRENT 5981977223981 21/11/2018 19:04:15
567905  567922  OACNXXX 4231800807       PARENT  1 23/11/2018 10:22:31
567905  567906  OACNXXX 4231800807       PARENT  342025 23/11/2018 11:22:22
567905  568087  OACNXXX 4231800807       CURRENT 343396     23/11/2018 15:06:49
568868  568970  OACNXXX 4231850259       PARENT  7885741546 28/05/2014 03:36:07
568868  568869  OACNXXX 4231850259       CURRENT 5981997402758 24/11/2018 00:06:46

3 - When i am connected with my catalog only i may not see all the details of my last backup

LIST BACKUP OF DATABASE archivelog all completed AFTER "TO_DATE('12/02/2020 00:00:00','DD/MM/YYHH24:MI:SS')";

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of list command at 02/12/2020 15:43:20

RMAN-06171: not connected to target database

thank you for yours helps

JP

Answers

  • EdStevens
    EdStevens Member Posts: 28,778 Gold Crown
    edited Feb 12, 2020 11:45AM
    rugbyRCT wrote:hello Gurus, I have losed my database and i have only my catalog i would like know with Rman what is my last SCN that may retrieve.or the last date ? I see only next :1 - rman catalog rman/[email protected] - List of Database Incarnations
    DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
    ------- ------- -------- ---------------- --- ---------- ----------
    332780 332869 OACNXXX 4087574822 PARENT 7885740707 28/05/2014 03:35:04
    332780 332781 OACNXXX 4087574822 CURRENT 7885741546 28/05/2014 03:36:07
    551262 551364 OACNXXX 4230980567 PARENT 7885741546 28/05/2014 03:36:07
    551262 551263 OACNXXX 4230980567 CURRENT 5981904335925 13/11/2018 22:31:54
    564848 564950 OACNXXX 4231659307 PARENT 7885741546 28/05/2014 03:36:07
    564848 564849 OACNXXX 4231659307 CURRENT 5981977223981 21/11/2018 19:04:15
    567905 567922 OACNXXX 4231800807 PARENT 1 23/11/2018 10:22:31
    567905 567906 OACNXXX 4231800807 PARENT 342025 23/11/2018 11:22:22
    567905 568087 OACNXXX 4231800807 CURRENT 343396 23/11/2018 15:06:49
    568868 568970 OACNXXX 4231850259 PARENT 7885741546 28/05/2014 03:36:07
    568868 568869 OACNXXX 4231850259 CURRENT 5981997402758 24/11/2018 00:06:463 - When i am connected with my catalog only i may not see all the details of my last backupLIST BACKUP OF DATABASE archivelog all completed AFTER "TO_DATE('12/02/2020 00:00:00','DD/MM/YYHH24:MI:SS')";RMAN-00571: ===========================================================RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============RMAN-00571: ===========================================================RMAN-03002: failure of list command at 02/12/2020 15:43:20RMAN-06171: not connected to target databasethank you for yours helpsJP

    Exactly how did you lose your database?

    Exactly what version is it?

    How have you been taking your backups?

    Having lost the database does not mean you cannot 'connect' to it.  As long as ORACLE_HOME is viable, rman - like sqlplus - can connect to an idle instance.  You'd have to connect to the target as an idle instance, and SET DBID=

    Looks like your latest is

    568868 568869 OACNXXX 4231850259 CURRENT 5981997402758 24/11/2018 00:06:46

    You can get a lot more information by connecting to the catalog db with sqlplus (or any other client, like SQL Developer) and querying the necessary catalog views.  See https://docs.oracle.com/database/121/RCMRF/rcviews.htm#RCMRF003

  • rugbyRCT
    rugbyRCT Member Posts: 25 Bronze Badge
    edited Feb 12, 2020 12:15PM

    hello EdStevens,

       thank you for your answer.

       I want execute a test with my database is losed and my server too therefore how may i retrieve my database with the last scn or until a time ?

    i would like retrieve this database by a rman duplicate until a scn or until sequence..

    When i see this record i can not see the last scn or the last sequence of the archivelog the i would like find a query in my catalog to retrieve it.

    best regards

    JP

  • EdStevens
    EdStevens Member Posts: 28,778 Gold Crown
    edited Feb 12, 2020 12:54PM
    rugbyRCT wrote:hello EdStevens, thank you for your answer. I want execute a test with my database is losed and my server too therefore how may i retrieve my database with the last scn or until a time ?i would like retrieve this database by a rman duplicate until a scn or until sequence..When i see this record i can not see the last scn or the last sequence of the archivelog the i would like find a query in my catalog to retrieve it.best regardsJP

    Well, if your scenario is that you also lost the server, then before even thinking about recovering the database you will need to build a server and install Oracle to the same version and patch level.  If your scenario is that you lost your server, then where are your backups?

    I asked you for the version of the database, and you did not answer.

    I asked you how you have been taking your backups and you did not answer.

    I gave you a link to the documentation on the rman catalog, which details every rc_* view that you can query to get additional information about databases and their backups.   I expected you to peruse that, looking for view names that looked promising.  It doesn't appear you did that.  You should start with RC_DATABASE.  If your database is in archivelog mode, you don't need last SCN or last sequence.  Just SET UNTIL=to_date('02-12-2020 12:31:25','mm-dd-yyyy hh24:mi:ss');   (using whatever date/time is appropriate)

  • Dude!
    Dude! Member Posts: 22,829 Black Diamond
    edited Feb 12, 2020 3:15PM

    The RMAN catalog contains information that is copied from the database controlfile after a successful backup. A catalog database provides additional features and is required, for example, when you make backups with the "keep forever"option. It can also simply the process of restoring the database in case you need to restore the controlfile, and do not use a fast recovery area or controlfile autobackup. Please check the documentation for more info.

    You need to specify the target DBID to use RMAN to backup, list backups, or restore the database. You can, however, query RMAN catalog views using SQL, for example: select dbid from v$database. Again please check the documentation.

    There are several ways how you can restore and recover a database. There is no best or universal solution, and it depends on your specific scenario. For your purpose it might have been easier to specify a log file when running your backups.

    I think you will find the following examples useful:

    rugbyRCT
  • Dude!
    Dude! Member Posts: 22,829 Black Diamond
    edited Feb 12, 2020 3:17PM

    RMAN will be a frustrating experience if you do not understand the rudimentary concepts and have some experience. A forum is no substitute and people, according to my experience, will not be very happy to a) tell you what information is required, and b) how to retrieve it, or c) spend a lot of time to give you step by step remote instructions, and explain every possible scenario along the way. It's not very likely, but perhaps you're lucky.

    I think it would be best for you to read the RMAN documentation first, and then ask more specific questions when putting the theory to the test. As always, the devil in the detail. The more information you can give to reproduce a problem, the better your chances are to find the correct solution. There is also much information from Oracle enthusiasts and alike on the web, but more than often not conveying the knowledge that helps you to understanding or troubleshoot the process.

    https://docs.oracle.com/database/121/BRADV/rcmdupdb.htm#BRADV010

    rugbyRCT
  • EdStevens
    EdStevens Member Posts: 28,778 Gold Crown
    edited Feb 12, 2020 2:50PM
    rugbyRCT wrote:<snip>i would like retrieve this database by a rman duplicate until a scn or until sequence..<snip>

    rman DUPLICATE is not how you recover a database.

    It appears that you do not have an actual recovery need at the moment, but want to be prepared.  That's A Good Thing (tm).  To that end I would strongly urge you to do the following:

    1) Install Oracle VirtualBox on your workstation.

    2) Create a VM, running your target OS.

    3) On that VM, install your version/edition of Oracle and create a db.

    4) Make a backup of the vm, so that you always have a baseline you can get back to.  The backup of the vm is nothing but a copy of the vm's directory, taken with the vm shut down.

    5) Refer to the Backup and Recovery User's Guide to guide you in creating backups and using them to recover from various loss scenarios.

    rugbyRCT