Home
All Oracle Error Codes
Oracle DBA Forum

Frequent Oracle Errors

TNS:could not resolve the connect identifier specified
Backtrace message unwound by exceptions
invalid identifier
PL/SQL compilation error
internal error
missing expression
table or view does not exist
end-of-file on communication channel
TNS:listener unknown in connect descriptor
insufficient privileges
PL/SQL: numeric or value error string
TNS:protocol adapter error
ORACLE not available
target host or object does not exist
invalid number
unable to allocate string bytes of shared memory
resource busy and acquire with NOWAIT specified
error occurred at recursive SQL level string
ORACLE initialization or shutdown in progress
archiver error. Connect internal only, until freed
snapshot too old
unable to extend temp segment by string in tablespace
Credential retrieval failed
missing or invalid option
invalid username/password; logon denied
unable to create INITIAL extent for segment
out of process memory when trying to allocate string bytes
shared memory realm does not exist
cannot insert NULL
TNS:unable to connect to destination
remote database not found ora-02019
exception encountered: core dump
inconsistent datatypes
no data found
TNS:operation timed out
PL/SQL: could not find program
existing state of packages has been discarded
maximum number of processes exceeded
error signaled in parallel query server
ORACLE instance terminated. Disconnection forced
TNS:packet writer failure
see ORA-12699
missing right parenthesis
name is already used by an existing object
cannot identify/lock data file
invalid file operation
quoted string not properly terminated

Re: Why we should use bind variables when we write code......

Wolfgang Breitling

2006-09-20

Replies:
Just be sure to not go overboard and heed the warnings in the (Oracle10.1) Performance Tuning Guide:

"The shared pool is also able to support unshared SQL in data warehousing
applications, which execute low-concurrency, high-resource SQL statements. In this
situation, using unshared SQL with literal values is recommended. Using literal values
rather than bind variables allows the optimizer to make good column selectivity
estimates, thus providing an optimal data access plan."
and
"When bind variables are used in a statement, it is assumed that cursor sharing is
intended and that different invocations are supposed to use the same execution plan. If
different invocations of the cursor would significantly benefit from different execution
plans, then bind variables may have been used inappropriately in the SQL statement."

At 08:37 AM 9/19/2006, Bobak, Mark wrote:

So, last week, one of my instances starts getting ORA-4031s, and after a few minutes, comes crashing down when a background process (lmd0, I think it was) catches an ORA-4031.  So, with the instance down, it's a bit tough to see what happened.  So, we start things up again, and I start watching closely over the next few days.  Seems there's lots of code that doesn't bother with binds.  In some cases, there are a dozen non-sharable SQLs that are identical except for literals, in other cases, up to hundreds.  (Thanks to T.Kyte for the script that I'm using to identify non-sharable SQL.)  After a few days, I find the smoking gun.  One single SQL statement that has 3,424 copies that are identical except for literals.  (No, that's not a typo.)  This is taking up abour 75% of the 475M of shared pool that's dedicated to the sql area.  One single SQL statement, 75%.  Yikes!

So, now I'm on an education kick.  "This is the way we do things when we don't want to kill the Oracle database server!"

So, my question is, is there a resource, online or otherwise,  that has examples of proper bind variable usage in various languages?  I can cover C/Pro*C, PL/SQL, SQL*Plus, but what about Java, Perl, Python, etc,etc?  I'm not much of a coder lately, and I want proper examples that can be shown to developers, in whatever is the language of choice.

Regards

Wolfgang Breitling
Centrex Consulting Corporation
www.centrexcc.com