VINOTH ENERGETIC
VINOTH ENERGETIC

Reputation: 1843

Why SQL Engine is called for PL/SQL call from client application?

In my application, am just calling the stored procedure for database related activities.

I have already posted one question here for performance related queries.

Rob Mascaro answered my queries, and there is an statement in his answer like

*Each PLSQL call within your C++ app call invokes the SQL engine which then invokes the PLSQL engine for the procedure call*

And my question is why sql engine need to be called while calling the PL/SQL? Why can't my client application directly call the PL/SQL engine for processing the PL/SQL?

Upvotes: 0

Views: 122

Answers (1)

Rob Mascaro
Rob Mascaro

Reputation: 851

The SQL engine doesn't always need to be called - it depends on the client and whether the client has the PLSQL engine embedded in it. For instance, Oracle Forms has an embedded PLSQL engine therefore when calling a PLSQL procedure, the whole call can be passed to the engine and no context switching occurs. However with PRO*C you are always executing SQL statements which then execute "blocks" of PLSQL call like this:

begin
   call_proc;
end;

This has invoked the SQL parser which then switches to the PLSQL engine as soon as the "begin" anonymous block is executed. This is just the way the client is architected. SQL*Plus is similar, you run the SQL engine to call the PLSQL blocks.

Upvotes: 2

Related Questions