Hello,
I am trying to write a script that will take the contents of one SAPDB
on one server and copy it to another on a given interval.  I have been
using repmcli with mixed results.  The script I tried - copied it from
this very newsgroup is the following:
SET MAXERRORCOUNT 50
//
USE USER dba dba SERVERDB ocmis ON localhost
//
CATALOGEXTRACT USER OUTFILE 'c:\cat.sql'
//
TABLEEXTRACT USER DATA OUTSTREAM file 'c:\dat1.dat'
//
USE USER dba dba SERVERDB tst74 ON 1.1.1.1
//
TABLELOAD USER DATA INSTREAM FILE 'c:\dat1.dat'
//
CATALOGLOAD USER INFILE 'c:\cat.sql'

which leads to this output (on the screen):

C:\Program Files\sapdb\depend\bin>repmcli -d ocmis -u dba,dba -b
repli_data.dat
Opened connection to Loader SERVER at node local host.
Loader Server Protocol File:    'C:\Program
Files\sapdb\indep_data\wrk\loader.prt'

User DBA connected to database OCMIS on local host.
SET MAXERRORCOUNT 50
Successfully executed

USE USER dba dba SERVERDB ocmis ON localhost
Successfully executed

CATALOGEXTRACT USER OUTFILE 'c:\cat.sql'
Successfully executed

TABLEEXTRACT USER DATA OUTSTREAM file 'c:\dat1.dat'
Successfully executed

TABLELOAD USER DATA INSTREAM FILE 'c:\dat1.dat'
Error during execution
-->-25504
Error reading file 'c:\dat1.dat': Invalid handle.

Defined maximum number of errors (1) reached


1 error(s) during execution of command file 'repli_data.dat'. ---> See log file(s) for more information.


Some error(s) occurred running command. ---> See log file(s) for more information.

the loader.prt has this content:

// M    ReplMan   7.4.3    Build 010-120-035-462
// *
// M    ReplMan   instance started at MACINTYRE for database OCMIS
// *
// M    Starting protocol at 2003071400211332
// *
// *
// *
// M    START    20030714    00211332
// *
set
// *
// M    START    20030714    00211332
// *
USE USER "DBA" * SERVERDB "OCMIS"
// *
// M    USER:    'DBA'    on DB:    'OCMIS'
// *
// M    START    20030714    00211332
// *
SET MAXERRORCOUNT 50

// *
// M    START    20030714    00211332
// *
USE USER dba * SERVERDB ocmis ON localhost

// *
// M    Releasing user connection (USER: 'DBA').
// *
// M    USER:    'DBA'    on DB:    'OCMIS'
// *
// M    START    20030714    00211332
// *
CATALOGEXTRACT USER OUTFILE 'c:\cat.sql'

// *
// M    LOAD TRANSFORMATIONPACKAGE
x'010000003CE623F5780B0000184D0000810D707C30E719AC'
// *
// M    Number of tables   to transform: 82
// *
// M    Number of views    to transform: 58
// *
// M    Number of synonyms to transform: 0
// *
// M    EXECUTE PACKAGE TO TRANSFORM CATALOG
// *
// M    Number of tables   transformed : 90
// *
// M    Number of views    transformed : 1
// *
// M    Number of synonyms transformed : 0
// *
// M    UNLOAD TRANSFORMATIONPACKAGE
x'010000003CE623F5780B0000184D0000810D707C30E719AC'
// *
// M    START    20030714    00211336
// *
TABLEEXTRACT USER DATA OUTSTREAM file 'c:\dat1.dat'

// *
// M    LOAD TRANSFORMATIONPACKAGE
x'0200000040E623F5780B0000184D0000810D707C30E719AC'
// *
// M    Number of tables   to transform: 82
// *
// M    Number of views    to transform: 58
// *
// M    Number of synonyms to transform: 0
// *
// M    CONFIGURE  TRANSFORMATIONPACKAGE
// *
// M    EXECUTE PACKAGE TO TRANSFORM DATA
// *
// M    Number of tables   transformed : 49
// *
// M    UNLOAD TRANSFORMATIONPACKAGE
x'0200000040E623F5780B0000184D0000810D707C30E719AC'
// *
// M    START    20030714    00211338
// *
USE USER dba * SERVERDB tst74 ON 1.1.1.1

// *
// M    Releasing user connection (USER: 'DBA').
// *
// M    USER:    'DBA'    on DB:    'TST74'
// *
// M    START    20030714    00211338
// *
TABLELOAD USER DATA INSTREAM FILE 'c:\dat1.dat'

// *
// M    LOAD TRANSFORMATIONPACKAGE
x'0300000042E623F5780B0000184D0000810D707C30E719AC'
// *
// M    Number of tables   to transform: 74
// *
// M    Number of views    to transform: 57
// *
// M    Number of synonyms to transform: 0
// *
// M    CONFIGURE  TRANSFORMATIONPACKAGE
// *
// E -25502:    Error opening file 'c:\dat1.dat': wrong file or device name.
// E -25504:    Error reading file 'c:\dat1.dat': Invalid handle.
// M    Releasing user connection (USER: 'DBA').
// *

////////////////////////////////////// END OF REPORT
///////////////////////////////////////////////
As far as I can tell the objects (tables, sequences,etc) get generated
correctly, the data gets left behind.
Also, I made the mistake of making all of the object (tables,seq,etc)
belong to the default dba user created when I created the instance.  Is
there a way to change the ownership?

Would using DBEXTRACT be better? I basically want to create a clone of
my DB...
Thank you.
MIchael MacIntyre
BTW: love SAPDB, to bad it's going under GPL :-(



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

Reply via email to