cancel
Showing results for 
Search instead for 
Did you mean: 

Error when Exporting on Hana cluster when connecting to secondary

Former Member
0 Kudos

We are running into an error when trying to run the export sql command while connected to a secondary host. In this case hana108 is the primary and hana109 is the secondary and the directory we are exporting to is shared between hosts:

hdbsql=> \c -i 00 -n hana108:30015;hana109:30015;hana110:30015 -u CC41 -p ********

Connected to A01@hana108:30015

hdbsql A01=> export "CC41"."*" AS CSV INTO '/usr/sap/A01/HDB00/work' WITH REPLACE THREADS 4

0 rows affected (4956.225 msec)

hdbsql A01=> \di

Connection closed

hdbsql=> \c -i 00 -n hana109:30015;hana108:30015;hana110:30015 -u CC41 -p ********

Connected to A01@hana108:30015

hdbsql A01=> export "CC41"."*" AS CSV INTO '/usr/sap/A01/HDB00/work' WITH REPLACE THREADS 4

* 8: invalid argument: No objects to export found in given schema(s) SQLSTATE: HY000

We also see this error when issuing the command in JDBC when specifying all host names in the connect string.

Accepted Solutions (0)

Answers (1)

Answers (1)

rindia
Active Contributor
0 Kudos

Hi,

hdbsql=> \c -i 00 -n hana109:30015;hana108:30015;hana110:30015 -u CC41 -p ********

Connected to A01@hana108:30015

hdbsql A01=> export "CC41"."*" AS CSV INTO '/usr/sap/A01/HDB00/work' WITH REPLACE THREADS 4

* 8: invalid argument: No objects to export found in given schema(s) SQLSTATE: HY000

Above it is connected to primary host hana108, not to secondary host hana109.

I am not very much sure of this but why not export the objects from single host multiple times.

Regards

Raj

Former Member
0 Kudos

Hi Raj,

Thanks for your response.

For our application we are running the command with jdbc and use the full connection string listing all hosts. When using jdbc we are getting this error whenever we list all hosts. We need to do this because we have a requirement for high availability where an active node (including the primary) could be a failover node.

Otherwise we would have to run a query to figure out what the actual primary is and have a different connection url for export from our normal jdbc url.

Thanks,

Jason