Migrating batch history data from sql server – Rockwell Automation FactoryTalk Historian Classic for Batch User Guide User Manual

Page 18

Advertising
background image

Chapter 2 Configuring FactoryTalk Historian for Batch

DECLARE

CURSOR c1 IS SELECT GMT, LCLTIME, UNIQUEID, BATCHID, RECIPE,
DESCRIPT, EVENT, PVALUE,

DESCRIPTAPI, EVENTAPI, PVALUEAPI, EU, AREA, PROCCELL, UNIT,
PHASE, PRINTED, USERID,

PHASEDESC, MATERIALNAME, MATERIALID, LOTNAME, LABEL, CONTAINER,

PROMISEID, SIGNATURE,

ERP_FLAG, RECORDNO

FROM BATCHHIS;

BEGIN

FOR c1_rec IN c1 LOOP

"BIZ"."BHInsert"(c1_rec.lcltime, c1_rec.BatchID,
c1_rec.Recipe, c1_rec.Descript, c1_rec.Event,

c1_rec.PValue, c1_rec.EU, c1_rec.Area, c1_rec.ProcCell,
c1_rec.Unit, c1_rec.Phase, c1_rec.PhaseDesc, c1_rec.UserID,
c1_rec.UniqueID, c1_rec.materialname, c1_rec.materialid,
c1_rec.lotname, c1_rec.label, c1_rec.container,
c1_rec.promiseid, c1_rec.Signature, NULL, NULL, NULL, NULL,
'BHBATCHHIS');

COMMIT;

END LOOP;

END;

If you have existing batch history data stored in a Batchhis table in a

SQL Server database, use the following instructions to migrate this
data into the FactoryTalk Historian for Batch tables in an
RSBizWare database. After transferring your existing batch data
into the RSBizWare database, you can begin generating reports in
the Configuration Console.

NOTE

The batch history data migration utility must be run on a computer that
has SQL Server or Client installed, and that can access the computers

where the source and destination databases reside.

1. Place the RSBizWare installation DVD into the DVD drive

on your computer.

2. In Windows Explorer, navigate to the DVD drive and

double-click the BHDataMigration.exe file.

3. The FactoryTalk Historian for Batch Data Migration

window opens.

Migrating Batch History Data
From SQL Server

18

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

Advertising