DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: RMAN on Windows 2000: How to use date parameter?

  1. #1
    Join Date
    Dec 2001
    Location
    USA
    Posts
    620

    Unhappy RMAN on Windows 2000: How to use date parameter?

    Hi all,

    I want schedule the RMAN backup on Windows 2000 server for our 8i production database.

    In that, I want to generate RMAN backup file with DD,MM,YYYY stamp and also write some if/then/else construct using DD/MM/YYYY parameter. I have a command file from which I call RMAN command passing the .RCV (RMAN script file). In the RMAN script file, I have all RMAN backup commands. Now, In this file, I want to write the RMAN backup file name with DD / MM/ YYYY values.

    Has any one used it?

    Pl. help.

    Thanks in Adv.
    Sam
    ------------------------
    To handle yourself, use your head. To handle others, use your heart

  2. #2
    Join Date
    Dec 2001
    Location
    USA
    Posts
    620
    Hi,

    Any help please...

    Thanks,
    Sam
    ------------------------
    To handle yourself, use your head. To handle others, use your heart

  3. #3
    Join Date
    Nov 2002
    Posts
    170
    I have not used it and also don't think oracle provides the format with dd/mm/yyyy with rman(not 100% sure). But I would write a shell script to rename the OS file with dd/mm/yyyy as soon as RMAN writes the backup file.....if you are not directly writing to the tapes. Hope this helps.

  4. #4
    Join Date
    Dec 2001
    Location
    USA
    Posts
    620
    Hi dbasupuser,

    Thanks for yr reply.

    is there any other way to do it?

    Thanks,
    Sam
    ------------------------
    To handle yourself, use your head. To handle others, use your heart

  5. #5
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434
    I think u can do it in ur script....any way try this....

    In ur script, capture the string dd/mm/yyyy in some variable from any dummy table say DUAL & use that variable for the generation of the file name in which u want to put RMAN backup.

    Regards
    Abhay.

  6. #6
    Join Date
    Feb 2000
    Location
    Singapore
    Posts
    1,758
    Originally posted by dbasupuser
    I have not used it and also don't think oracle provides the format with dd/mm/yyyy with rman(not 100% sure). But I would write a shell script to rename the OS file with dd/mm/yyyy as soon as RMAN writes the backup file.....if you are not directly writing to the tapes. Hope this helps.
    Renaming RMAN backup files would be a disaster thing to do. In case of recovery RMAN will look for the files it has created and will give errors when it doesn't find them.

    To include timestamp in the RMAN filename you can use %t. For more information see the FORMAT options.

    HTH
    Sanjay G.
    Oracle Certified Professional 8i, 9i.

    "The degree of normality in a database is inversely proportional to that of its DBA"

  7. #7
    Join Date
    Dec 2001
    Location
    USA
    Posts
    620
    Hi Sanjay,

    %t does not provide something like YYYYMMDD, which I want to include in the file name.

    After some research, I am now able to generate the RMAN .RCV file with the timestamp as I want. But now, I have one more problem left.

    In Windows command file, I want to print '%' in the echo command. Problem is that % in command batch file with echo command is used for substitution.

    Does any one know how to suppress the effect of % to actually print % in the echo command?

    Thanks,
    Sam
    ------------------------
    To handle yourself, use your head. To handle others, use your heart

  8. #8
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434
    Originally posted by samdba


    In Windows command file, I want to print '%' in the echo command. Problem is that % in command batch file with echo command is used for substitution.

    Does any one know how to suppress the effect of % to actually print % in the echo command?

    Thanks,
    say if u wana print 2 % prior to and after message....then the echo command has to be

    ECHO %%%"the message u want to include"%%%

    Result
    %%"the message u want to include"%%

    #append % with %s where u want to print '%'

    Originally posted by samdba


    %t does not provide something like YYYYMMDD, which I want to include in the file name.

    After some research, I am now able to generate the RMAN .RCV file with the timestamp as I want. But now, I have one more problem left.

    Thanks,
    Cau u tell us what did u do to get timestamp in ur file name?

    Regards
    Abhay.
    funky...

    "I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."

    "Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width