Marking an Oracle Backup Piece Status as Available

Mark an Oracle backup piece status as available in the recovery catalog and control file metadata, so you can use the backup piece in restores.

Procedure

  1. Execute the following SQL query to retrieve the backup piece name. For additional information on building custom queries, see Custom Reporting.

    SELECT AF.jobId, AF.name 'backuppeice_name'
    FROM archFile AF
                INNER JOIN APP_Application A ON AF.appId = A.id
                INNER JOIN APP_Client C ON A.clientId = C.id
                INNER JOIN APP_InstanceName I ON A.instance = I.id
    WHERE A.appTypeId = 22
            AND C.name = 'clientname'
            AND I.name = 'instancename'

  2. Export the results to a csv file. For information on exporting a file, see Export to CSV.
  3. On the RMAN command line, connect to the target database.
  4. On the RMAN command line, type the following command, after substituting the backup piece with the value from the SQL query.

    UNIX

    allocate channel for maintenance device type 'sbt_tape'
    PARMS="SBT_LIBRARY=<software_installation_path>, ENV=(CvClientName=clientname,CvInstanceName=Instancename)";
    change backuppiece ‘backuppiece _name’ available;

    Windows

    allocate channel for maintenance device type 'sbt_tape;
    change backuppiece ‘backuppiece _name’ available;