Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

How can I create a "root" (like on MySQL) in Oracle?

I installed Oracle database on my system, for homework, for school (faculty) but it didn't give me the option to make a root user. Well at least I don't think so.

It asked me on preparation for install to create a password but when I tried connecting with the id and password it failed. (So that is why I presume it did not make a root user)

Connected on the databse with connect /as sysdba but don't know how to create a user with admin privileges.

Tried

create user "user" identified by "password" with grant option;

(error)

create user "user" identified by "password";

(succes)

grant all on "user" with grant option;

(error)

I want to have all privileges on all tables, etc.

share|improve this question

migrated from stackoverflow.com Apr 21 '13 at 20:27

This question came from our site for professional and enthusiast programmers.

    
possible duplicate of Create user with admin option oracle 11g command not working - rather than blindly trying things out from other databases, please search. –  Mat Apr 21 '13 at 18:01
    
I searched on Google(its a search engine) and it was pointing to oracle documentations and blogs so....that is why I asked –  adi Apr 21 '13 at 18:28
1  
The link above, which answers your question, is the top Google result (thanks, I have a vague idea of what Google is) for 'oracle create admin user'. So you didn't use google enough. Also you didn't to read the Oracle docs, which you should have done. –  Mat Apr 21 '13 at 18:30
2  
Read the Oracle Server Concepts manual. Trying to use Oracle, an enterprise grade RDBMS, when coming from a MySQL background is a big step up. You'd do we'll to forget what you know about MySQL, start from scratch and read some Oracle books. –  Phil Apr 21 '13 at 22:49
    
Thank you for tips Phil, but I'll use Oracle SQL for class only and to finish the stuff I start at classes. For own actual and future projects and stuff I will stay focused on MySQL. –  adi Apr 22 '13 at 9:22

2 Answers 2

up vote 2 down vote accepted

you first need to connect as root to the database, then you create the admin user.

console

connect /as sysdba

sql

create user admin identified by secret
grant dba to admin 
conn admin/secret
share|improve this answer
    
it worked thank you –  adi Apr 21 '13 at 18:27
    
@adi If this answered your question please "accept" it. –  BryceAtNetwork23 Apr 21 '13 at 23:39

As far as the database is concerned, the most powerful user is the one connected as sysdba. As you have seen and by default, you can connect as sysdba locally using connect / as sysdba. While it is advisable to create another user for your work, a new user only granted the DBA role will have fewer privileges than / as sysdba.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.