The customer has a client application (Oracle OBIEE 12) connecting to Vertica 9.2 using a JDBC connection. They need to set some parameters in the session before the query, but there is a limitation in the client that do not allow to run queries starting with ALTER or SET. The Oracle support has a workaround (for oracle JDBC driver), placing the non-query statements inside a BEGIN...END block, this works in the oracle database. They tried this approach in the Vertica JDBC driver, but got this error message: [Vertica]JDBC Exactly one result expected, but 3 results created from query "BEGIN; ALTER SESSION SET UDPARAMETER module = 'OBIEE', client_identifier = 'muriveira'; END;" They tried to reproduce this error using a sample java application, using the "Statement.executeUpdate()" function, and got the same error message. They used MARS: Properties.put("MultipleActiveResultSets", "true"); but nothing changes, got the same error message. They used the JDBC versions 9.2.1, 9.3.0 and latest 9.3.1, all with same behavior. Is there some way to run a BEGIN...END block in the executeUpdate() function? Like this: Statement.executeUpdate("BEGIN; ALTER SESSION SET UDPARAMETER module = 'OBIEE', client_identifier = 'amelo00g0'; SET ROLE TP_USR_3; END;") Is this a Vertica JDBC driver limitation? Can it be improved in a future release?
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.