Home » SQL & PL/SQL » SQL & PL/SQL » Unable to grant Admin privileges on SQL Developer 12c (Oracle SQL Developer 12c)
icon5.gif  Unable to grant Admin privileges on SQL Developer 12c [message #666757] Fri, 24 November 2017 01:26 Go to next message
Dave0001
Messages: 2
Registered: November 2017
Junior Member
Hi All,

Newbie here. Installed SQL Developer 12c on Windows 10. Having trouble giving myself admin privileges to CREATE, UPDATE and DELETE tables. Can you please help? Have tried a few things at random found online but have not been able to get past this hurdle. Appreciate your help.

Regards
Re: Unable to grant Admin privileges on SQL Developer 12c [message #666758 is a reply to message #666757] Fri, 24 November 2017 01:32 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
To grant CREATE TABLE to yourself you must something like DBA (actually have the GRANT ANY PRIVILEGE privilege), so ask a DBA to grant it to you.
You need no privileges to UPDATE or DELETE your own tables as you are the owner and have all privileges on your objects.

See GRANT in SQL Reference book.

[Updated on: Fri, 24 November 2017 01:33]

Report message to a moderator

Re: Unable to grant Admin privileges on SQL Developer 12c [message #666759 is a reply to message #666758] Fri, 24 November 2017 01:50 Go to previous messageGo to next message
Dave0001
Messages: 2
Registered: November 2017
Junior Member
Thanks Michel.

This is at home. I am able to login using sysdba on the backend thu cmd but that hasnt helped. Any alternatives?
Re: Unable to grant Admin privileges on SQL Developer 12c [message #666760 is a reply to message #666759] Fri, 24 November 2017 01:58 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What do you call "myself"? You should create a user and grant certain privileges so that you could connect to it and, actually, do something. Here's how: connect as a privileged user (SYS) and check which tablespace(s) you have, and then use them in CREATE USER script:
SELECT tablespace_name FROM dba_tablespaces;

CREATE USER dave IDENTIFIED BY dave
  DEFAULT TABLESPACE user_data
  TEMPORARY TABLESPACE temp
  PROFILE DEFAULT
  QUOTA  UNLIMITED ON user_data;

GRANT CREATE SESSION TO dave;
GRANT CREATE TABLE TO dave;
GRANT CREATE PROCEDURE TO dave;

After you do that (and verify that user has been created), you can connect to it (either via SQL*Plus or SQL Developer) and try to, for example, create a table, insert data into it, ....

Once you find out that you need another privilege, connect as SYS again and grant yourself what you need (such as "GRANT CREATE VIEW TO dave").
Re: Unable to grant Admin privileges on SQL Developer 12c [message #666761 is a reply to message #666759] Fri, 24 November 2017 02:01 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Quote:
thu cmd but that hasnt helped.
This does not help in any way to know what could be your problem.
Tell us, or better SHOW us, what you did and got.

Re: Unable to grant Admin privileges on SQL Developer 12c [message #666762 is a reply to message #666760] Fri, 24 November 2017 02:02 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Quote:
connect as SYS again
NO! Never connect a&s SYS to do something that can be done by another account.
The first thing to do after creating a database is to create an account and grant it DBA role and then after that always use this account to manage your users and their privileges.

Re: Unable to grant Admin privileges on SQL Developer 12c [message #666763 is a reply to message #666762] Fri, 24 November 2017 02:20 Go to previous message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
True and I agree with you, that should be the best practice. Perhaps I shouldn't have said that at all, but hey - that's the life.

I'm just a developer so those smart DBA things are managed by someone else. On my own computer & in my own XE database I simply use SYS.
Previous Topic: Drop Function gives error
Next Topic: Oracle Sub-query and AND clause behaviour
Goto Forum:
  


Current Time: Thu Apr 18 17:42:09 CDT 2024