cancel
Showing results for 
Search instead for 
Did you mean: 

Sap hana import and export data using command line

Former Member
0 Kudos

Hi,


We want to import and export the data in sap hana database using command line syntax not from hana-studio.

Regards,

Gopal

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member184768
Active Contributor

Hi Gopal,

You can use the EXPORT and IMPORT SQL statements from the command line HDBSQL.

Regards,

Ravi

Former Member
0 Kudos

Hi Ravi,

"Thanks for your timely reply but I didn't find the response to be relevant to my requirement.

FYI  I am able to import single table but unable to import bulk data's using command prompt.

While exporting a database, 4 different of files(including control file) are created.

 

Would like to confirm if the functionality is this or is it possible to import multiple table data's or import database with a single command in command prompt."

Regards,

Gopalakrishnan.V

virendra_raval
Explorer
0 Kudos

Hi..

My question is related with this thread,

We are trying to export the schema through the following steps get error in step 3 in below.

1. ssh to machine which has SAP HANA installed

2. hdbsql -n localhost:30015 -u system -p password

3. EXPORT "SCHEMA_NAME"."*" AS BINARY INTO '/home/hanauser/hana-database-backups/'

* 258: insufficient privilege: Not authorized SQLSTATE: HY000


When I checked the system user, it does have export and import privilege so why is it failing complaining about privilege?


Note: The same operation works successfully through UI.  (export option in HANA studio).

lbreddemann
Active Contributor
0 Kudos

The user that should perform the export needs to have the SELECT privilege on the tables to be exported as well. See the documentation on this: GRANT - SAP HANA SQL and System Views Reference - SAP Library.

Besides, that's the only way that makes any sense, isn't it? You don't want users that aren't allowed to see the data to be able to export it, just to read it then, won't you?

0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi

do you mean this ?

Loading data using CTL method:

http://www.saphana.com/docs/DOC-2192

Regards.

Liu