Question: How
can change the server date? I know that Oracle gets
the sysdate from the server data but I don't know how to
change the data on my Oracle server. I am running on
Oracle Solaris.
Answer:
Each OS provides its own directions
for changing the sysdate, and it would be prohibitive to
display the directions for the 60+ OS server platforms
supported by Oracle.
Changing the OS server date in UNIX
However, in most UNIX/Linux system you can use the date root
command to change the OS sysdate. This command is
normally executed by a system administrator, not a Oracle
DBA because root access is required.
Step 1. Log in as root.
Step 2. Set the time and date by entering a string like
this:
root> date 0325071514
This example produces the following:
Sat March
25, 07:15 CST 2015
- The first four digits, 0325, are the month and date,
March 25th.
- The next four digits, 0715, are the time. (Remember
to use military time: 8:00 PM is 2000, 2:00 PM is
1400, etc.)
- The final two digits, 14, are the year.
However, you can change the Oracle SYSDATE directly from
SQL*Plus, if you don't want to get root access to change the
data on the Oracle database server:
alter system set fixed_date ='2013-08-05';
Beware! Changing
the OS server date can cause serious issues within Oracle
becaue Oracle grabs the date from the operating system.
Changing the OS date can cause serious date/time issues with
Oracle auditing.