Tuesday, November 12, 2013

How to sync system and database time stamp

This post belongs to if there any change in time stamp of system and database.  For i.e

SQL>select to_char(sysdate,'dd-mon-yyyy') from dual;

Output of this query will show the database time stamp

SQL > !date

output of this query will show the system time stamp

If output of both above queries are same then all is well otherwise follow the below steps to sync the time stamp:

1.  cd $GRID_HOME/crs/install
2. cp -s s_crsconfig_HOSTNAME.txt   s_crsconfig_hostname.txt_bkp ( backup the original file)
3. replace the TZ=newtimezone (whatever you want for DB) in s_crsconfig_HOSTNAME.txt
4. Take the output of  crsctl stat res -t
5. crsctl stop has ( from root user)
6. crsctl start has  ( from root user).....
7. After HAS starts check  the output of crsctl stat res -t  to see if all oracle related services       and all targets  are up and running .
8. Connect to database remotely and see if the desired time stamp is displaying as per server .

Hope this works for you :)

Thanks,

1 comment: