I am trying to run the Quest CodeGen Utility on an Oracle Express installation, but get the error “identifier ‘UTL_FILE’ must be declared”. Does UTIL_FILE exist in Oracle XE, or is this a GRANT issue?
We have a separate community to support CodeGen
http://codegen.inside.quest.com/product_info.jspa
UTL_FILE is a SYS. Package. Check to see what’s what with Toad.
Hi Rick,
I am trying to run the Quest CodeGen Utility on an Oracle
Express installation, but get the error "identifier
'UTL_FILE' must be declared". Does UTIL_FILE exist in
Oracle XE, or is this a GRANT issue?
I checked, UTL_FILE exists in XE and is owned by SYS. No-one has any
privileges granted to it though, not even SYSTEM.
You need to connect to SYS as sysdba and grant execute on utl_file to
your user in order to allow it to be used. A public synonym does exist
for it.
Cheers,
Norm. [TeamT]
Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else. We have checked this email and its attachments for viruses. But you should still check any attachment before opening it. We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes. If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk
Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else.
We have checked this email and its attachments for viruses. But you should still check any attachment before opening it.
We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes.
If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk
Also remember that using UTL_FILE requires an init.ora (spfile) parameter set to allow access to whatever directories will be left open or considered accessible for such access - and this is a known security issue (in fact the TOAD health check has a rule for this) …
Hi Bert,
Also remember that using UTL_FILE requires an init.ora
(spfile) parameter set to allow access to whatever
directories will be left open or considered accessible for
such access - and this is a known security issue (in fact
the TOAD health check has a rule for this) ....
I thought that from (I Release 2, that this was no longer required. You
no longer use a directory name on the server that matches a name in a
UTL_FILE parameter setting because from 9iR2, we have to CREATE
DIRECTORY ... and specify the path there. In calls to UTL_FILE the
directory name is passed.
Obviously, the oracle user on the server will need read and or write
access to any paths used in this manner, but the UTL_FILE parameter in
the init/spfile is no longer required.
Cheers,
Norm. [TeamT]
Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else. We have checked this email and its attachments for viruses. But you should still check any attachment before opening it. We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes. If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk
Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else.
We have checked this email and its attachments for viruses. But you should still check any attachment before opening it.
We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes.
If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk
It can still be done the old way but obviously using a DIRECTORY object is preferred since you don’t need to bother the DBAs about adding a UTL_FILE folder to a oracle parameter.
I think that “it depends” on what version of Oracle you are on. When we migrated
to 10g, exports no longer worked. O’course our DBA’s solution was the “correct”
use the Create Directory function…