Updating the database gmt offset value – Rockwell Automation FactoryTalk Historian Classic for Batch User Guide User Manual

Page 21

Advertising
background image

Configuring FactoryTalk Historian for Batch Chapter 2

Each event record that is written into the FactoryTalk Historian for

Batch

BHBatchhis

database table contains a local and universal

date/timestamp. FactoryTalk Historian for Batch calculates and
stores the Universal Coordinated Time (GMT) based on the local
date/time stamp.

The universal date/timestamp stored in the GMT column is derived
from the local date/timestamp. To ensure the timestamp is
accurately calculated, the database server must be located in the same
time zone as the FactoryTalk Batch Server. If the database server is

not in the same time zone as the FactoryTalk Batch Server, see
"Manually Updating the GMT Offset Value" for details on how to
manually update the offset value used in calculating the GMT
timestamp.

After FactoryTalk Historian for Batch is installed, the database
administrator must manually create a scheduled job to execute the
stored procedure, BHUpdateGMTOffset. A sample script that can
be used as a basis for the scheduled job is located on the FactoryTalk
Historian for Batch installation CD in

/RSBizWare/Support/UpdateGMTOffset.sql. This sample script
assumes the database name is

BizWare

and the database user,

bizwareuser

, already exists.

TIP

The sample script UpdateGMTOffset.sql is written in MSSQL T-SQL. This
can be used for SQL Server as it is written. However, for use in Oracle this

script must be rewritten in PL/SQL.

To automatically update the value used in calculating the GMT
date/timestamp in time zones that observe daylight savings time:

1. Copy the

BHUpdateGMTOffset.sql script from the

/RSBizWare/Support directory on the installation CD to the
SQL server computer.

Updating the Database GMT
Offset Value

Instructions for Daylight
Savings Time (SQL Server
Only)

Rockwell Automation Publication BHIST-UM011A-EN-E-June 2014

21

Advertising