13 Replies Latest reply: Dec 4, 2012 1:26 PM by vlethakula RSS

    Find DBID

      Dear all,

      I need to restore control files. During the process,
      RMAN> run
      2> {
      3> restore controlfile from autobackup;
      4> }
      Starting restore at 04-DEC-12
      allocated channel: ORA_DISK_1
      channel ORA_DISK_1: sid=541 devtype=DISK
      RMAN-00571: ===========================================================
      RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
      RMAN-00571: ===========================================================
      RMAN-03002: failure of restore command at 12/04/2012 15:12:24
      RMAN-06495: must explicitly specify DBID with SET DBID command
      Am unable to find DBID since the DB is in nomount stage. all the links and docs are referring to find DBID in mount stage. Please advise
        • 1. Re: Find DBID
          Chanchal Wankhade

          You can find it in you log file of RMAN backup which you have taken before.

          Hope you have taken RMAN bakcup.
          • 2. Re: Find DBID
            Niket Kumar
            Can you please little elaborate why you are doing recovery.....

            or just try to test restore??

            check this link this may help you to find DBID


            Edited by: Niket Kumar on Dec 4, 2012 6:08 PM
            • 3. Re: Find DBID
              Refer to the RMAN backup log.
              The first few lines show the DBID

              eg is as below:

              Recovery Manager: Release - Production on Tue Dec 4 04:30:00 2012

              Copyright (c) 1982, 2005, Oracle.  All rights reserved.

              connected to target database: PRODDB (DBID=1431238624)
              connected to recovery catalog database
              • 4. Re: Find DBID
                Error:     RMAN-06495 (RMAN-6495)
                Text:     must explicitly specify DBID with SET DBID command
                Cause:Restore of a controlfile autobackup was attempted when the database is not mounted.
                Action:Specify the DBID of the database using SET DBID or mount the database.
                • 5. Re: Find DBID
                  DB in nomount stage. How I can know the DBID ?
                  • 6. Re: Find DBID
                    Try this

                    C:\ rman target sys/oracle@orcl3 catalog catalog/catalog@rman

                    RMAN-06193: connected to target database (not started)
                    RMAN-06008: connected to recovery catalog database
                    RMAN> startup nomount;
                    RMAN-06196: Oracle instance started
                    Total System Global Area 94980124 bytes
                    Fixed Size 75804 bytes
                    Variable Size 57585664 bytes
                    Database Buffers 37240832 bytes
                    Redo Buffers 77824 bytes

                    2) RMAN> list incarnation;
                    RMAN-03022: compiling command: list
                    List of Database Incarnations
                    DB Key Inc Key DB Name DB ID CUR Reset SCN Reset Time
                    ------- ------- -------- ---------------- --- ---------- ----------
                    1 2 ORCL3 691421794 YES 542853 12-DEC-12
                    • 7. Re: Find DBID
                      Thanks . But still.
                      RMAN> list incarnation;
                      RMAN-00571: ===========================================================
                      RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
                      RMAN-00571: ===========================================================
                      RMAN-03002: failure of list command at 12/04/2012 17:40:17
                      ORA-01507: database not mounted
                      • 8. Re: Find DBID
                        • 9. Re: Find DBID
                          Niket Kumar
                          Have you checked this link it have many ways to get your DBID ,,.....May be somthing is helpful for you.

                          • 10. Re: Find DBID
                            Did you connect to catalog database ?

                            Or you are trying with connecting to target database. If yes, RMAN uses target database controlfile to read the information. Your database has to be in MOUNT mode.

                            In earlier post, it is connected to both target and catalog database.
                            • 11. Re: Find DBID
                              Thanks all. I don't have a catalog database and DB is in nomount stage still
                              • 12. Re: Find DBID
                                OK, you've been told a couple of things:

                                1. Look at the log of the backup. You have a backup, right?

                                2. The link posted at least twice showed how to grep data files or backup pieces under some OS's. Could you let us know why that doesn't work for you?

                                Help us help you. Let us know what the real problem is.
                                • 13. Re: Find DBID
                                  Do You have idea on where your controlfile autobackup is stored?

                                  rman target /

                                  SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u01/%F'; ------------>Assuming you have taken backup to /u01
                                  restore controlfile from autobackup;

                                  Edited by: vlethakula on Dec 4, 2012 11:25 AM