set autotrace on; echo on; select * from emp;Which process is responsible for executing both of the statements?
SET AUTOTRACE ON and SET ECHO ON are SQL*Plus commands. They are not executed in the database. They only tell the SQL*Plus application how to do certain things. This is entirely handled within SQL*Plus. So your SQL*Plus executable is responsible for these statements.
A command like "SELECT * FROM EMP;" is also handled by SQL*Plus. But SQL*Plus recognizes this as a SQL statement. So SQL*Plus passes the SQL statement to the database. In return, SQL*Plus gets data back and shows the data on the screen.
For More Information
- Dozens more answers to tough Oracle questions from Brian Peasland are available.
- The Best Oracle Web Links: tips, tutorials, scripts, and more.
- Have an Oracle or SQL tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize. Submit your tip today!
- Ask your technical Oracle and SQL questions -- or help out your peers by answering them -- in our live discussion forums.
- Ask the Experts yourself: Our SQL, database design, Oracle, SQL Server, DB2, metadata, object-oriented and data warehousing gurus are waiting to answer your toughest questions.
Dig Deeper on Oracle and SQL
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.