See below ...
 

----------------- 
Ron Reidy 
Senior DBA 
Array BioPharma, Inc. 
303.386.1480 

-----Original Message-----
From: Shah, Urmil [mailto:[EMAIL PROTECTED]
Sent: Friday, August 13, 2004 1:49 PM
To: [EMAIL PROTECTED]
Subject: RE: SQL- Insert problem



Here is the code if it helps.

I do not know how to run trace 10046 but I have put output from V$session_wait for my 
session.
[Reidy, Ronald] Not enough.  Do "alter session set events '10046 trace name context 
forever, level 8'" after your connection. 

 

 

 

my $dbh  = $db->connect("$graph_fab");

 

$sth1 = $dbh->prepare(qq{insert into temp values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}) or 
die"Cannot prepare sql:$DBI::errstr\n";

 

foreach my $type(sort keys %H_CNT_BY_PGM){

 foreach my $pgm(sort keys %{$H_CNT_BY_PGM{$type}}){

 

   my $string=$H_CNT_BY_PGM{$type}{$pgm};

  
($dev_type_err,$test_type_err,$lot_type_err,$temp_type_err,$rmenu_dev_type_err,$rmenu_test_type_err,$rmenu_lot_type_err,$rmenu_temp_type_err)=split(/,/,$string);

 

       print "Values to insert: 
$mydate,$site,$type,$pgm,$Tot,$Tot_yes,$Tot_rmenu,$dev_type_err,$test_type_err,$temp_type_err,$lot_type_err,$rmenu_dev_type_err,$rmenu_test_type_err,$rmenu_temp_type_err,$rmenu_lot_type_err\n\n";
    

 

       
$sth1->execute($mydate,$site,$type,$pgm,$Tot,$Tot_yes,$Tot_rmenu,$dev_type_err,$test_type_err,$temp_type_err,$lot_type_err,$rmenu_dev_type_err,$rmenu_test_type_err,$rmenu_temp_type_err,$rmenu_lot_type_err)
 or die"Cannot execute with values:$DBI::ERRSTR";                          

 

 }#foreach

}#foreach

 

print "Finished Inserting in temp\n";

 

$sth1->finish();  

$dbh->disconnect();

 

 

select * from v$session_wait

where sid=21

 


SID

SEQ#

EVENT

P1TEXT

P1

P1RAW

P2TEXT

P2

P2RAW

P3TEXT

P3

P3RAW

WAIT_TIME

SECONDS_IN_WAIT

STATE


21

59

enqueue

name|mode

1415053316

54580004

id1

262176

00040020

id2

417280

00065E00

0

141

WAITING

 

 

I will try to contact my DBA and get the 10046 trace but it will take some time. If 
its short and simple and if some one is willing to explain I can try to do it myself.

 

 

[Reidy, Ronald] Did you commit before trying to rename the table? 

 

 -- Currently I am just testing to see if my code works to populate the table. I did 
not change the name or did any commit. After I hit 'ok' button it populates all the 
data in db without any problems. I delete all the data "delete from temp" and then try 
to run the sql since there are some PK and unique value constraints.
[Reidy, Ronald] Get out of toad and run this.  

 

 

 

Urmil


This electronic message transmission is a PRIVATE communication which contains
information which may be confidential or privileged. The information is intended 
to be for the use of the individual or entity named above. If you are not the 
intended recipient, please be aware that any disclosure, copying, distribution 
or use of the contents of this information is prohibited. Please notify the
sender  of the delivery error by replying to this message, or notify us by
telephone (877-633-2436, ext. 0), and then delete it from your system.

Reply via email to