Oracle 8i RMAN putting current date in backup files

Posted on 2011-10-09
Last Modified: 2013-12-19
(And my struggle with Oracle 8i continues.... I really wish this client will already upgrade)

Is there any way you can put the current date to the filename of the created backup files?  I've tried %T, %Y%M%D.  In the examples in, it seems the author did not even bother with dates in 8i, but has them in 9i.  Is there no way to do this on 8i?


Question by:johanntagle
    LVL 23

    Accepted Solution

    hi johann,
    - i dont think the date formatting is available for rman on oracle 8i. you can refer to available format parameter that can be used to make the rman backup file unique:

    - from the doc:
    %c: specifies the copy number of the backup piece within a set of duplexed backup pieces. If you did not issue the set duplex command, then this variable will be 1 for regular backup sets and 0 for proxy copies. If you issued set duplex, the variable identifies the copy number: 1, 2, 3, or 4.

    %p: specifies the backup piece number within the backup set. This value starts at 1 for each backup set and is incremented by 1 as each backup piece is created.

    %s: specifies the backup set number. This number is a counter in the control file that is incremented for each backup set. The counter value starts at 1 and is unique for the lifetime of the control file. If you restore a backup control file, then duplicate values can result. Also, CREATE CONTROLFILE initializes the counter back to 1.

    %d: specifies the database name.

    %n: specifies the database name, padded on the right with 'x' characters to a total length of 8 characters. For example, if PROD1 is the database name, then PROD1xxx is the padded database name.

    %t: specifies the backup set timestamp, which is a 4-byte value derived as the number of seconds elapsed since a fixed reference time. The combination of %s and %t can be used to form a unique name for the backup set.

    %u: specifies an 8-character name constituted by compressed representations of the backup set number and the time the backup set was created.

    %U: specifies a convenient shorthand for %u_%p_%c that guarantees uniqueness in generated backup filenames. If you do not specify a format, RMAN uses %U by default.

    LVL 24

    Author Closing Comment

    Guess I will have to put timestamps outside RMAN.  Thanks OP!

    Featured Post

    Courses: Start Training Online With Pros, Today

    Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Converting BLOB to XMLTYPE 12 84
    Right Function in Oracle SQL Query 6 39
    Oracle SQL Char delimited error 5 29
    Pl/SQL Query 31 41
    How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
    Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
    This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
    This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now