Header Ads Widget

Module 05: Using Oracle-Supplied Packages in Application


Using Oracle-Supplied Packages in Application 


01. What are The Oracle-supplied packages?

The Oracle-supplied packages: 

a. Are provided with the Oracle server.

b. Extend the functionality of the database.

c. Enable access to certain SQL features that are normally restricted for PL/SQL.

 

02. Write down the Examples of Some Oracle-Supplied Packages.

Oracle-supplied packages:

a. DBMS_OUTPUT

b. UTL_FILE

c. UTL_MAIL

d. DBMS_ALERT

e. DBMS_LOCK

f. DBMS_SESSION

g. DBMSAPPLICATIONINFO

h. HTP

i. DBMSSCHEDULER

 

03. How the DBMS_OUTPUT Package Works?

The DBMS_OUTPUT package enables you to send messages from stored subprograms and triggers. 

a. PUT and PUT_LINE place text in the buffer. 

b. GET_LINE and GET_LINES read the buffer. 

c. Messages are not sent until the sending subprogram or trigger completes.

04. Write down Using the UTL_FILE Package to Interact with Operating System Files.

Ans: The UTL_FILE package extends PL/SQL programs to read and write operating system text files: 

a. Provides a restricted version of operating system stream file I/O for text files 

b. Can access files in operating system directories defined by a CREATE DIRECTORY statement:

CREATE DIRECTORY reports_dir AS 'home/oracle/labs/pulp/reports'


05. What Is the UTL_MAIL Package?

UTL_MAIL Package:

a. A utility for managing email.

b. Requires the setting of the SMTP_OUT_SERVER database initialization parameter.

c. Provides the following procedures: 

i. SEND for messages without attachments.

ii. SEND_ATTACH_RAW for messages with binary attachments.

iii. SEND_ATTACH_VARCHAR2 for messages with text attachments.

Post a Comment

0 Comments