Oracle Database Administration I — Question 31
A script abc.sql must be executed to perform a job.
A database user HR, who is defined in this database, executes this command:
$ sqlplus hr/hr@orcl @abc.sql
What will happen upon execution?
Answer options
- A. The command succeeds and HR will be connected to the orcl and abc.sql databases
- B. The command succeeds and HR will be connected to the orcl database instance, and the abc.sql script will be executed
- C. The command fails because the script must refer to the full path name
- D. The command fails and reports an error because @ is used twice
Correct answer: B
Explanation
The correct answer is B because the command connects HR to the orcl database instance and executes the abc.sql script successfully. Option A is incorrect as it implies connection to two databases, which is not possible. Option C is wrong because the script can be executed without a full path if it's in the current directory. Option D is false as there is only one use of @ in the command.