What options do I have in Amazon RDS for using 'fixed_date'?

Viewed 203

Historically, in Oracle I've used the fixed_date parameter to change the system date to run a series of reports that tie together to verify those links still are correct.

Now that we've moved to Amazon RDS, that capability is not available.

What are my options?

Here's what I've considered

  • changing all calls to 'system_date' to use a custom function that simulates this. (Ugh, this is hundreds of packages, but is possible)
  • crying :)

anyone with an idea?

2 Answers

Seems like the only option you have is to create custom function and replace all the calls to system_date.

CREATE OR REPLACE FUNCTION fml.system_date
RETURN date
AS
BEGIN
  return to_date('03-04-2021','DD-MM-YYYY');
END;

Not sure I would do this approach, but you could also investigate "stored outlines" if there are not too many queries involved. Have it call the alternate function/package instead. The fix_date call will still fail, but maybe it can be a workaround. That outline could then be used only for reports user for example.

I am not sure why Amazon doesn't support something like this yet...

Related