White Paper


How To Time Shift Oracle Database

This whitepaper will delve into the background of Oracle Database software, the basics of its date and time functionality, and how-to time travel Oracle Database accordingly with TimeShiftX®.


What is Oracle Database?

Oracle Database is a database management system that offers an object-oriented model known in the industry as object-relational database, or ORD. This means inheritance, classes and, of course, objects are supported in the Oracle Database schemas and query language, which makes it a solution of choice across virtually all industries and commercial sectors. [1]

When working with Oracle Database, various time date functions are available. These include several dozen common functions from current date/timestamp all the way to extract a value of a date time field. The variety of functions and date/time logic available allows for a multitude of testing opportunities, such as date shifting, time shifting, backdating, forward-date testing. Each of these key functions are essential in a testing environment.

Where critical business workflows are concerned, date and time shifting allows users to test and validate important company logic and transactions pertaining to their relevant life-cycles, a process that becomes complicated quickly. With a solution like TimeShiftX, software applications can be tested on a temporal basis without affecting system clocks, editing code, or isolating servers.


Data Types

Below are the existing date and time data types in Oracle. These data types define the type of data a column can contain and have various formats, byte storage size, precision, and accuracy. To see the full specifications, read the Oracle Database documentation [2].

  • DATE
  • TIMESTAMP
  • TIMESTAMP WITH TIME ZONE
  • TIMESTAMP WITH LOCAL TIME ZONE

Function Calls

Oracle date and time function calls enable users to perform various actions and receive the results as a value. These functions offer many actions such as to modify, compare, validate, and extract the date and time values.

ADD_MONTHS LAST_DAY MONTHS_BETWEEN NEW_TIME NEXT_DAY
ROUND(date) TRUNC(date) CURRENT_DATE CURRENT_TIMESTAMP DBTIMEZONE
EXTRACT (datetime) FROM_TZ LOCALTIMESTAMP NUMTODSINTERVAL
NUMTOYMINTERVAL SESSIONTIMEZONE SYS_EXTRACT_UTC SYSDATE
SYSTIMESTAMP TO_CHAR (datetime) TO_DSINTERVAL TO_NCHAR (datetime)
TO_TIMESTAMP TO_TIMESTAMP_TZ TO_YMINTERVAL TZ_OFFSET


Usage

In applications where real world validity and time tracking are required, the ease of temporal testing is crucial. Simplicity, however, presents something of a challenge in most cases, especially where Active Directory or Kerberos are required. In such instances, companies are unable to date shift or time shift due to security rules. Time travel and time simulation via TimeShiftX are used to test systems in a variety of what-if scenarios, including past-date, future-date, and even frozen, accelerated, or decelerated state simulations.

Example: Consider the intricacies of defined-benefit pension funding calculations in the context of a leap year or changing daylight savings/standard time scenarios. Through time travel testing, the pension provider can ensure continuity as well as ongoing compliance.

With the example above as an illustration, it stands to reason that processes like date shifting, temporal testing, time simulation are all particularly useful where date logic in financial industries is concerned. Of course, this isn’t limited to financial transactions, but any industry or market involving time-sensitive workflows, transactions, or cycles such as financial control testing, policy life cycle testing, enrollment validation, and a host of others can benefit.


Time Travel Oracle Database

To initiate a time simulation with TimeShiftX, the user begins with a command or GUI, followed by setting the future or past date, or accelerated, decelerated or frozen state.

C:\> timeshiftx Windows terminal command

$ timeshiftx Linux/UNIX terminal command

TimeShiftX Windows GUI

Oracle will now show the future or past virtual clock date.

Figure 1: Oracle time shifting to 2030.



Figure 1: Oracle time shifting to 2010.


Benefit

Above all, when validating sensitive data in a testing environment, it’s paramount to test fully. With TimeShiftX, you can encapsulate a testing environment within a virtual time clock container, run your temporal testing, all while your information and data remains secure with no outside network calls.

To learn more about how you can elevate your time simulation testing to the next level while ensuring an environment that maintains the security of your data, visit vornexinc.com.


[1] https://docs.oracle.com/en/database/oracle/oracle-database/21/index.html
[2] https://docs.oracle.com/cd/E11882_01/server.112/e10729/ch4datetime.htm#NLSPG249


Learn More! Start a TimeShiftX Trial!


Get Started