English 中文(简体)
在Oracle程序中进行多读
原标题:Implementing Multithreading in Oracle Procedures

我正在就Oracle 10gR2开展工作。

我的问题是:

我有一份程序,请打电话*proc_other*。 (在一揽子方案中)本应称为另一种程序,请打电话* 用户_ 娱乐*。 我不得不在座右栏内打上*user_production*,读上表上的一些栏目,这些栏值作为参数传到*user_production*程序。

这部法典就是这样:

FOR i IN (SELECT    community_id,
                        password,
                        username 
               FROM     customer 
               WHERE    community_id IS NOT NULL 
               AND      created_by =  SRC_GLOB 
              )
     LOOP
        user_creation (i.community_id,i.password,i.username);
     END LOOP;

COMMIT;

用户-申请程序正在以某种业务逻辑为由使用网络服务,然后根据答复更新表格。

我需要找到一种办法,使我能够在这里进行多面阅读,以便我能够利用这一程序来加快事情。 我知道,我可以使用*DBMS_SCHEDULER*,并可能使用*DBMS_ALERT*,但我无法说明如何在座右边使用。

谁能指导我正确方向?

Thanks, Ankur

最佳回答

我愿结束这一问题。 DBMS_SCHEDULER 以及DBMS-JOB(尽管优先选择DBMS_SCHEDULER)可在休息室内用于提交和执行工作。

例如,此处采用可在休息室内援引的房舍管理处-JOB样本代码:

...
FOR i IN (SELECT community_id,
                 password,
                 username
          FROM   customer
          WHERE  community_id IS NOT NULL
          AND    created_by =  SRC_GLOB 
         )
LOOP
DBMS_JOB.SUBMIT(JOB => jobnum,
                WHAT =>  BEGIN user_creation (i.community_id,i.password,i.username); END;       
COMMIT;
END LOOP;   

SUBMIT之后使用的承诺将同时放弃工作(并因此成为程序)。

问题回答




相关问题
Export tables from SQL Server to be imported to Oracle 10g

I m trying to export some tables from SQL Server 2005 and then create those tables and populate them in Oracle. I have about 10 tables, varying from 4 columns up to 25. I m not using any constraints/...

Connecting to Oracle 10g with ODBC from Excel VBA

The following code works. the connection opens fine but recordset.recordCount always returns -1 when there is data in the table. ANd If I try to call any methods/properties on recordset it crashes ...

How to make a one to one left outer join?

I was wondering, is there a way to make a kind of one to one left outer join: I need a join that matches say table A with table B, for each record on table A it must search for its pair on table B, ...

Insert if not exists Oracle

I need to be able to run an Oracle query which goes to insert a number of rows, but it also checks to see if a primary key exists and if it does, then it skips that insert. Something like: INSERT ALL ...

How can I store NULLs in NOT NULL field?

I just came across NULL values in NOT-NULL fields in our test database. How could they get there? I know that NOT-NULL constraints can be altered with NOVALIDATE clause, but that would change table s ...

Type reference scope

I m studying databases and am currently working on a object-relational DB project and I ve encountered a small problem with the number of possible constraints in an object table. I m using "Database ...

OracleParameter and DBNull.Value

we have a table in an Oracle Database which contains a column with the type Char(3 Byte). Now we use a parameterized sql to select some rows with a DBNull.Value and it doesn t work: OracleCommand ...

热门标签