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: running a process (oracle db) with modified system time

Re: running a process (oracle db) with modified system time

From: Frank van Bortel <fvanbortel_at_netscape.net>
Date: Mon, 17 May 2004 21:54:01 +0200
Message-ID: <c8b51j$jv8$1@news1.tilbu1.nb.home.nl>


Howard J. Rogers wrote:

> Jarek 'bacza' Baczynski wrote:
>

>> hello there,
>>
>> I'm wondering if there is a way to run a process on solaris in such
>> a way that it receives the system time modified with a given amount
>> of secs/mins/hours/...
>>
>> I don't want to change the time on the server, I just want to run
>> a specific process in an environment that "emulates" a different time.
>>
>> is it possible to write some piece of code that catches some syscalls
>> and returns modified time? if it is, how can I do that?
>> any hints/links/code examples ;) will be greatly appreciated.
>>
>> the "process" is in fact an oracle database instance, so the solution
>> (if any) would have to be a really good one :)
>> (that is, on proper level of interception to make sure that any syscall
>> that is supposed to return a current time is intercepted consistently)
>>
>> regards,
>> -- jb.

>
>
>
> You are joking, aren't you?
>
> But assuming you are not, what is the actual business problem you are
> trying to solve with this approach?
>

Year2000? Year 2100?

To the OP: there *is* a parameter, fixed_date. Use with care! FIXED_DATE enables you to set a constant date that SYSDATE will always return instead of the current date. This parameter is useful primarily for testing. The value can be in the format shown above or in the default Oracle date format, without a time.

> From where I sit, I could imagine the business problem to be "I want to
> fake some audit records in my database. How do I do that?" Or, "I have
> embezzled some funds and I want to fiddle the transaction dates so that
> no-one will notice until next year".
>
> I doubt that any moderately sensible person here would indulge you by
> supplying instructions to do as you ask.
>
> However, if you state what the problem you are trying to solve is, then
> all sorts of possibilities may arise. In other words, WHY do you feel
> you need to fool Oracle into thinking it is a different date and time
> from what your server says? And WHY do you not want to simply change the
> server time?
>
> Regards
> HJR

-- 

Regards,
Frank van Bortel
Received on Mon May 17 2004 - 14:54:01 CDT

Original text of this message

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