- 최신
- 최다 투표
- 가장 많은 댓글
Hello Rajdeep,
Logged in as ADMIN, I am able to create this procedure in my RDS instance. See below:
SQL> l
1 CREATE OR REPLACE PROCEDURE lock_expired_users AS
2 BEGIN
3 FOR user_rec IN (SELECT username FROM dba_users WHERE expiry_date < SYSDATE AND PROFILE='USER_ACCT')
4 LOOP
5 EXECUTE IMMEDIATE 'ALTER USER ' || user_rec.username || ' account lock password expire';
6 DBMS_OUTPUT.PUT_LINE('ALTER USER ' || user_rec.username || ' account lock password expire');
7 END LOOP;
8* END;
SQL> /
Procedure created.
You may want to check your session privileges (by running select * from session_privs) and see what privilege is lacking. Maybe if it is not immediately clear, you could run the same sql (select * from session_privs) from an ADMIN user and compare the output with that from your other user that is trying to create this procedure.
Hope this helps.
관련 콘텐츠
- AWS 공식업데이트됨 2년 전
- AWS 공식업데이트됨 3년 전