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?
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
The correct answer is B. The command succeeds and HR will be connected to the orcl database instance, and the abc.sql script will be executed.
The sqlplus command is used to connect to an Oracle database and execute SQL statements. The @ symbol is used to specify a script file to be executed.
In the command $ sqlplus hr/hr@orcl @abc.sql, the user HR is connecting to the orcl database instance and specifying the abc.sql script to be executed.
The command will succeed and HR will be connected to the orcl database instance and the abc.sql script will be executed.
B is correct. I tried it in my personal environment and it worked. What happens is that the hr user connects to the orcl instance and then executes the sql script successfully.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
you1234
Highly Voted 4 years agoYifan_
6 months, 2 weeks agoama
4 years agoEkos
3 years, 7 months agoLalala8
Most Recent 10 months, 1 week agodoyinbare
11 months agoOracle2020
11 months, 2 weeks agoOracle2020
11 months, 2 weeks agoauwia
1 year, 1 month agoRaNik69
1 year, 2 months agoLeandroHPN
2 years agoryuah
2 years, 1 month agoGuhborges
1 year, 4 months agoauwia
1 year, 1 month agodanito
4 years, 1 month agoGuhborges
2 years, 8 months agoama
4 years ago