cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Sap hana import and export data using command line

Former Member
0 Likes
7,014

Hi,


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

Regards,

Gopal

View Entire Topic
Virendra_Raval
Product and Topic Expert
Product and Topic Expert
0 Likes

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 Likes

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 Likes

This message was moderated.