cancel
Showing results for 
Search instead for 
Did you mean: 

Importing without original schema owner

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

pfefferf
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi Florian ,

  Can i  know the  business use case of this import?. In general , we will use it in every project?. Sorry if this question is  very basic , i am in  process  of learning HANA

pfefferf
Active Contributor
0 Kudos

Hi Rajesh,

I would say no. I used it never in a production scenario, only for demo and test purposes.

Regards,

Florian