Oracle 重新获取Request URL
Oracle的Request运行完成后,可以将URL发邮件给指定的用户,但会限制这个URL只能打开一次,无法再次打开,当提交Rqeust的人不方便,并且收URL邮件的人与提交人不是同一个时,就有些悲剧了。
所以就需要可以在后台重新产生URL(也可以方便IT人员查看用户运行的报表):
注:需要比较大的权限才可以运行,比如APPS
提醒:这个权限大,可能会造成查看了不应该看到的Request数据,慎用 !!!
select fcr.request_id
,fcr.output_file_type
,fcr.last_update_date
,fcr.actual_start_date
,fcr.actual_completion_date
,(select fu.user_name
from apps.fnd_user fu
where fu.user_id = fcr.requested_by
) requested_by
,apps.fnd_webfile.get_url(file_type => 4 -- fnd_webfile.request_out
,id => fcr.request_id -- concurrent request id
,gwyuid => 'applsyspub/pub'
,two_task => 'fcww'
,expire_time => 1000
) output_url
--,fcr.*
from apps.fnd_concurrent_requests fcr
where 1 = 1
--and fcr.ofile_size > 0
and fcr.phase_code not in ('P')
and fcr.request_id = &request_id
order by request_date desc
;
其中file_type参数说明如下:
* file_type - Specifies the type of file desired:
* fnd_webfile.process_log = The log of the concurrent process identified by the parameter ID.
* fnd_webfile.icm_log = The log of the ICM process identified by ID. Or, the log of the ICM process that spawned the concurrent process identified by ID. Or, the log of the most recent ICM process if ID is null.
* fnd_webfile.request_log = The log of the request identified by ID.
* fnd_webfile.request_out = The output of the request identified by ID.
* fnd_webfile.request_mgr = The log of the concurrent process that ran the request identified by ID.
* fnd_webfile.frd_log = The log of the forms process identified by ID.
* fnd_webfile.generic_log = The log file identified by ID.
* fnd_webfile.generic_trc = The trace file identified by ID.
* fnd_webfile.generic_ora = The ora file identified by ID.
* fnd_webfile.generic_cfg = The config file identified by ID.
* fnd_webfile.context_file= The context file identified by ID.
* fnd_webfile.generic_text= Generic file using text transfer mode.
* fnd_webfile.generic_binary = Generic file using binary transfer mode.
* fnd_webfile.request_xml_output = The XML output of Concurrent Request.
浙公网安备 33010602011771号