SELECT TIME ; - SHOWS INCORRECT TIME

Teradata Database on VMWare
Junior Supporter

SELECT TIME ; - SHOWS INCORRECT TIME

I am running Teradata 15.10  on VMware (Linux guest O/S)..   I have attempted to correct the time Teradata returns (SELECT TIME;) and haven't

had any success...  I used the gnome terminal and

1. shut Teradata down

2. entered -  date +%T -s "17:05:30"

3. started Teradata

The time is still incorrect by a few hours..

 

Anyone have any ideas how I can reset the time that Teradata uses? I am assuming it picks it up from the VMware guest O/S which is Linux

in my case. When I start VMware and the guest O/S it displays the correct date and time at the bottom of its window.

thanks


Accepted Solutions
Teradata Employee

Re: SELECT TIME ; - SHOWS INCORRECT TIME

To answer this question we normally need to see dbscontol output for general flag 57

From Linux as root run the following and show us flag 57.

dbscontrol

di gen

quit

 

If you do not care about existing data on the disk (the existing timestamps) and you do not use temporal. If you simply  want to see the OS time from the database then the simple answer it to  Set general flags 16/17/57 equal to 0 as follows:

/usr/tdbms/bin/dbscontrol

mod gen 16=0

mod gen 17=0

mod gen 57=0

write

quit

Warning: Timestamps on existing data may be off after doing this.

1 ACCEPTED SOLUTION
7 REPLIES
Teradata Employee

Re: SELECT TIME ; - SHOWS INCORRECT TIME

Hi Brian,

 

Would you be able to share the contents of the following files:

 

1./etc/ntp.conf
2. /var/log/messages
3. /var/log/ntp

 

Junior Supporter

Re: SELECT TIME ; - SHOWS INCORRECT TIME

Hi Sean... I believe my issue is Teradata defaulting to GMT. The time difference is exactly 5 hours... so my Q now is.... What do I have to do to set the Teradata default time to EST ?  thanks

Teradata Employee

Re: SELECT TIME ; - SHOWS INCORRECT TIME

To answer this question we normally need to see dbscontol output for general flag 57

From Linux as root run the following and show us flag 57.

dbscontrol

di gen

quit

 

If you do not care about existing data on the disk (the existing timestamps) and you do not use temporal. If you simply  want to see the OS time from the database then the simple answer it to  Set general flags 16/17/57 equal to 0 as follows:

/usr/tdbms/bin/dbscontrol

mod gen 16=0

mod gen 17=0

mod gen 57=0

write

quit

Warning: Timestamps on existing data may be off after doing this.

Junior Supporter

Re: SELECT TIME ; - SHOWS INCORRECT TIME

Sorry for the long delay in replying......

 

where is the cmd - dbscontrol   ?? I'm logged in as root and can't locate it ..

 

thanks

Junior Supporter

Re: SELECT TIME ; - SHOWS INCORRECT TIME

I moved ahead with changing the GDO record  --  mod gen 57=0.  This has corrected my issue.

Thanks for your advice, it helped...

Teradata Employee

Re: SELECT TIME ; - SHOWS INCORRECT TIME

The dbscontrol command path is /usr/tdbms/bin/dbscontrol . If you path is not set correctly normally you can type "tdatcmd" (/usr/pde/bin/tdatcmd) as root and most Teradata Administrative commands should be in your path.

Junior Supporter

Re: SELECT TIME ; - SHOWS INCORRECT TIME

thanks Arnie... I searched for dbscontrol and found it in

/opt/teradata/tdat/tdbms/15.10.00.07/bin/dbscontrol..