Kolja Kleist wrote :

>I want to migrate a db from Adabasd to Sapdb!
>I use my own jdbc-program to export and import the tables/data between both
>databases. The main problem i have in the moment is the following:
>The tables in the adabas db uses char(8)byte key columns. The keys are
>generated with the 'STAMP' keyword during insert. In the first step, I want
>to do the same on sapdb. Therefor I have to increment the sequence that
>produce the keys on sapdb to the same (or greater) value I have in the
>adabas db.
>Writting a perl/java/c program to do this is not the problem, but the time
>the program(db) will need to generate > 50.000.000 keys is a problem.
>If there is a better way, please let me know!!! If there is no better way
to
>do this, please let me also know.

I see no other way than a program to increase the stamp value. I tried the
following
c program :

int main()
{
  int ix;
  exec sql begin declare section;
  char stamp[9];
  exec sql end declare section;

  exec sql set serverdb "mysapdb";
  exec sql connect dba identified by dba;

  for (ix = 0; ix < 50000000; ++ix)
  {
    exec sql next stamp into :stamp;
    if (sqlca.sqlcode != 0)
    {
      printf ("sql error %d\n", sqlca.sqlcode);
      return -1;
    }
  }
  return 0;
}

I think this is the best way to solve the problem. The program needed about
30 Minutes on my PC.

Thomas

---
Thomas Anhaus
SAPDB, SAP Labs Berlin




_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to