Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2004
    Location
    New York
    Posts
    45

    Unanswered: 2 sessions executing same procedure same time

    Hello. I have a problem with procedure.

    if 2 sessions executing same procedure at kind of same time could be this a reason that some tables that have to be created by procedure are not created. The proc first runs deletion on this tables?

    Is there a lock I can put to prevent it?
    And how?

    Thank you

    A

  2. #2
    Join Date
    Mar 2004
    Posts
    19
    Will you please specify with a piece of code?
    -------------
    Pragati Swain

  3. #3
    Join Date
    Feb 2004
    Location
    New York
    Posts
    45
    Originally posted by pragatiswain
    Will you please specify with a piece of code?
    Create proc ....
    as

    ddl_str varchar2(4000);

    begin

    begin

    apadmin.drop_tlb; --drop all tables

    exception
    when no_data_found then
    null;
    when others
    then
    dbms_output.put_line('when other exception:'||SQLCODE);
    raise;
    end;

    ddl_str := 'create table a as select ...';
    ddl_exec( ddl_str );

    ddl_str := 'create table b as select ...';
    ddl_exec( ddl_str );

    ddl_str := 'create table c as select ...';
    ddl_exec( ddl_str );


    ddl_str := 'create table d as select ...';
    ddl_exec( ddl_str );



    dbms_output.put_line( 'Done at ' || to_char(sysdate, 'mm-dd-yyyy hh24:mi:ss'));


    end;


    this proc is executing trough vb app.

    User came to me saying that he doent have a table
    when I start executing a proc on my end trough sqlplus, error come up:
    table or view does not exist/

    How could it be?

    Thank you.

    A

  4. #4
    Join Date
    Feb 2004
    Location
    New York
    Posts
    45
    Hello, another thing I have with a proc, after executin it all my tables are deleted ???

    What possible could it be .

    Thank you.

    A

  5. #5
    Join Date
    Mar 2004
    Posts
    19
    Do you really need to execute the procedure with 2 Instances?
    Why both the sessions need to create same set of tables?
    -------------
    Pragati Swain

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •