5 Replies Latest reply: Aug 8, 2014 9:37 AM by Prakash_dba RSS

    rman backup piece

    Prakash_dba

      Hi,

       

      I have one backup piece in the server and this server have 40 databases, how i can find this backup piece belongs to which database ?

       

      Thanks

      Prakash GR

        • 1. Re: rman backup piece
          EdStevens

          Prakash_dba wrote:

           

          Hi,

           

          I have one backup piece in the server and this server have 40 databases, how i can find this backup piece belongs to which database ?

           

          Thanks

          Prakash GR

          40 databases on one server is utter madness.  Even in a low-level dev environment.

           

          Unless you've done something really hinky, your backup piece (file) will be in a directory structure whose name reflects the database to which it belongs.

           

          Why do you ask?  What actual problem are you trying to solve?

          • 2. Re: rman backup piece
            Prakash_dba

            Hi,

             

            Thanks for the updated, it is not real time scenario but some one asked me thhis question which i felt i should ask in this forum so i am asking

             

            is there any way to find that backup piece are belongs to which database ?

             

            Thanks

            PGR

            • 3. Re: rman backup piece
              MohaAGOU

              Hi,

               

              Well it's not a usual way but you can try to mount any database then catalog the backuppiece in question, this is what i did :

               

              [oracle@sysagvm dbs]$ export ORACLE_SID=DB11DUP

              [oracle@sysagvm dbs]$

              [oracle@sysagvm dbs]$

              [oracle@sysagvm dbs]$

              [oracle@sysagvm dbs]$ rman target /

               

              Recovery Manager: Release 11.2.0.1.0 - Production on Wed Jul 30 22:09:03 2014

               

              Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

               

              connected to target database (not started)

               

              RMAN> startup mount;

               

              Oracle instance started

              database mounted

               

              Total System Global Area     146472960 bytes

               

              Fixed Size                     1335080 bytes

              Variable Size                 92274904 bytes

              Database Buffers              50331648 bytes

              Redo Buffers                   2531328 bytes

               

              RMAN>

               

              RMAN> catalog backuppiece '/tmp/8upenl5o_1_1';

               

              using target database control file instead of recovery catalog

              ORA-19870: error while restoring backup piece /tmp/8upenl5o_1_1

              ORA-19691: /tmp/8upenl5o_1_1 is from different database: id=1591210814, name=DB11GR2

               

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

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

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

              RMAN-03002: failure of catalog command at 07/30/2014 22:09:33

              RMAN-06209: List of failed objects

              RMAN-06211: ==========================

              RMAN-06212:   Object Type   Filename/Handle

              RMAN-06213: --------------- ---------------------------------------------------

              RMAN-06214: Backup Piece    /tmp/8upenl5o_1_1

               

              RMAN>

               

               

              if you have the logs of your backups, you can find it also and save your time

               

              Regards.

              • 4. Re: rman backup piece
                EdStevens

                Prakash_dba wrote:

                 

                Hi,

                 

                Thanks for the updated, it is not real time scenario but some one asked me thhis question which i felt i should ask in this forum so i am asking

                 

                is there any way to find that backup piece are belongs to which database ?

                 

                Thanks

                PGR

                I'm always curious about "someone asked".  It always sounds like trying to deflect any criticism to a mysterious "someone".  Like saying "I have this friend who has this problem", when in reality the "friend" yourself and you just don't want to admit to having the problem.  Else the "someone asked" was a job interviewer.

                 

                Nevertheless, the question sounds like you have this file (supposedly a backup piece) that exists in something of a vacuum and you want to know what database it belongs to.  I revert back to my original reply.  It should be in a directory structure that includes the name of the database.  Did that not prove to be the case?

                 

                You could start an rman session on each of your 40 databases (did I mention that 40 databases on a single server is madness? ) and do a LIST BACKUP, then examine the results to see if the backup piece in question is listed. 

                 

                Did I mention that 40 databases on a single server is madness?

                 

                Of course, this method does not take into account the possibility that the backup piece in question was moved from its original location and a CROSSCHECK BACKUP; DELETE EXPIRED BACKUP; was issued, leaving the backup piece 'orphaned'.  In that case you'd have to revert to MohaAGOU's method.

                 

                Did I mention that 40 databases on a single server is madness?

                • 5. Re: rman backup piece
                  Prakash_dba

                  Thnaks to EdStevens and MohaAGOU for educating me to undestand my question and thanks for your time too

                  happy weekend

                   

                  Thanks

                  Prakash GR