What is the UTL_FILE Oracle supplied package?
What is the UTL_FILE Oracle supplied package?
Rating:
The UTL_FILE Oracle supplied package provides the capability to perform I/O operations on a text file from within PL/SQL. Client-side security implementation uses normal operating system file permission checking. Server-side security is implemented through restrictions on the directories that can be accessed. Only those directories that are listed in the UTL_FILE_DIR initialization parameter of the init.ora file are accessible to the UTL_FILE package.
By using the functions and procedures provided in the package, a user can open files, get text from files, put text into files, and close files. There are seven exceptions declared in the package to account for possible errors raised during execution.
Before using the UTL_FILE package to read from or write to a text file, it can be checked (by using the IS_OPEN function of the UTL_FILE package) whether or not the text file is open. If the file is not open, it must be opened (by using the FOPEN function of the UTL_FILE package) before read or write operations can be performed on the file. At the end of the operation, the file must be closed (by using the FCLOSE procedure of the UTL_FILE package).
Rating:
Other articles
- What is the USER_OBJECTS data dictionary view?
- What are parameter modes?
- What are the restrictions regarding the overloading of subprograms?
- How is a trigger compiled?
- What is an INSTEAD OF trigger?