[ 
https://issues.apache.org/jira/browse/HIVE-19686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16488209#comment-16488209
 ] 

Alan Gates commented on HIVE-19686:
-----------------------------------

Removing the "select for update" in the query to get the largest catalog id 
should fix this.  This select for update was just to prevent an error, but is 
redundant since the catalog id is the primary of the table and thus no 
duplicates will be allowed anyway.

> schematool  --createCatalog option fails when using Oracle as the RDBMS
> -----------------------------------------------------------------------
>
>                 Key: HIVE-19686
>                 URL: https://issues.apache.org/jira/browse/HIVE-19686
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>    Affects Versions: 3.0.0
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>            Priority: Major
>             Fix For: 3.0.1
>
>
> Attempts to use the schematool --createCatalog option when the metastore is 
> using Oracle result in
> {code:java}
> SQL Error code: 1786
> org.apache.hadoop.hive.metastore.HiveMetaException: Failed to add catalog
> at 
> org.apache.hive.beeline.HiveSchemaTool.createCatalog(HiveSchemaTool.java:941)
> at org.apache.hive.beeline.HiveSchemaTool.main(HiveSchemaTool.java:1459)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.apache.hadoop.util.RunJar.run(RunJar.java:308)
> at org.apache.hadoop.util.RunJar.main(RunJar.java:222)
> Caused by: java.sql.SQLSyntaxErrorException: ORA-01786: FOR UPDATE of this 
> query expression is not allowed
> at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450)
> at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399)
> at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1059)
> at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:522)
> at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:257)
> at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:587)
> at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:210)
> at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:30)
> at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:762)
> at 
> oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:925)
> at 
> oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1111)
> at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1309)
> at 
> oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:422)
> at 
> org.apache.hive.beeline.HiveSchemaTool.createCatalog(HiveSchemaTool.java:926)
> ... 7 more
> *** schemaTool failed ***{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to