on 12-02-2014 10:58 AM
Hello All
I do not find how to export/import tables with slahes
i read that tables with slashes should be double-quoted in SQL statements.
with export/import command seems it doesn't work
here is my command :
hdbsql -U CLONE "EXPORT schema.'"/BDL/_GENER"' AS BINARY INTO '/mnt/SAP/clone/SID/BR' WITH REPLACE THREADS 12"
i try with '"/table"' or "/table" no way
always the error :
* 257: sql syntax error: incorrect syntax near "/BDL/_GENER": line 1 col 15 (at pos 15) SQLSTATE: HY000
any idea?
thank you very much for your help
regards
Patrice
As for Lars's suggestion:
It's -I option. i.e. a capital i, not a lowercase l !
Or in case you prefer to do without an input script:
Starting from the command in your original post, the correct way of Linux special character escaping is this:
hdbsql -U CLONE "EXPORT schema.\"/BDL/_GENER\" AS BINARY INTO '/mnt/SAP/clone/SID/BR' WITH REPLACE THREADS 12"
Mind the \" around your table name!
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're just hitting the limits of special character escaping in your shell.
Why don't you make your life easy and put the command into a script file that you then refer to with the -I option?
- Lars
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Lars
thank you fisrt for your reply.
i tried this with the -l option but without success.
i execute the command : hdbsql -U CLONE -l export.sql
i got the following :
Welcome to the SAP HANA Database interactive terminal.
Type: \h for help with commands
\q to quit
hdbsql=>
i have to press enter to get the DB prompt and then that's all, nothing else!?!
in my export.sql file i have the following:
EXPORT schema./BDL/_GENER AS BINARY INTO '/mnt/SAP/clone/SID/BR' WITH REPLACE THREADS 12
what do i do wrong?
can i get rid of this "hdbsql=>" prompt?
thank you for your help
best regards
Patrice
Have you tried your CLONE hdbuserkey to work properly?
Also: the double quotes for the / in your object names are still required.
So your export.sql should contain
EXPORT schema."/BDL/_GENER" AS BINARY INTO '/mnt/SAP/clone/SID/BR' WITH REPLACE THREADS 12
Also, I assume that you replace "schema" with the actual schema name, don't you?
yes my CLONE hdbuserkey work properly
example:
hdbsql -U clone "\s"
host : dtcgembwdbt01:30015
database : TB1
user : SAPRBW
kernel version: 1.00.74.04.393829
SQLDBC version: libSQLDBCHDB 1.00.74.04 Build 0393829-1510
autocommit : ON
locale : C
input encoding: UTF8
or hdbsql -U clone -x -a "select value from M_SYSTEM_OVERVIEW where name='Instance Number'"
work fine
so my export.sql file is like you said
but the result of my command hdbsql -U CLONE -l export.sql is
Welcome to the SAP HANA Database interactive terminal.
Type: \h for help with commands
\q to quit
hdbsql=>
why?
thank's
Patrice
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.