Question:
I need SQL Help with Oracle?
Amy
2012-11-21 15:01:57 UTC
Oracle keeps throwing me errors and I cant seem to figure out why?! please help!!!

1. Create a role and for its name, use the concatenation of your user account and the word “Role”. For instance, the role may be called JobesB_Role (where “JonesB” represents your user name).

CREATE ROLE JonesB_Role;

2. Grant to your role the system privileges that facilitate application development.
GRANT CREATE SESSION, CREATE TABLE, CREATE SEQUENCE,
CREATE VIEW, CREATE ROLE, CREATE PROCEDURE,
CREATE TRIGGER, CREATE TABLESPACE, CREATE SYNONYM,
INSERT ANY TABLE, ANALYZE ANY SELECT ANY DICTIONARY TO JonesB_Role;
error thrown saying im missing or invalid privilege...

Please help?!
Four answers:
Chris D
2012-11-21 15:17:40 UTC
The normal approach with this kind of issue is to split the line into smaller parts until it starts to work, and then whatever you've removed is the broken bit.



Does this work? -->

CREATE ROLE JonesB_Role;



Does this work? -->

GRANT CREATE SESSION TO JonesB_Role;



If it doesn't you've got a fundamental problem with the statements you've been given. If it does work then you can next GRANT CREATE TABLE TO JonesB_Role, and so on until you find one that doesn't work. At that point you go back and double-check the statement syntax - usually online.



(There are more efficient ways of tracking down the offending statement; a binary chop for one. But this slow and steady approach isn't that hard to do.)



Chris





** If you like this response please Thumbs Up and vote as Best Answer **
annan
2016-12-29 13:48:08 UTC
sq. is only a language. in case you opt for to artwork interior the international of relational databases, then you definately might desire to first get a solid comprehend-how of the relational sort and how it particularly is used in sq.. those foundations are an identical for all relational databases (Oracle, sq. Server, MYSQL, Postgres and so on). Then there are obtrusive significant variations interior the dialects utilized via each database (somewhat whilst it is composed of saved concepts), and much greater significant variations of their inner implementations (in truth interior the way the cope with concurrency and consistency, i.e. locking and transaction isolation). so a procedures as employment, i might say the two sq. Server and Oracle are appreciably used. the main considerable distinction is that sq. Server locks you interior the Microsoft international (it particularly is superb if that's what you like) while you will discover Oracle used in a much better form of systems (abode windows, Linux, Solaris, HP-UX; AIX, and so on). additionally Oracle has a tendency for use for larger, venture-extreme applications, while sq. Server has a tendency for use greater for greater convenient departmental applications.
kenzo2047
2012-11-22 06:18:18 UTC
This is definitely wrong:



ANALYZE ANY SELECT ANY DICTIONARY



There is no such privilege, and you are missing a comma. Try replacing with



ANALYZE ANY TABLE, SELECT ANY DICTIONARY
Dan
2012-11-21 16:25:23 UTC
Yeah - sounds like the teacher hasn't given you rights... I'd have a word if I were you!


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...