Links
Home
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
4031 - errors

4031 - errors

2004-06-08       - By Niall Litchfield

Reply:     <<     31     32  

In c#

using System;
using System.Data;
using Oracle.DataAccess.Client;
using Oracle.DataAccess.Types;

namespace Oranet4
{
   /// <summary >
   /// Summary description for Class1.
   /// </summary >
   class Class1
   {
      /// <summary >
      /// The main entry point for the application.
      /// </summary >
      [STAThread]
      static void Main(string[] args)
      {
         //
         // TODO: Add code to start application here
         //
         // assume we have a valid connection, etc...
         // create a basic connect string to connect to our standard database
         string connStr = "User Id=scott;Password=tiger;Data Source=oranet ";
         OracleConnection conn = new OracleConnection(connStr);
         try
         {
            conn.Open();
            OracleCommand cmd = new OracleCommand();
            cmd.Connection=conn;
            cmd.CommandText= "select * from emp ";
            cmd.FetchSize = 10000;
         
            OracleDataReader rdr = cmd.ExecuteReader();

            while (rdr.Read())
            {
               Console.WriteLine(rdr.GetOracleString(1));
            }

            conn.Close();
            conn.Dispose();

         }
         catch (OracleException ex)
         {
            Console.WriteLine(ex.Message);
            conn.Dispose();
   
         }
   
      }
   }
}


Note I 'm calling dispose on the Connection object at the end of my
code, and in my exception handler. This just tells the .net garbage
collector to clean up after me as I 'm done with the connection object.
Every object has a dispose method.

The code is written against the Oracle Data Provider but only the
getOracleString method used to return the enames is not available in
the ms provider - use getstring there.

HTH

Niall Litchfield
Oracle DBA
http://www.niall.litchfield.dial.pipex.com

On Mon, 7 Jun 2004 16:22:29 -0400, Fedock, John (KAM.RHQ)
<john.fedock@(protected) > wrote:
>
> Kathy,
>
> Can you comment on #2 listed below (the dispose parameter). Where is it set at?
>
> Thanks
>
> John
>
>
> -- --Original Message-- --
> From: Duret, Kathy [mailto:kduret@(protected)]
> Sent: Wednesday, June 02, 2004 5:04 PM
> To: 'oracle-l@(protected) '
> Subject: RE: 4031 - errors
>
> OK - here are some things that contributed to my problems and woes:
>
> 1) we set cursor_space_for_time = false - had been set to true for some
> prepared statements we were running
> this also gave us a bonus where it fixed leaks from update across
> db_links and heterogeneous services (not my idea ok, I lost the fight
> reminder to self to get bigger boxing gloves)
>
> 2) .net - set the dispose parameter..... release alot of resources,
> especially with cursors, has to do with the garbage collection
> there is also another parameter to adjust so connections for connection
> pooling don 't hang on forever
> Apparently microsoft sets it to infinity...haven 't played with it yet.
>
> 3) The other choke, gasp, dba had alot of dbms_outputs in procedure,
> functions except that he moved into production instead of commenting them
> out.
> one procedure that called another function which called another
> function, had more than 20 of these things. And yes same person who is
> updating
> across the links.....
>
> 4) I still have to look into the shared_pool_reserve and letting go there.
> I didn 't want to change too many things at once... Didn 't want to
> cause other problems.
>
> I have some other issues to look into but this seems to have helped 80% of
> my problems. The other 20% well, let 's just say I am encouraging him to
> find another position.......
>
> Thanks to everyone for the help.
>
> Kathy
>
> This transmission contains information solely for intended recipient and may
> be privileged, confidential and/or otherwise protect from disclosure. If
> you are not the intended recipient, please contact the sender and delete all
> copies of this transmission. This message and/or the materials contained
> herein are not an offer to sell, or a solicitation of an offer to buy, any
> securities or other instruments. The information has been obtained or
> derived from sources believed by us to be reliable, but we do not represent
> that it is accurate or complete. Any opinions or estimates contained in
> this information constitute our judgment as of this date and are subject to
> change without notice. Any information you share with us will be used in
> the operation of our business, and we do not request and do not want any
> material, nonpublic information. Absent an express prior written agreement,
> we are not agreeing to treat any information confidentially and will use any
> and all information and reserve the right to publish or disclose any
> information you share with us.
> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
> To unsubscribe send email to: oracle-l-request@(protected)
> put 'unsubscribe ' in the subject line.
> --
> Archives are at http://www.freelists.org/archives/oracle-l/
> FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
> To unsubscribe send email to: oracle-l-request@(protected)
> put 'unsubscribe ' in the subject line.
> --
> Archives are at http://www.freelists.org/archives/oracle-l/
> FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
>
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe send email to: oracle-l-request@(protected)
put 'unsubscribe ' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --