Ora-01008 from PL/SQL

Ora-01008 from PL/SQL

Post by Greg Akin » Tue, 22 Oct 2002 19:55:07



**** Post for FREE via your newsreader at post.usenet.com ****

Hi,

I've been getting an ORA-01008: Not all variables bound error while running
a PL/SQL block.  It happens whether I run from a stored procedure or from an
anonymous block.

I get the error on a 7.3.4 database, but not an 8.1.7.

The code is follows below.

Within the testcur cursor, I use strDatasource to pass a value.  The cursor
is where the error is occurring.  If I repalce strDatasource with a literal
string, the the error doesn't occur.  Any idea why this might be happening?
I looked through Metalink and the only references I could find were for
unrelated bugs and issues with bind variables.

Any help would be greatly appreciated.

-greg

======================================================================

CREATE or replace PROCEDURE testproc IS
 --Leveraged Facts Table
 v_bu_id DASHBD_DBA.LEVERAGED_FACTS.BU_ID%TYPE ;
 v_act_percentage DASHBD_DBA.LEVERAGED_FACTS.ACT_PERCENTAGE%TYPE;

 strDatasource varchar2(20) := 'LEV';
 strErrorType varchar2(50) := 'Load From Leveraged Staging Table';
 counter number ;

cursor testcur is SELECT v_bu_id, YEAR, QUARTER, sum(ACT_PERCENTAGE) as
v_act_percentage
   FROM (SELECT f_retrieve_bu(trim(BU_ID),strDatasource) v_bu_id,
   YEAR, QUARTER, ACT_PERCENTAGE
          FROM LEVERAGED_STAGING)
  group by v_bu_id, YEAR, QUARTER
  order by v_bu_id, YEAR, QUARTEr ;

BEGIN
 --Delete initial errors from the error table before executing
 delete from DASHBD_DBA.ERROR_LOG
 where datasource_name = strDatasource
 and UPPER(error_type) = UPPER(strErrorType);
    counter := 0 ;
 For LEV_FACTS in testcur loop
     BEGIN
     counter := counter + 1 ;
   if LEV_FACTS.v_bu_id <> 0 then
   dbms_output.put_line('Test '||v_bu_id) ;
    --INSERT INTO DASHBD_DBA.LEVERAGED_FACTS
       --  (BU_ID, YEAR, QUARTER, ACT_PERCENTAGE)
    --VALUES (LEV_FACTS.v_bu_id, LEV_FACTS.YEAR, LEV_FACTS.QUARTER,
LEV_FACTS.v_act_percentage);
   end if;
   END;
 end loop;
end testproc ;

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 *** Usenet.com - The #1 Usenet Newsgroup Service on The Planet! ***
                      http://www.usenet.com
Unlimited Download - 19 Seperate Servers - 90,000 groups - Uncensored
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

 
 
 

1. ORA-03106 alt. ORA-01008

Dear fellow netizens,

Please help me. I get some Oracle errors from my program. The errors are
ORA-03106 and more seldom ORA-01008. The environment where the program
is running is an AIX machine with Oracle ver 7.3.X and SNA server ver
3.1. The AIX version is 4.1.X.

My program is multi-threaded and I have a theory about the SNA
communication disturbing the Oracle handles and structs in memory. How I
don't know. The only thing I know is that if I disable all SNA and run
the program in "simulation"-mode it will run for days and weeks without
problem.

Have anybody had similar problems?

If you need more details about setup and program-structure, please

Thanks.

--
Mattias Wahlberg
Systems Programmer
Noventus Systems AB, Gothenburg, Sweden

Phone: +46-31-7208000
Fax: +46-31-7208010

2. changing primary key

3. sql loader and ora-01008 (cross posted to tools)

4. Scripting Options

5. SQL*Plus: COPY command, LONG datatype, and ORA-01008

6. WinNT + Filter = PDOXWIN ERROR !

7. ORA-01008: not all variables bound error in WebLOgic connection pooling

8. ORA-01008: not all variables bound .

9. help!!- jdbc prepared statement=error ora-01008

10. Urgent !!!! -- ORA-01008: not all variables bound

11. ORA-01008 not all variables bound ?