Skip to Content
0

Unable to write to OS using EXPORT in Hana Express Edition VM

Jun 03, 2017 at 07:01 PM

100

avatar image
Former Member

Hi,

My hdbsql EXPORTs fail systematically with error 12 below.

Tried /tmp, even a /hanatemp chmod'ed to 777 to avoid OS user/group restrictions - all to no avail :-(

IMPORT works like a charm if I create a .csv file in e.g. /tmp.

Export command used:

hdbsql=> export mytable as csv into '/tmp/qaz.txt' ;
* 12: cannot open file: Cannot open the path /tmp/qaz.txt SQLSTATE: HY000

This is a seriously blocking issue as I want to set up an easy EXPORT/IMPORT based mechanism to init and reset schemas.

I hope someone can shed some light on this...

Rgds,

PeterDH

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Florian Pfeffer
Jun 04, 2017 at 05:03 AM
0

As the message says, the defined path cannot be open. The error message comes up, because you did define a file instead of just a path. The export command does not allow to define a specific file, because the generated files (not a single file, because the structure and content data is exported) are named automatically.

Regards,
Florian

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

OMG - that was really too easy ; yet there I was chmod'ing and stuff while the error stared me in the face :-(

Thank you so much Florian for pointing this out - as an Oracle DBA doing my first steps in the Hana-world I thought I had spotted the similarity with Oracle's EXPDP/IMPDP commands but the simple fact that a PATH has to specified rather than a FILE had escaped my attention...

Lesson learnt by self: RTFM - and if it doesn't work, RTFM again before bothering the experts ;-)

Kind regards,

Peter

0