2
雖然試圖通過創建過程表,我面對錯誤,如Oracle過程 - AUTHID只允許在架構級別
錯誤(73,9):PLS-00157:AUTHID只允許對模式級方案
PROCEDURE BCKUP
AUTHID CURRENT_USER AS
statusmsg VARCHAR2(400);
BEGIN
--Backup records
EXECUTE IMMEDIATE 'CREATE TABLE schemaname.tabname AS SELECT pgm.* FROM XYZ pgm, IJK prf WHERE prf.col1=pgm.col1 AND prf.ID IN(SELECT ID FROM TAB2)';
COMMIT;
EXCEPTION WHEN OTHERS THEN
statusmsg :='SQL ERRROR CODE ' || SQLCODE|| ' -ERROR- ' ||SQLERRM;
dbms_output.put_line('ERROR : ' || statusmsg);
END BCKUP;
如果我刪除AUTHID CURRENT_USER,其編譯成功,但運行時卻面臨權限不足的錯誤。 – Madhu