Creare user in Oracle

Configurare noua (How To)

Situatie

Se doreste crearea unui user ce are drepturi depline pe bazele de date Oracle.

Ulterior acest user se va folosi pentru a crea backup-ul bazelor de date.

Solutie

Pasi de urmat

 De pe serverul de baze de date se deschide un command promt ca si administrator.

 

Se  creaza un script cu esxtensia “sql”  ce va avea urmatoarea structura: 

sys/oracle@orcl as sysdba

grant select on v_$session to public;
CREATE USER “USER ” PROFILE “DEFAULT” IDENTIFIED BY “Password” DEFAULT TABLESPACE “USER_DATA” TEMPORARY TABLESPACE “TEMPORARY_DATA” ACCOUNT UNLOCK;
GRANT ALTER ANY TRIGGER TO “USER”;
GRANT ALTER SESSION TO “USER”;
GRANT ANALYZE ANY TO “USER”;
GRANT CREATE ANY INDEX TO “USER”;
GRANT CREATE ANY SEQUENCE TO “USER”;
GRANT CREATE ANY TABLE TO “USER”;
GRANT CREATE ANY TRIGGER TO “USER”;
GRANT CREATE ANY VIEW TO “USER”;
GRANT CREATE SEQUENCE TO “USER”;
GRANT DELETE ANY TABLE TO “USER”;
GRANT DROP ANY INDEX TO “WIZCOUNT”;
GRANT DROP ANY SEQUENCE TO “USER”;
GRANT DROP ANY TABLE TO “USER”;
GRANT DROP ANY TRIGGER TO “USER”;
GRANT EXECUTE ANY PROCEDURE TO “USER”;
GRANT GRANT ANY PRIVILEGE TO “USER”;
GRANT INSERT ANY TABLE TO “USER”;
GRANT SELECT ANY SEQUENCE TO “USER”;
GRANT SELECT ANY TABLE TO “USER”;
GRANT UNLIMITED TABLESPACE TO “USER” WITH ADMIN OPTION;
GRANT UPDATE ANY TABLE TO “WIZCOUNT”;
GRANT “CONNECT” TO “USER” WITH ADMIN OPTION;
GRANT “DBA” TO “USER” WITH ADMIN OPTION;
GRANT “RESOURCE” TO “USER”;

exit;

 

Scriptul va crea un user cu username : “User” si parola “Password”.

Prin optiunile Grand se vor aloca drepturi pentru acest user.

 In command promtul deschis in pasul anterior se va scrie urmatoarea comanda

sqlplus

Aceasta ne va deschide consola serverului de Oracle.

 

In linie de comanda se va scrie comanada :

@ calea unde s-a salvat scriptul creat in pasul anterior

 

Tip solutie

Permanent

Voteaza

(18 din 53 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?