Hi Chidd,

Chidd [mailto:[EMAIL PROTECTED] wrote:
> 
> Hello,
> I am wanting to extract one user schema (i.e table
> definitions and application data) and load it into a
> 2nd database with LOADERCLI in 7.4. I am extracting
> the catalog and data from the source database and
> loading into target database as below. Both are
> UNICODE databases.
> Source DB:
> USE USER appl appl
> //
> CATALOGEXTRACT USER 
>       OUTSTREAM FILE 'D:\extracts\cataloguser' FORMATTED
> //
> ------
> USE USER appl appl
> //
> TABLEEXTRACT USER
>       DATA OUTSTREAM FILE 'D:\extracts\tabdatauser'
> FORMATTED
> //
> 
> Target DB:
> USE USER appl appl
> //
> CATALOGLOAD USER 
>       INSTREAM FILE 'D:\extracts\cataloguser' FORMATTED
> //
> USE USER appl appl
> //
> TABLELOAD USER
>       DATA INSTREAM FILE 'D:\extracts\tabdatauser'
> FORMATTED
> //
> 
> Is this the right way to go about it? The catalog load
> is OK, but the table load returns an error (see below)
> What am I doing wrong here?
> 
Yes, it is the right way. And no, you didn't do anything wrong.
It's a problem with
the kernel and the loader. I have tried to describe this
a bit more detailed in
http://sapdb.2scale.net/moin.cgi/MigrateSchemesUsingLoader
in step 1. The things said there are still valid for the so far
released versions 74.03.XX (anything said in that whole topic
is still valid). To make it short here your cmd file should
look as follows:

// Source DB:
USE USER appl appl
//
CATALOGEXTRACT USER OUTSTREAM FILE 'D:\extracts\cataloguser'
//
TABLEEXTRACT USER DATA OUTSTREAM FILE 'D:\extracts\tabdatauser'
// Target DB:
USE USER appl appl
//
TABLELOAD USER DATA INSTREAM FILE 'D:\extracts\tabdatauser'
//
CATALOGLOAD USER INSTREAM FILE 'D:\extracts\cataloguser'

- you don't need the FORMAT specification as the CATALOGEXTRACT/
  CATALOGLOAD write/process a text file with DDL-commands - there
  is no chance to format it anyhow
- and you don't need the FORMAT specification for the TABLEEXTRACT/
  TABLELOAD either because those use a proprietary SAP DB format
  that cannot be changed by any file format specification
- you don't need to connect the user prior to every command; once
  the user is connected all subsequent commands (means all commands
  following the USE USER command) are executed as this user until
  a new user is connected (a new USE USER command)
- you may let execute the whole script (extracting AND loading)
  by one single server; so put all commands (as I did in your example)
  in one script and feed it to the loadercli; the server is able to
  process commands on remote db-servers
- for the changed sequence of CATALOGLOAD and TABLELOAD see the
  wiki mentioned above


[snipped some of the standard output - error code -25801 = Internal error]

> // *
> // E -25345:  Schemes of source and target table
> LOADIE_TEST do not match; default type of LT_KEY2:
> target = no default, source = other default.
> // E -25342:  Error restoring table LOADIE_TEST; table
> exists but source table schema and target table schema
> are different
> // E -25801:  Internal error [vls28_TLoad.cpp, 2464,
> -25342]; contact technical support
> 
Ok, the -25801 is a misleading output here. This one should
actually only be given if really some internal error (inside
the Loader server) happens.
The interesting part is the -25345. I think there might still
be a problem in the CATALOGEXTRACT handling the default values
of single columns. Please check the default (using for instance
SQL Studio) of LOADIE_TEST column LT_KEY2 in your source system
and compare it to the command created by CATALOGEXTRACT. Is there
any difference in default values?
What version of Loader do you use (see loader.prt at the very beginning)?

The changed sequence of CATALOGLOAD and TABLELOAD will surely solve
the problem.

Regards,
 Steffen
-- 
Steffen Schildberg
SAP DB Team
SAP Labs Berlin
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to