UTL_FILE package包

第一步:以管理员用户登陆如:conn sys/password@sid as sysdba 第二步:设置可操作目录需要指定utl_file包可以操作的目录。在oracle 10g以前,可以用以下方法: 1、alter system set utl_file_dir='e:utl' scope=spfile; 2、在init.ora文件中,配置如下: UTL_FILE=E:utl或者UTL_FILE_DIR=E:utl 在oracle 10g中建议用以下方法配置:CREATE DIRECTORY utl AS 'E:utl'; 参见oracle online: In the past, accessible directories for the UTL_FILE functions were specified in the initialization file using the UTL_FILE_DIR parameter. However, UTL_FILE_DIR access is not recommended. It is recommended that you use the CREATE DIRECTORY feature, which replaces UTL_FILE_DIR. Directory objects offer more flexibility and granular control to the UTL_FILE application administrator, can be maintained dynamically (that is, without shutting down the database), and are consistent with other Oracle tools. CREATE DIRECTORY privilege is granted only to SYS and SYSTEM by default. 第三步:授权给指定用户,以便执行utl_file GRANT EXECUTE ON utl_file TO scott; 第四步:conn scott/tiger 就可以正常使用utl_file了。[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/27681/viewspace-963870/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/27681/viewspace-963870/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值