PLS-00201: identifier UTIL_FILE must be declared

前端 未结 5 1144
忘了有多久
忘了有多久 2021-01-12 05:45

I\'m trying to export data from a query into a csv file from Oracle Enterprise Express installed on a Windows Server 2008 machine.

I\'ve found this solution:

5条回答
  •  难免孤独
    2021-01-12 06:18

    Seems like lack of privileges to me. Often PUBLIC user has EXECUTE privilege granted on that package, but the privilege may be revoked.

    You can check if PUBLIC has that privilege by issuing the following query:

    SELECT * FROM all_tab_privs WHERE grantee = 'PUBLIC' AND table_name = 'UTL_FILE';
    

    If there are no rows returned, try granting the execute privilege to either the user you are logged as, or to PUBLIC, as some privileged user, for example SYS:

    GRANT EXECUTE ON SYS.utl_file TO user_name;
    

    Edit

    You must grant the privilege while being logged as, for example, SYS user.

提交回复
热议问题