Skip to Content
avatar image
Former Member

Importing without original schema owner

Hello,

If I export with the following statement:

export <SCHEMA_A>."*" as BINARY into '<DIRECTORY>' with replace threads 16;

I then copy the export files to another SAP HANA instance where I don't have a <SCHEMA_A>, how would I import it ? Is the <SCHEMA_A> prefix required ? Does it get created automatically like when a rename schema option is executed ?

import <SCHEMA_A>."*" as BINARY from '<DIRECTORY>' with replace threads 16;

Is having the original schema mandatory ? What if the original schema was dropped but the export files still exist ?

Thank you in advance,

/gxo13

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Apr 15, 2016 at 04:44 AM

    As you said you can use the RENAME SCHEMA option to rename your schema for the import.

    If you have exported for example a schema "MYSCHEMA1" and wanna import is as "MYSCHEMA2" you can do it like following:

    IMPORT "MYSCHEMA1"."*" FROM 'my_import_path' WITH RENAME SCHEMA MYSCHEMA1 TO MYSCHEMA2;

    The schema is created automatically.

    You can also check SAP HANA Academy - EXPORT/IMPORT: Using With Rename Schema option during import - YouTube to see it in action.

    Regards,

    Florian

    Add comment
    10|10000 characters needed characters exceeded