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

Jarek Jarcec Cecho commented on SENTRY-262:
-------------------------------------------

MySQL and PostgreSQL scripts seems to be working after the change, but Oracle 
is complaining:

{code}
Error starting at line 73 in command:
ALTER TABLE "SENTRY_DB_PRIVILEGE"
  ADD INDEX "SENTRY_PRIV_SERV_IDX" ("SERVER_NAME")
Error report:
SQL Error: ORA-00904: : invalid identifier
00904. 00000 -  "%s: invalid identifier"
*Cause:    
*Action:
Error starting at line 76 in command:
ALTER TABLE "SENTRY_DB_PRIVILEGE"
  ADD INDEX "SENTRY_PRIV_DB_IDX" ("DB_NAME")
Error report:
SQL Error: ORA-00904: : invalid identifier
00904. 00000 -  "%s: invalid identifier"
*Cause:    
*Action:
Error starting at line 79 in command:
ALTER TABLE "SENTRY_DB_PRIVILEGE"
  ADD INDEX "SENTRY_PRIV_TBL_IDX" ("TABLE_NAME")
Error report:
SQL Error: ORA-00904: : invalid identifier
00904. 00000 -  "%s: invalid identifier"
*Cause:    
*Action:
Error starting at line 82 in command:
ALTER TABLE "SENTRY_DB_PRIVILEGE"
  ADD INDEX "SENTRY_PRIV_URI_IDX" ("URI")
Error report:
SQL Error: ORA-00904: : invalid identifier
00904. 00000 -  "%s: invalid identifier"
*Cause:    
*Action:
{code}

I'm not an Oracle expert, but perhaps we have to use the {{CREATE INDEX}} 
clause instead? The following query works for me:

{code}
CREATE INDEX  "SENTRY_DB_PRIVILEGE_IDX" ON "SENTRY_DB_PRIVILEGE" 
("SERVER_NAME");
{code}

> Updating patch for SENTRY-178
> -----------------------------
>
>                 Key: SENTRY-262
>                 URL: https://issues.apache.org/jira/browse/SENTRY-262
>             Project: Sentry
>          Issue Type: Bug
>    Affects Versions: 1.4.0
>            Reporter: Arun Suresh
>              Labels: grant/revoke
>             Fix For: db_policy_store
>
>         Attachments: SENTRY-262.1.patch, SENTRY-262.2.patch
>
>
> This is a follow up ticket for the patch for 
> [SENTRY-178|https://issues.apache.org/jira/browse/SENTRY-178]



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to