Database/Oracle

Oracle profile, user, role조회

리밍 2024. 3. 21. 16:14

 

 

DBA는 유저 관리, 권한 부여가 중요하다. 

 

Profile 암호관리 

오라클에서는 프로파일로 암호를 관리 제어 할수 있음 

-계정 잠금

-암호 수명, 기간만료 

-암호이력

-암호 복잡성 검증 

 

 

*암호 설정 방법

-프로필을 사용자에게 지정하여 암호를 관리 할수 있음 

create profile scott_password
 limit falied_login_attempts 3 -> 로그인 실패 횟수
 password_life_time 30         -> 기간 마료일
 password_refuse_time 30    ->암호가 재사용될 때까지의 날수 
 password_verify_fuction verify_function ->복합성 검사를 수행할 pl/sql
 password_grace_time 5 ;  -> 유예기간 

 

 

 

 

*암호할당 

alter user scott
 profile scott_password ;


-암호할당 조회
select username,profile from dba_users where username='scott';


-프로파일 조회
select * from dba_profiles;
select username,profile from dba_users;

 

 

USER조회 

select * from dba_users;


-user계정생성 및 권한 부여 

create user u123 identified by "u123" profile 프로파일이름;
grant connect to u123;


-user삭제 
drop user u123 cascade;

 

 

ROLL조회

select * from dba_role_privs where grantee ='유저명';

 

 

 

참고 

http://www.gurubee.net/lecture/1725