Re: Solaris 10 - problem with connect to Oracle 10.2.0.2 with ORA_SYSDBA



olwin wrote:
Sorry for my poor English.

After connect in SYSDBA to an Oracle 10.2.0.2 Database, all system
command return '-1' (No child processes).

Problem detect on a Solaris 10 x86 server :

Details :
perl -MDBI -e 'DBI->installed_versions'
Perl : 5.008006 (i86pc-solaris-thread-multi)
OS : solaris (2.10)
DBI : 1.42
DBD::Sponge : 11.10
DBD::Proxy : 0.2004
DBD::Oracle : 1.15
DBD::File : 0.30
DBD::ExampleP : 11.12
DBD::DBM : 0.01

It's a production server, I can't upgrade DBD::Oracle for the moment.
It's the first application on the server to use perl,others only use
shell/sqlplus

This code will show the problem :

use DBD::Oracle qw(:ora_session_modes);

my $dsn = "dbi:Oracle:"; # no dbname here
print "TWO_TASK not defined\n" if (not defined($ENV{TWO_TASK}));
print "ORACLE_SID : $ENV{ORACLE_SID} \n";

my $dbh = DBI->connect($dsn, "", "", { ora_session_mode =>
ORA_SYSDBA });
$dbh->{RaiseError} = 1;

my $sth = $dbh->prepare( "select sysdate from dual" );
$sth->execute();
my $date=$sth->fetchrow();
print "Date : $date \n";
$sth->finish();
$dbh->disconnect();

my $ret=system("date");

print "retour : $ret";


Result on my machine :
TWO_TASK not defined
ORACLE_SID : KJD00
Date : 30-JUL-08
mercredi, 30 juillet 2008, 14:32:22 MEST
retour : -1


Get you the same result as me?

At first glance it seemed to me that this has nothing to do with DBD::Oracle or DBI and did not belong on this list. However, you are using the system command and given it returns -1 it failed. If you use the system command like above, it forks, issues your command and does a wait for the child to exit (this may depend on SIGCHILD signal). The oracle client libraries fiddle with SIGCHILD handling - presumably because it wants to know a SIGCHILD signals. You probably want to return SIGCHILD behaviour back to the default but you should realise this may impact on the oracle client libraries. The following link might help explain some of this but I cannot recollect a definite solution for system in perl and Oracle:

http://www.easysoft.com/support/kb/kb00967.html

This link looks promising:

http://coding.derkeiler.com/Archive/Perl/perl.dbi.users/2008-06/msg00042.html

which mentions

BEQUEATH_DETACH = yes


Martin




.



Relevant Pages

  • Re: ADO request mistery
    ... I am running an application on a client machine (server 2003 sp2) that uses ... the oledb driver to execute ado command. ... The oracle has nls_language AMERICAN and nls_territory. ... The application is regularly executing an update command. ...
    (comp.databases.oracle.server)
  • Re: IMP-00058: ORACLE error 1017 encountered (invalid username/password)
    ... I am using Oracle for the 1st time. ... created by means of the export command. ... TABLESPACE SYSTEM TEMPORARY TABLESPACE TEMP QUOTA UNLIMITED ON SYSTEM; ... export server uses AL16UTF16 NCHAR character set (possible ncharset ...
    (comp.databases.oracle.server)
  • Re: IMP-00058: ORACLE error 1017 encountered (invalid username/password)
    ... I am using Oracle for the 1st time. ... created by means of the export command. ... TABLESPACE SYSTEM TEMPORARY TABLESPACE TEMP QUOTA UNLIMITED ON SYSTEM; ... export server uses AL16UTF16 NCHAR character set (possible ncharset ...
    (comp.databases.oracle.server)
  • Re: OracleClient connection pooling
    ... randomly and the only way to fix is reboot the server. ... GetObject(System.Object, Boolean ByRef) ... Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DBCommand­Wrapper command) ... And from the error message it look like that Oracle client database pooling ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: dcdiag - advertising errors on newley promoted domain controller
    ... Can you do the following on uksccmads01 ... The problem may actually have nothing to do with the new server but the ... From a command prompt try and see if you get any additional info ... Skipping site UK-CCM, this site is outside the scope ...
    (microsoft.public.windows.server.active_directory)