When does a database link connection is established?

208 views Asked by At

I have a DB link between 2 Oracle databases, and I have a procedure which in some cases it can query the remote database.

Now the docs say that a connection is opened per session when it appears in an SP, and my question is will it establish the connection when a statement has occured or since it appears in the compiled SP it will establish it once a call has been made to the procedure?

1

There are 1 answers

0
Yuri Levinsky On

The dblink is used during the compilation for a first time. When you call your sp the db link will create the connection and close the connection after you exit your session.