Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation not working with SAP HANA #103

Closed
pitwegner opened this issue Sep 22, 2020 · 1 comment · Fixed by #122
Closed

Validation not working with SAP HANA #103

pitwegner opened this issue Sep 22, 2020 · 1 comment · Fixed by #122
Labels
bug an unexpected problem or unintended behavior

Comments

@pitwegner
Copy link

pitwegner commented Sep 22, 2020

Hi, we just realized that the library fails queries using jdbc on a HANA database. The validation query "SELECT COUNT (*) FROM SYSTABLES" (DBI-pool.R, Line 46) fails in HANA because the table does not exist. It is rather "SYS.TABLES" or "SYS_TABLES" instead.

Minimal example:

pool_sap <- pool::dbPool(
  drv = RJDBC::JDBC(driverClass="com.sap.db.jdbc.Driver", classPath="/opt/jdbc/ngdbc.jar"),
  url = "jdbc:sap://db.url.de:30015/?autocommit=false",
  user = "user",
  password = "pwd"
)
result <- pool::dbGetQuery(pool_sap, "select * from table_smth;")
Error: Object does not appear to be valid. Error message: Validation not successful -- Unable to retrieve JDBC result set
  JDBC ERROR: SAP DBTech JDBC: [259] (at 21): invalid table name:  Could not find table/view SYSTABLES in schema user: line 1 col 22 (at pos 21)
  Statement: select count(*) from systables
In addition: Warning message:
It wasn't possible to activate and/or validate the object. Trying again with a new object. 
@pitwegner
Copy link
Author

Also setting validateQuery to something like SELECT 1 results on the same error. So somehow the other validations are performed nevertheless.

marcosci added a commit to marcosci/pool that referenced this issue Feb 14, 2021
@hadley hadley added the bug an unexpected problem or unintended behavior label Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants