News Stay informed about the latest enterprise technology news and product updates.

Explore your date options with RMAN

Recovery Manager tip #2 from "30 tips in 30 minutes," brought to you by the IOUG.


The following is Recovery Manager tip #2 from "30 tips in 30 minutes," brought to you by the IOUG. Return to the main page for more tips on this topic.


You've got a variety of options when specifying dates with RMAN. Look at some date samples for some illustrations of how you can establish date values with RMAN.

Date String Value
SYSDATE The current date and time
TRUNC (SYSDATE) Midnight of the current day
SYSDATE The current date and time less 7 days
'13-JAN-2002' Midnight on January 13th, 2002 if the session NLS_DATE_FORMAT = 'DD-MON-YYYY'
TO_DATE ('13-JAN-2002 13:00', 'DD-MON-YYYY HH24:MI' One PM on January 13th, 2002 no matter what the session value for NLS_DATE_FORMAT
ADD_MONTHS(SYSDATE, 1) One month after from the current date and time
ADD_MONTHS(SYSDATE, -1) One month before from the current date and time
LAST_DAY(SYSDATE, 1) The last day of the current date and time
NEXT_DAY(' SYSDATE', 'SUNDAY') The date of the next Sunday from the current date and time

For more information see Chapter 12 of "Oracle backup and recovery 101."


Get more tips in minutes! Return to the main page.

About the author: Kenny Smith has been working with Oracle technology on HP servers for over a decade. He specializes in Oracle database architecture, database administration and development. He has presented at numerous Oracle conferences on two continents. He has published many articles describing Oracle solutions and has co-authored "Oracle backup and recovery 101" from Oracle Press.

IOUG: Become a member of the IOUG to access the paper referenced here and a repository of technical content created for Oracle users by Oracle users.

Dig Deeper on Oracle database backup and recovery

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close