Oracle EBS伺服器目錄配置

2021-06-25 23:19:15 字數 1452 閱讀 9231



伺服器目錄配置

1、建立伺服器目錄

(1)在system使用者下執行如下命令:

create

orreplace

directory

mail_file_dir

as'/mail_file/data/prod'

; (2)給建立的目錄賦許可權,執行:

grant

read

,write

ondirectory

mail_file_dir

topublic

; 如果是雙節點的伺服器,在兩個伺服器上執行上述sql語句

2、在資料庫伺服器上建立

/mail_file/data/prod目錄

切換到主目錄'/'下執行建立目錄命令

目錄建立完成後在主目錄'/'下執行賦許可權命令:chmod 777 /mail_file/data/prod

3、向目錄下寫入檔案

declare

fhandle utl_file.file_type;

begin

fhandle := utl_file.fopen(

'mail_file_dir'

,  

'example.txt'

,'w'

);utl_file.put_line(fhandle,

'gh test write one'

);utl_file.put_line(fhandle,

'gh test write two'

);utl_file.fclose(fhandle);

end;

4、讀出檔案的內容

declare

fhandle   utl_file.file_type;

fp_buffer

varchar2

(4000

);begin

fhandle := utl_file.fopen(

'mail_file_dir'

,'example.txt'

,'r'

);utl_file.get_line(fhandle, fp_buffer);

dbms_output.put_line(fp_buffer);

utl_file.get_line(fhandle, fp_buffer);

dbms_output.put_line(fp_buffer);

utl_file.fclose(fhandle);

end;

報錯:

ora -

29283

: 檔案操作無效

ora-

06512

: 在"sys.utl_file", line

449ora

-29283

: 檔案操作無效

原因:在資料庫下面沒有目錄或者目錄沒有賦讀寫許可權

ntp服務restrict ntp伺服器配置問題

1.配置 etc ntp.conf,內容如下 restrict default nomodify notrap restrict 127.0.0.1 mask 255.0.0.0 開放本機的任何訪問 restrict 192.168.1.0 mask 255.255.255.0 nomodify r...

mysql伺服器配置單 mysql伺服器配置

net stop mysql net start mysql 第二招 登陸mysql 語法如下 mysql u使用者名稱 p使用者密碼 mysql的提示符是 mysql 注意,如果是連線到另外的機器上,則需要加入乙個引數 h機器ip 第三招 增加新使用者 格式 grant 許可權 on 資料庫.to...

ibm tivoli Tivoli目錄伺服器

ibm tivoli 存檔日期 2019年5月15日 首次發布 2008年4月23日 本文實際上討論了目錄管理員需要了解的有關啟用聯機備份所需的歸檔日誌記錄方法的所有內容。如果要對目錄進行聯機備份,則必須配置資料庫事務日誌的歸檔日誌記錄。但是,歸檔日誌記錄是不切實際的,除非您建立適當的流程來管理日誌...