Hi Aki,

Aki Karjalainen [mailto:[EMAIL PROTECTED] wrote:
> 
> I've been trying to figure out what's the best (quick, 
> compact etc.) way to dump database (tables, indexes, data) 
> and import it to a different database which has the same 
> table structure but different name, size, users etc?
> 
> I managed to do it this way:
> 
> 1. Do a catalog extract to a file.
> 2. Do a CSV dump of all the tables (pain in the ass if there 
> is hundreds of tables...DATAEXTRACT * FROM MYTABLE1 OUTFILE...)
> 3. Create new database
> 4. Rename database in catalog dump file if needed (new database name)
> 5. Do a catalogload to import table structure and indexes.
> 6. Do data load on all the CSV data files (again, pain in the 
> as if there's many tables).
> 
> 
> I bet there's an easier way?
> 
You won!
But it depends ;-)
If only db name and size are different DBEXTRACT/DBLOAD could be
your choice. This does all the catalog and data
transport for you. I'm sure the Loader docs tell at least something
about the syntax.
In case the user names are different too, you should use
CATALOGEXTRACT USER/CATALOGLOAD USER and TABLEEXTRACT USER/TABLELOAD USER.
The first pair transports the definitions, the second the data.
Well, for the syntax same as above applies.
 
Is this what you were looking for?
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