Newbee Pro2 - Pro2SrcPDB missing when trying to replbatch1.b

Posted by goo on 21-Feb-2019 15:19

11.7.4 / Pro2 5.01

I have setup a new dataserver schema for SQL, and I notised that it gave me an error on tmpQuery og tempPopulation. These are not tables in our db, so I did not add them to the schema. Now when I try to run replbatch1.bat from commandline, I receive the following error int replproc.log

Replication Log posted - Date: 21-02-2019 Time: 15:59:20
Replication Log posted - Date: 21-02-2019 Time: 15:59:20
Replication Log posted - Date: 21-02-2019 Time: 15:59:20
** Warning -- database kompis is already connected. (1012)
** Warning -- database kompissh is already connected. (1012)
** Warning -- database kompissql is already connected. (1012)
Replication Log posted - Date: 21-02-2019 Time: 15:59:20
Replication Log posted - Date: 21-02-2019 Time: 15:59:20
** Unknown Field or Variable name - Pro2SrcPDB. (201)
** .\bprepl\repl_proc\rMydb_myTable.p Could not understand line 204. (196)

rMydb_myTable.p

-----------------------------------------------

:

/* Assign Target-Side Only Fields */


&IF {&USE_APPSRV} EQ YES &THEN /* App-Server? */
IF istrEvent = "C" THEN
ASSIGN bfrTgtmyTable.Pro2SrcPDB = strSrcPDB /*Source Physical DB Name*/
bfrTgtmyTable.pro2created = now
bfrTgtmyTable.pro2modified = now NO-ERROR.

:

:

Anyone know what I am missing?

All Replies

Posted by Satya Prasad on 22-Feb-2019 05:48

Pro2 by default generates these 3 fields (pro2created, pro2modified and Pro2SrcPDB) as part of the target schema generation for each of the source table(s). These are kind of tracking fields when the record got created/modified.
 
So, Re-pull the dataserver schema with these fields and re-generate process libraries. Now, try to run replbatch1.bat. This should work.
 
Thanks,
Satya
 

Posted by goo on 22-Feb-2019 09:52

I am trying to upgrade from 10.2b to 11.7.4, and I am creating a new schemaholder (dbsh). When I look at the table in play, I can see that then following fields:
:
:
ScrPDB
Pro2created
Pro2modified
 
So what can be wrong?
 
//Geir Otto
 

Posted by Rob Debbage on 22-Feb-2019 10:36

ScrPDB is not Pro2SrcPDB so that would explain the error:

** Unknown Field or Variable name - Pro2SrcPDB. (201)

To expand on Satya's feedback, you should have the following Pro2 fields in the SQL Server table, in addition to some/all fields from the corresponding OpenEdge source table:

prrowid (Primary Key)

Pro2SrcPDB

pro2created

pro2modified

As an example the following table definition was taken from the SQL script generated in Pro2SQL 4.6.7 for the Sports2000.Benefits table; the definitions are the same in Pro2SQL 5.0.2:

CREATE TABLE [DBO].[benefits] (

 [prrowid] varchar(36) not null PRIMARY KEY NONCLUSTERED,

 [empnum] integer null,

 [healthcare] varchar(16) null,

 [lifeinsurance] integer null,

 [pension401k] integer null,

 [stockpurchase] integer null,

 [medicalspending] integer null,

 [dependentcare] integer null,

 [Pro2SrcPDB] varchar(12) null,

 [pro2created] datetime null,

 [pro2modified] datetime null,

)

Kind regards,

Rob

Posted by goo on 22-Feb-2019 12:32

So what you are saying is that moving from 10.2b, the pro2’s fieldname of SrcPDB  has changed to Pro2SrcPDB ?  is there other changes I would need to know about?
 
When moving from 10.2b, I was thinking of doing:
 
  1. Setup all new services and databases in 11.7.4 explorer (by doing a restor/convert of all databases and use that as a ready
  2. Stop all services (pro2 with more) and databases (Progres 10.2b) and SQL dbs
  3. Truncate all bi ‘s
  4. Take a backup of db’s (10.2b) and SQL dbs
  5. copy backup and dbs.st files to new machines
  6. restore db’s (10.2b utils on 11.7.4 ) (the schemaholder for SQL I will rebuild reagrds to some dll’s)
  7. restore dbs for SQL
  8. Create new odbc connections
  9. convert db’s (11.7.4)
  10. create a new schemaholder dbsh for Pro2, update schema
  11. start all dbs and services
Now all should be up running? Of course a need to do some pro2 stuff regarding compile all triggers ,but basically all should be ok?
 
//Geir Otto
 

Posted by goo on 22-Feb-2019 13:30

So what you are saying, is that the SQL server db has a wrong version? since it is working in 10.2b, I assumed that restoring the SQL db on new platform, would give me the same and correct db? or maybe the SQL people has done something wrong that gives me wrong database? Not having access to SQL gives me some issues....

//Geir Otto

Posted by goo on 26-Feb-2019 07:07

Can it be that the production version is Pro2 v.4.0? Does that make sense ? In that case, what would be the best way of converting from Pro2 4.0 to 5.02 ?

Posted by goo on 27-Feb-2019 14:42

How can I find what version that is installed of Pro2 ? If I check from the GUI, and about Pro2 I find verions 5.0.1. When I regenerate the target shcema I find

INSERT INTO [DBO].[Pro2SQL] ([pname], [pversion])

 VALUES ('Pro2SQL','v4.20')

I am about to download the latest version of Pro2, so hopefull this will give me some answare.

Posted by Satya Prasad on 28-Feb-2019 03:06

The right way to find the version is: PRO2 Admin -> Help -> About
 
In the recent releases we fix the bug related to VALUES ('Pro2SQL','v4.20') to show the correct PRO2 version over her as well.
 
Thanks,
Satya
 

This thread is closed