Toad for Oracle 11.6. Login in as user that only have Connect, create session and create any table privileges. Getting "Error occurred: [933] (ORA-00933: SQL command not properly ended"
Steps to replicate after login to Toad with user that only have Connect privilege.
1. Go in the Schema Browser
2. Right click on the Schema name and select USER TO LOAD | Load only user that own objects excluding synonym and temporary tables.
3. Error occurred: [933] (ORA-00933: SQL command not properly ended
4. Click on OK and is able to continue.
5. Get the error when login to Toad too if the option
- Then login to the same db with a user that has DBA privilege, no error.
,
Workaround:
None
Waiting for fix in future version of Toad for Oracle.
ADDITIONAL INFORMATION:
So in Toad 11.5.2, the was working fine. Seem to be a syntax issue with 11.6.
Incorrect query that Toad 11.6 ran, got from SQL Tracker when login as user with only Connect, create session and create any table privileges
/* Formatted on 10/19/2012 10:41:50 AM (QP5 v5.227.12220.39724) */
SELECT username
FROM sys.ALL_USERS a
WHERE EXISTS
(SELECT owner
FROM sys.ALL_OBJECTS
WHERE owner = a.username AND object_type <> 'SYNONYM')
AND NOT ( (object_type = 'TABLE') AND (temporary = 'Y'))
AND NOT ( (object_type = 'INDEX') AND (temporary = 'Y'))
)
order by username
Error occurred: [933] (ORA-00933: SQL command not properly ended
Removing the end paren ")" after " and object_type <> 'SYNONYM') " fixes your code. The corrected code is shown below:
/* Formatted on 10/19/2012 10:41:50 AM (QP5 v5.227.12220.39724) */
SELECT username
FROM sys.all_users a
WHERE EXISTS
(SELECT owner
FROM sys.all_objects
WHERE owner = a.username
AND object_type <> 'SYNONYM'
AND NOT ( (object_type = 'TABLE') AND (temporary = 'Y'))
AND NOT ( (object_type = 'INDEX') AND (temporary = 'Y')))
ORDER BY username
Using Toad 11.5.2 with the same user with only Connect, create session and create any table privileges ran the query below with no error.
/* Formatted on 10/19/2012 10:38:14 AM (QP5 v5.227.12220.39724) */
SELECT username
FROM sys.all_users a
WHERE EXISTS
(SELECT owner
FROM sys.all_objects
WHERE (owner = a.username)
AND (object_type <> 'SYNONYM')
AND NOT ( (object_type = 'TABLE') AND (temporary = 'Y'))
AND NOT ( (object_type = 'INDEX') AND (temporary = 'Y')))
ORDER BY username
© ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center