I am locking system date by below code available in lock_date.sql:
for i in 1 .. 1000000000
EXECUTE IMMEDIATE 'ALTER SYSTEM SET Fixed_date = ''01-Jun-2016''';
But somebody kill my session at this time as date is locked by me. I would not know this unless I am seeing the session.
If anybody kills, I want to login again and should do the date lock automatically.
Can anyone advise, how to login once again when my session killed, in the PL Sql way.
I really don't understand what you are trying to achieve here.
You only need to run this command once and the SYSDATE value will remain the same until you set the parameter back to NONE. See:
http://docs.oracle.com/cd/E16655_01/ser ... REFRN10062
It looks like you are just running the command loads of times, which will not affect what it does, but will burn database resources. Killing your session will have no affect on the return value of SYSDATE, because as soon as the parameter is set once, it will return the same value for ever.
I think you need to understand what initialisation parameters do before you start messing with them.
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: https://oracle-base.com
My blog: https://oracle-base.com/blog
Who is online
Users browsing this forum: No registered users and 2 guests