Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: ad hoc sysdate changes for debugging purposes

Re: ad hoc sysdate changes for debugging purposes

From: Dave O'Keeffe <DOKeeffe_at_n0spam.cableinet.co.uk>
Date: Wed, 22 Apr 1998 22:32:42 +0100
Message-ID: <353E61FA.5D9D@n0spam.cableinet.co.uk>


In one of the INIT.ORA parameters you can set a date, I think its called FIXED_DATE. This still means your DBA has to bounce the database every time you want to change the date.

You could use a stored procedure to return you the value of sysdate. Your application would have to call this procedure every time it wanted a date, but it would work. You can then hack the stored procedure to force it to return other dates as you require, then when you're happy, you just recompile one last time to return SYSDATE.

Dave O'Keeffe

Xeno Campanoli wrote:
>
> We are testing usage of date ranges which depend at runtime on the current
> OS date/time, and we would like to test these for many date-time
> combinations; basically boundary points and midrange points, so three
> date-time combinations at least for each day of the week. I can't help but
> think there must be a method in Oracle to set the date-time found in
> "sysdate" before running an application so that we can make our checks
> effectively without having to inconvenience the machine's system
> administrator into jerking around the actual OS date/time. Please can
> someone suggest some effective debugging methods for imposing ad hoc sysdate
> values to an Oracle job or copy or running thread or whatever so that
> subsequent applications can be made to think sysdate is that ad hoc value
> chosen rather than the actual one. Thank you.
>
> Sincerely, Xeno Campanoli
>
> --
> The opinions expressed in this message are my own personal views
> and do not reflect the official views of the Microsoft Corporation.

--
For email replys remove "n0spam." from the above address Received on Wed Apr 22 1998 - 16:32:42 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US