현상
실행계획 등을 조회하기 위해 set autotrace on 을 사용할 때 권한 문제로 인하여 확인할 수 없는 현상이 발생하였습니다.
에러 코드는 다음과 같습니다.
TBS-70035: Unable to display plan: check PLUSTRACE role.
SQL
복사
원인
유저에게 plustrace 권한이 부여되지 않아 발생한 현상입니다.
해결
유저에게 plustrace 권한을 부여하여 에러를 해결합니다.
1. plustrace.sql 실행 (DBA 권한 필요)
$TB_HOME/scripts/plustrace.sql 를 DBA 권한을 가진 유저로 수행합니다.
--plustrace.sql
drop role plustrace;
create role plustrace;
grant select on vt_autotracestat to plustrace;
grant select on v$sql_plan to plustrace;
grant select on v$sql_plan_statistics to plustrace;
grant plustrace to dba with admin option;
SQL
복사
2. 수행 후 plustrace 권한 부여
grant plustrace to [USER];
SQL
복사