What is the outcome?

View Exhibit1 and examine the structure of the employees table.

User SCOTT needs to generate a text report that contains the names of all employees and their
salaries.
Examine the following commands issued by the DBA:
SQL_CREATE DICTORY my_dir AS ‘/temp/my_files* ;
SQL_GRANT WRITE ON DIRECTORY my_dir TO SCOTT;
View Exhibit2 and examine the procedure code. You issue the following command:

You issue the following command:
SQL_EXEC sal_5tatus (‘MY_DIR’, ‘EMPREPORT.TXT’)
What is the outcome?

View Exhibit1 and examine the structure of the employees table.

User SCOTT needs to generate a text report that contains the names of all employees and their
salaries.
Examine the following commands issued by the DBA:
SQL_CREATE DICTORY my_dir AS ‘/temp/my_files* ;
SQL_GRANT WRITE ON DIRECTORY my_dir TO SCOTT;
View Exhibit2 and examine the procedure code. You issue the following command:

You issue the following command:
SQL_EXEC sal_5tatus (‘MY_DIR’, ‘EMPREPORT.TXT’)
What is the outcome?

A.
It executes successfully andcreates the report.

B.
It gives an error because the text file should be opened in append mode.

C.
It gives an error because the “no data found” condition is not handled to come out of the loop.

D.
It gives an error because user SCOTT should be granted both read and write privileges to the
directory alias.

E.
It executes but no data is written to the text file because the FFLUSH subprogram is not used to
write all the data buffered in memory to a file.



Leave a Reply 5

Your email address will not be published. Required fields are marked *