eygle.com   eygle.com
eygle.com eygle
eygle.com  
 

« The Usage Of BFILENAME Function | Blog首页 | 使用SQL*PLUS,构建完美excel或html输出 »

How to use Oracle BFILE

如何使用Oracle的BFILE
1.创建相应的directory
使用具有足够权限的用处创建directory,具体参考:Using Create directory & UTL_FILE in Oracle
create or replace directory BDUMP_DIR as 
'/opt/oracle/admin/conner/bdump'; 

2.给相应的用户授权

grant read on directory BDUMP_DIR to eygle;

3.检查相应的文件是否存在

host ls -l /opt/oracle/admin/conner/bdump/alert_conner.log

4.数据操作

connect eygle/eygle create table eygle_test (id number, bfiles bfile ); insert into eygle_test values ( 1, bfilename ( 'BDUMP_DIR', 'alert_conner.log' ) );

BFILENAME函数用法参考:
The Usage Of BFILENAME Function
操作日志:

SQL> connect / as sysdba Connected. SQL> grant read on directory BDUMP_DIR to eygle; Grant succeeded. SQL> connect eygle/eygle Connected. SQL> host ls -l /opt/oracle/admin/conner/bdump/alert_conner.log -rw-r--r-- 1 oracle dba 1026 Apr 24 18:41 /opt/oracle/admin/conner/bdump/alert_conner.log SQL> create table eygle_test (id number, bfiles bfile ); Table created. SQL> insert into eygle_test values ( 1, bfilename ( 'BDUMP_DIR', 'alert_conner.log' ) ); 1 row created. SQL> commit; Commit complete.


历史上的今天...
    >> 2016-04-24文章:
    >> 2013-04-24文章:
    >> 2011-04-24文章:
    >> 2008-04-24文章:
           peer.exe 进程是什么?
    >> 2006-04-24文章:

无觅

By eygle on 2005-04-24 19:51 | Comments (1) | FAQ | 270 |

1 Comment

How to insert BFILE in oracle database?
How to run Multimedia File (BLOB) from oracle database, ORDSys.ORDAudio in visual basic 6.0?
Help Me please....1
Thanks


CopyRight © 2004~2020 云和恩墨,成就未来!, All rights reserved.
数据恢复·紧急救援·性能优化 云和恩墨 24x7 热线电话:400-600-8755 业务咨询:010-59007017-7040 or 7037 业务合作: marketing@enmotech.com