Table or Record Locked

Hi
     I am building a batch process (with INSERT and UPDATES), When I Did Test worked fine,
but now others people testing, It is very slow, seem that some table/record is locked, is there some
way for to out with exception when time is Elapsed
thanks

It can be any one of numerous problems and issues - ranging from a poor design, forcimg serialisation where not needed, to a badly written code or even a minor bug with major impact.
Can you narrow down to where in the code is slow? If not, then consider using DBMS_PROFILER to profile the PL/SQL code - this will point you to the source code that is "the slowest".

Similar Messages

  • Record locks created when user closes the Browser and not the Web Form

    Hi. We sometimes encounter the issue where a user updates a record, locking the record on the table, but then they unexpectedly closes the browser without saving by clicking the X in the upper-right of the browser window. Then when another user comes along and attempts to edit that record they get the message Unable to Reserve Record. The orphaned record lock eventually does seem to clear itself out, but that can often take 15-20 minutes.
    Is there any way to speed this up? Or to pragmatically keep this from occurring? Either on the database side or with some code in a particular application?
    Please let me know your thoughts. Thanks in advance.

    If a user closes the browser window the forms runtime on the application server holding the locks is in most cases still up and running. The FORMS_TIMEOUT controls on how long a forms runtime on the server is up and running without the client applet not sending a heartbeat (See MOS note 549735.1). By default this is 15 minutes which would explain your locks being held 15 minutes.
    You could decrease the FORMS_TIMEOUT in the default.env, so the forms runtimes get cleaned earlier and thus the locks get released earlier.
    Note that if you have blocking client_hostcalls with webutil this might be a problem, as it prevents the forms applet from sending the heartbeat and after the FORMS_TIMEOUT passed while the forms applet is blocked the forms runtime on the server gets closed.
    cheers

  • Error -2038: Record locked by another transaction / Internal error occured

    Hi, sometimes when I'm trying to update a SO via DI API, I got this error -2038. The error message varies, either: "Internal error occured" or "Record locked by another transaction". Ffor 'record locked' error, the table/field names varies, eg.
    [RDR1.ItemCode][line: 7]
    [RDR12.TaxId8][line: 1]
    [WTR1.ItemCode][line: 1]
    [RDR1.ItemCode][line: 9]
    [RDR1.ItemCode][line: 3]
    [RDR12.TaxId2][line: 1]
    [RDR12.CityS][line: 1]
    Any idea what the problem might be? FYI I'm using PL41, and this DI calls are from a centralized 'handler' VB.NET program. I've also released the instantiated BO objects via System.Runtime.InteropServices.Marshal.ReleaseComObject() (http://support.microsoft.com/kb/317109)
    Thanks.

    David: what do you mean by 'S-User for the Marketplace'? I think I'm not an S-User, so I still can't login... How can I be an S-User?
    Anyway, I'll close this question, even though it's not really solved. I can't find any other user updating the same document, but that -2038 errors still pop up.
    Currently I'm using John's approach to retry whenever I got -2038. As long as it works and everybody's happy I guess...
    Thanks everybody.

  • Record Lock

    Hi all,
       I have requirement like this. For one table i have created table maintainance generator. For data maintainance i have created one Transaction code. while one user is using that TCODE to update data for one record if another try to update another record it is not possible the total table is lock untill first user completes updating.
      But now my requirement is if one user is updating first record then another user also want access to update second record. That means record lock in table maintainance generator tcode.
    Awaiting for reply.
    Thanks & Regards,
    Swetha.

    Hi Swetha,
    Doesn't sound like a good idea from data consistency point of view, but you can give it a try using the event After locking/unlocking in the main function module by creating a form  of your own. But I'm not sure if the current record that is being processed would be visible there or not.
    Check this [link|http://help.sap.com/saphelp_47x200/helpdata/en/a1/e45217a2f511d1a5630000e82deaaa/frameset.htm] for details about events.
    KR,
    Advait

  • 32 bit Record Locking on 64 bit Novell Client 2 SP1 for Wind

    I recently installed several 64 bit Windows 7 Machines running Novell Client 2 SP1 for Windows 7.
    Our application uses 32 bit record locking in order to maintain compatibilty with a wide array of workstations.
    The problem is as follows:
    Machine A is runnning 64 bit Novell Client 2 SP1 for Windows 7
    Machine B is running 32 bit Windows XP (Client doesn't really seem to matter).
    Using Machine A, I open a table, and lock a record.
    Using Machine B, I attempt to open the same table.
    Machine B received and Error 33 - The process cannot access the file because another process has locked a portion of the file.
    When I change my application to use 64 bit record locking, the problem goes away.
    Luis

    I see that there is a better place for my post:
    OES: Client - Windows - NOVELL FORUMS
    I have posted there as well.

  • OLAP Statistics table RSDDSTAT is locked

    I am working on BW 3.1C and my issue is:
    The OLAP Statistics table RSDDSTAT is locked due to some data base rollback activities. When users execute the query, it is first hitting the statistics table and since it is already locked, I am getting -913 sql short dumps. In order to avoid this, I have used the following option:
    RSA1 --> Tools --> BW Statistics for Infoprovider.
    I have unchecked all data targets. When I ran the query in RSRT/RSRT2, the query gets successfully executed without hitting the statistics table.
    But when I tried to execute the query from Web, it is hitting the statistics table which again causing me short dumps. Is there any Tcode where I can turn-off the statistics settings. Please mention that I am in 3.1C version and do not have T.code RSDDSTAT.
    Please let me know how to resolve this issue?

    Hi,
    In BI 7 there's a table RSDDSTATOBJLEVEL which we can decide record statistics or not.. Can you try to whether it exist in your machine? I don't have BW 3.x system at hand.
    Regards,
    Frank

  • Essbase and iSeries data record locks

    Hello,
    I was wondering if there are any known issues with using Essbase 7.1 on iSeries where data can only be updated one at a time. Essentially the equivalent to MSAS's record locks where when one person is creating a new table or adding entries to one, it is locked for all other users.
    If this is a known limitation, what would be required to unlock it? eg. new version of Essbase?
    Thanks everyone.

    Is it true that if someone opens the outline to make changes then the outline will be locked.^^^I just opened the outline of my Very Favorite Essbase Database In The Whole Wide World (Sample.Basic) in EAS and then went into Excel and was able to change a data value. A locked outline does not prevent users from changing data.
    Users can’t update the cube when someone else is editing it?^^^The outline lock is exclusive, i.e., only one process can have the outline locked.
    Or are you talking about the actual writing of the outline/updates through load rules and the concomitant restructure (dense/sparse/outline)?
    Per the DBAG:
    You cannot build dimensions while other users are reading or writing to the database. After you build dimensions, Essbase restructures the outline and locks the database for the duration of the restructure operation.See: http://download.oracle.com/docs/cd/E17236_01/epm.1112/esb_dbag/frameset.htm?ddlintro.html#ddlintro1029815
    Regards,
    Cameron Lackpour

  • Table of records from a stored procedure

    Hi
    Where could I find an example or documentation about how to retrive a table of records from a Stored Procedure ??
    Thanks

    Try:
    CREATE OR REPLACE TYPE scott.MYRECORDTYPE as object
    (a int, b varchar2(40), c date, d number(10));
    CREATE OR REPLACE TYPE scott.MYTABLETYPE is table of myrecordtype;
    CREATE OR REPLACE PACKAGE BODY scott.MYPACKAGE
    as
    type number_collection is table of number(38) index by binary_integer;
    type varchar2_collection is table of varchar2(4000) index by binary_integer;
    type date_collection is table of date index by binary_integer;
    g_data myTableType;
    empno_col number_collection;
    ename_col varchar2_collection;
    hiredate_col date_collection;
    mgr_col number_collection;
    function my_function return myTableType
    is
    begin
    select empno, ename, hiredate, mgr
    bulk collect into empno_col, ename_col, hiredate_col, mgr_col
    from emp
    order by empno; -- Get some data
    g_data := myTableType(); -- Initialize
    for i in empno_col.first .. empno_col.last loop
    g_data.extend; -- Write something in the array
    g_data(i) := myRecordtype(empno_col(i), ename_col(i), hiredate_col(i), mgr_col(i));
    end loop;
    return g_data;
    end;
    end;
    -- Demonstration-View
    CREATE OR REPLACE VIEW scott.myview
    AS
    select a,b,c,d
    from table(cast(myPackage.my_function() as mytabletype));

  • REPORT ON PL/SQL TABLE OF RECORDS  on 6i & 9i

    HELLO ALL,
    I Want to know if it is posible to build a report on pl/sql
    table of records in developer 6i, or in 9i.
    thanks

    This should not happen. If you are not sure that your stored procedure is bug-free, you could generate and use stored procedures using my SQLPlusPlus and give it a try.
    You can email me directly if your problem still not gets solved.
    regards,
    M. Armaghan Saqib
    +---------------------------------------------------------------
    | 1. SQL PlusPlus => Add power to SQL Plus command line
    | 2. SQL Link for XL => Integrate Oracle with XL
    | 3. Oracle CBT with sample GL Accounting System
    | Download free: http://www.geocities.com/armaghan/
    +---------------------------------------------------------------
    null

  • RECEIVING OPEN INTERFACE TABLE의 STRUCK RECORDS 정보 취합 SCRIPT

    제품 : MFG_PO     
    작성날짜 : 2005-01-27     
    RECEIVING OPEN INTERFACE TABLE의 STRUCK RECORDS 정보 취합 SCRIPT
    =================================================================
    PURPOSE
    RCV_TRANSACTIONS_INTERFACE table에 있는 struck receipt records의 정보를
    취합하여, struck 원인 및 해결에 도움을 줄 수 있다.
    (Oracle Purchasing - Version: 11.5.2 to 11.5.9)
    Explanation
    Receiving Open Interface Tables에 걸려 있는 receipt struck의 source
    document의 추가 정보를 어떻게 취합할 수 있을것인가?
    (RCV_TRANSACTIONS_INTERFACE)
    Source document는 아래 중 하나가 될 수 있다.
    * Purchase Order
    * Return Material Authorization (RMA)
    * Internal Requisition
    아래에 소개하는 scripts는 interface tables에 많은 수의 records가 있을때,
    많은 수의 records의 정보를 한 번에 취합하길 원할때 사용하면 유용하다.
    만약 interface tables에 단지 몇 개의 records만 있다면 Note: 171257.1
    - Oracle Procurement (Purchasing)/iProcurement Diagnostic Tests 에 소개
    되어져 있는 적당한 diagnostic script를 이용하는편이 낫다.
    Example
    1.Error가 발생한 Purchase Order receipts의 추가 정보를 취합하는 script:
    SELECT SUBSTR(POH.SEGMENT1,1,10) "PO Number",
    POR.RELEASE_NUM "Release Num",
    POL.LINE_NUM "Line Num",
    RTI.INTERFACE_TRANSACTION_ID "Intf Trx Id",
    RTI.TRANSACTION_DATE "Trx Date",
    RTI.PROCESSING_MODE_CODE "Proc Mode",
    RTI.TRANSACTION_STATUS_CODE "Trx Status",
    RTI.PROCESSING_STATUS_CODE "Proc Status",
    SUBSTR(PIE.ERROR_MESSAGE,1,75) "Error Message",
    POH.ORG_ID "Op Unit Id",
    RTI.PO_HEADER_ID "PO Hdr Id",
    RTI.PO_RELEASE_ID "Rel Id",
    RTI.PO_LINE_ID "PO Line Id",
    RTI.PO_LINE_LOCATION_ID "Line Loc Id",
    RTI.QUANTITY "Intf Qty",
    POLL.QUANTITY "Order Qty",
    POLL.QUANTITY_RECEIVED "Qty recvd",
    POD.QUANTITY_DELIVERED "Qty Delv",
    NVL(POLL.CLOSED_CODE,'OPEN') "Closed Code",
    OOD.ORGANIZATION_CODE "To Inv Org",
    RTI.DESTINATION_TYPE_CODE "Dest Type",
    RTI.TRANSACTION_TYPE "Intf Trx Type",
    NVL(POLL.QTY_RCV_EXCEPTION_CODE,'NONE') "Qty Exception",
    POLL.QTY_RCV_TOLERANCE "Qty Tolerance",
    POLL.RECEIVE_CLOSE_TOLERANCE "Receipt Tolerance"
    FROM RCV_TRANSACTIONS_INTERFACE RTI,
    PO_HEADERS_ALL POH,
    PO_RELEASES_ALL POR,
    PO_LINES_ALL POL,
    PO_LINE_LOCATIONS_ALL POLL,
    ORG_ORGANIZATION_DEFINITIONS OOD,
    PO_DISTRIBUTIONS_ALL POD,
    PO_INTERFACE_ERRORS PIE
    WHERE POH.PO_HEADER_ID = RTI.PO_HEADER_ID
    AND POR.PO_RELEASE_ID(+) = RTI.PO_RELEASE_ID
    AND POL.PO_LINE_ID = RTI.PO_LINE_ID
    AND OOD.ORGANIZATION_ID(+) = RTI.TO_ORGANIZATION_ID
    AND POLL.LINE_LOCATION_ID = RTI.PO_LINE_LOCATION_ID
    AND POD.LINE_LOCATION_ID = POLL.LINE_LOCATION_ID
    AND RTI.INTERFACE_TRANSACTION_ID = PIE.INTERFACE_TRANSACTION_ID(+);
    2.Error가 발생한 RMA receipts의 추가 정보를 취합하는 script:
    SELECT RTI.INTERFACE_TRANSACTION_ID "Interface Transaction ID",
    RTI.PROCESSING_STATUS_CODE "Processing Status",
    RTI.PROCESSING_MODE_CODE "Processing Mode",
    RTI.TRANSACTION_STATUS_CODE "Transaction Status",
    RTI.TRANSACTION_TYPE "Transaction Type",
    RTI.TRANSACTION_DATE "Transaction Date",
    RTI.OE_ORDER_HEADER_ID "Order header Id",
    OOH.ORDER_NUMBER "Order Number",
    OOH.ORG_ID "Oper Unit Id",
    RTI.OE_ORDER_LINE_ID "Order Line Id",
    OOL.INVENTORY_ITEM_ID "Order Item",
    OOL.FLOW_STATUS_CODE "Line Flow Status Code",
    RTI.QUANTITY "Intf Qty",
    RTI.UNIT_OF_MEASURE "Intf UOM",
    OOL.ORDERED_QUANTITY "Qty Ordered",
    OOL.SHIPPED_QUANTITY "Qty Shipped",
    OOL.FULFILLED_QUANTITY "Qty Fulfilled",
    OOL.OPEN_FLAG "Open Flag",
    OOL.CANCELLED_FLAG "Cancelled",
    WH.ORGANIZATION_CODE||' - '||WH.ORGANIZATION_NAME
    "Ship To Organization",
    WH1.ORGANIZATION_CODE||' - '||WH1.ORGANIZATION_NAME
    "Ship From Organization",
    OOL.BOOKED_FLAG "Booked",
    SUBSTR(PIE.ERROR_MESSAGE,1,75) "Error Message"
    FROM RCV_TRANSACTIONS_INTERFACE RTI,
    OE_ORDER_LINES_ALL OOL,
    OE_ORDER_HEADERS_ALL OOH,
    ORG_ORGANIZATION_DEFINITIONS WH,
    ORG_ORGANIZATION_DEFINITIONS WH1,
    PO_INTERFACE_ERRORS PIE
    WHERE OOL.HEADER_ID = RTI.OE_ORDER_HEADER_ID
    AND OOL.LINE_CATEGORY_CODE = 'RETURN'
    AND OOL.LINE_ID = RTI.OE_ORDER_LINE_ID
    AND OOH.HEADER_ID = RTI.OE_ORDER_HEADER_ID
    AND OOL.SHIP_TO_ORG_ID = WH.ORGANIZATION_ID(+)
    AND OOL.SHIP_FROM_ORG_ID = WH1.ORGANIZATION_ID(+)
    AND RTI.INTERFACE_TRANSACTION_ID = PIE.INTERFACE_TRANSACTION_ID(+)
    ORDER BY RTI.INTERFACE_TRANSACTION_ID;
    3.Error가 발생한 Internal Requisition receipts의 추가 정보를 취합하는
    script:
    SELECT RTI.RECEIPT_SOURCE_CODE "Receipt Source Code",
    RTI.REQUISITION_LINE_ID "Intf Req Line Id",
    RTI.SHIPMENT_HEADER_ID "Ship Hdr Id",
    RTI.SHIPMENT_LINE_ID "Ship Line Id",
    RTI.ITEM_ID "Item Id",
    RTI.QUANTITY "Intf Qty",
    RTI.UNIT_OF_MEASURE "UOM",
    RTI.FROM_ORGANIZATION_ID "From Org Id",
    RTI.TO_ORGANIZATION_ID "To Org id",
    PRH.REQUISITION_HEADER_ID "Req Hdr Id",
    PRH.SEGMENT1 "Req Num",
    PRL.REQUISITION_LINE_ID "Req Line Id",
    NVL(PRL.QUANTITY_DELIVERED,0) "Qty Delv",
    NVL(PRL.QUANTITY_CANCELLED,0) "Qty Canc",
    PRL.QUANTITY "Qty Ordered",
    PRL.QUANTITY - (nvl(PRL.QUANTITY_CANCELLED,0) +
    NVL(PRL.QUANTITY_DELIVERED,0))"Qty Remaining",
    PRL.SOURCE_TYPE_CODE "Source Type",
    PRH.TRANSFERRED_TO_OE_FLAG "XFR to OE Flag",
    NVL(PRL.CANCEL_FLAG,'N') "Cancelled",
    NVL(PRL.CLOSED_CODE,'OPEN') "Closed Code",
    LIN.LINE_ID "ISO Line Id",
    NVL(LIN.ORDERED_QUANTITY,0) "ISO Line Qty",
    NVL(LIN.SHIPPED_QUANTITY,0) "ISO Ship Qty",
    NVL(FULFILLED_QUANTITY,0) "ISO Fulfilled Qty",
    NVL(LIN.CANCELLED_QUANTITY,0) "ISO Cancelled Qty",
    NVL(LIN.OPEN_FLAG,'N') "ISO Line Open",
    NVL(LIN.BOOKED_FLAG,'N') "ISO Line Booked",
    NVL(LIN.CANCELLED_FLAG,'N') "ISO Line Cancelled",
    OOH.ORDER_NUMBER "ISO Order Number",
    PIE.COLUMN_NAME "Intf Column",
    SUBSTR(PIE.ERROR_MESSAGE,1,75) "Error Message"
    FROM RCV_TRANSACTIONS_INTERFACE RTI,
    PO_REQUISITION_HEADERS_ALL PRH,
    PO_REQUISITION_LINES_ALL PRL,
    PO_INTERFACE_ERRORS PIE,
    OE_ORDER_LINES_ALL LIN,
    OE_ORDER_HEADERS_ALL OOH
    WHERE PRL.REQUISITION_HEADER_ID = PRH.REQUISITION_HEADER_ID
    AND RTI.REQUISITION_LINE_ID = PRL.REQUISITION_LINE_ID
    AND LIN.SOURCE_DOCUMENT_ID = PRH.REQUISITION_HEADER_ID
    AND LIN.SOURCE_DOCUMENT_LINE_ID = PRL.REQUISITION_LINE_ID
    AND LIN.SOURCE_DOCUMENT_TYPE_ID = 10 --Internal Requisition
    AND OOH.HEADER_ID = LIN.HEADER_ID
    AND PIE.INTERFACE_TRANSACTION_ID(+) = RTI.INTERFACE_TRANSACTION_ID
    ORDER by PRH.SEGMENT1;
    Reference Documents
    Note 263368.1

    Any suggestion/advise please!
    Thanks,
    Genoo

  • Array or Table of Records or...what is best for my scenario?

    I have been given task to trap last 5 action taken on a form application by user. This would be used where user gets a FRM or ORA error, dump last 5 steps to a table in the database along with error. Trapping FRM or ORA error is easy; I am wondering what & how should I note last 5 steps ( like, what page, what block & what form the user was clicking/entering data etc) when error occurred. I am planning to use when-mouse-click or some other triggers to capture the data; but at every action if I try inserting one record & deleting one record from the database table ( last one knocked out), there is going to be a lot of I/O & that table is going to be too hot. I am trying to avoid that unwanted I/O & keep those 5 steps info somewhere in forms till user gets a error. And, when he/she gets error, he/she can dump those 5 steps info along with error messages/number in a error table.
    My question is: what do I use? Array or Table of records..or something else. I have never used any of these & thought to discuss this before going deep into implementation.
    Any suggestion would be appreciated.
    Thanks.

    You could use a table of records or a record group. They both achieve similar results but with very different syntax. I am not sure if there is any difference in performance.
    Record groups are good for certain things like lists populated from the database because built-ins are provided for manipulating them. If you are going to do the manipulation programatically, I personally find the syntax for tables of records less cumbersome than record groups. Learning the syntax for tables of records is also likely to be more universally useful to you as they have various uses such as passing data between procedures.
    In your situation the table of records needs to exist throughout the forms session rather than just during the execution of a single pl/sql block. The way to do that is create a program unit which is a package header without a body. Declare the table in there and it can be used throughout the form.
    However, if you only ever want to keep 5 records, it would probably be easier just to have 5 ordinary items in a control block on the null canvas (or global variables). When you want to record your new action just do:
    :item5 := :item4;
    :item4 := :item3;
    :item3 := :item2;
    :item2 := :item1;
    :item1 := :new_stuff;
    You could even construct the above in a loop using
    copy(name_in('item'||i),'item'i+i)
    but with only 5 items to manipulate, is it worth the bother ?
    Whatever method you decide to use, you are not going to get anything simpler than 5 little assignment statements.

  • To modify a field in a database table based record identification by primar

    hi
    i want to to modify a field in a database table based record identification by primary key filed and two more fields
    ie customer (primary key
    i want to modify record from intenal table the record existing with primary key field customer
    the status field needs to be mofied as " value rolled"
    the below code is happening
    loop at it_record into wa_Record
    wa_inv-customer (primary key) = wa_Record=custome
    wa_inv-date = wa_Record-date
    ...so one
    append wa_inv to it_invest
    clear wa_inv
    endloop.
    if not it_invest  is initial
    modify TABle1 ( this table is data base table which needs to be mofified) based on the primary key field
    and also date field and status field which is not primary key.
    regards
    arora

    Hi there.
    Your requirement is to update a Z Database table from your internal table, right? You have several options:
    LOOP AT it_invest INTO wa_inv.
      UPDATE dbtable
         SET date = wa_inv-date
       WHERE prim_key = wa_inv-prim_key
         AND any_field = wa_inv-any_field.
    ENDLOOP.
    or
    LOOP AT it_invest INTO wa_inv.
      UPDATE dbtable FROM wa_inv. "if wa_inv of same type of dbtable
    ENDLOOP.
    In the first example, I wrote any field because you can update dbase table, filtering for fields that don't belong to the primary key. However, remember that you will change all records that respect the key you used (so, in your case, use the primary key).
    Regards.
    Valter Oliveira.

  • How can I include a MySQL table and records with the PUT of my Dreamweaver site?

    I am using .php to validate a user code against one of four codes that I am providing to potential clients.  They enter that code, along with a default user id and the appropriate page is then displayed for them.  Everything is working fine on the desktop.  I need to have this table and the records created on my remote server.  I tried saving the table in the Connections folder, but that didn't help.  Everytime I enter a code (valid or invalid) on the live site, I get the following message:  "Table 'boundsauctions_com.promocode' doesn't exist".  Is there someway to include the table and records in my Dreamweaver folders for the site? 
    Thanks for any help that you can offer.

    You can't.  Dreamweaver, or FTP for that matter has no connection to the MySQL database.  If you have created a MySQL database locally and now wish to move/copy it to your server you'll need to create a back up of your local database and then log into your database on the server and then restore that back up.
    An even easier way to do this, and if you are working with MySQL much at all  a good investement is to get the commercial version of Navicat MySQL - this is the best MySQL administrator I've found to date and is well worth the few bucks to buy it.  With Navicat you can connect to your local MySQL database and also create a connection to your remote database, then literally drag and drop your local database contents to copy them to your server. This function alone justifies buying Navicat. A huge time saver.   And no I do not work for or have any share or ties to Navicat.  I'd recommend something else if I knew of anything better, but so far I don't.
    Hope this helps. If you need any more details let me know.
    Lawrence Cramer - *Adobe Community Professional*
    http://www.Cartweaver.com
    Shopping Cart for Adobe Dreamweaver
    available in PHP, ColdFusion
    Stay updated - http://blog.cartweaver.com

  • Backing Up Database Table and Records in Oracle 10g

    Hi All,
    I created database for my company with Oracle 10g Database Server and want to backup all my database tables and records within (i.e creating another username inside the data and transfer them) and outside (i.e transfering them in another destination outside the database server) the database. Could you please instruct me on how to achieve?
    I look forward to hearing from you all.
    Thank you.
    Jc

    Hi, use RMAN utility
    do this
    rman target sys/*** nocatalog
    run {
      allocate channel t type disk;
      backup
        format '/app/oracle/backup/%d_t%t_s%s_p%p'
          (database);
       release channel t;
    {code
    Also read backup and recovery guide at http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/toc.htm
    regards                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Select from table of records

    Hi,
    Inside of a stored procedure I created:
    - a record type:TYPE gr_rec IS RECORD (contact_id number)
    - a table of records: TYPE gr_tb IS table of gr_rec INDEX BY BINARY_INTEGER
    and then I populated the table in a loop: tb(i).contact_id := a.contact_id.
    My question is:
    Is it posible to perform a select statement on the table of records to get only distinct records?
    If not, how can I filter these records, as I use the procedure as a block data source in a form and I need only distinct records.
    Note: I can not obtain select rows from the query that populates the table.
    Thank you, Monica

    Look at this function:
    create or replace type TYP_REC_EMP as object
      EMPNO     NUMBER(4),
      ENAME     VARCHAR2(10),
      JOB       VARCHAR2(10),
      MGR       NUMBER(4),
      HIREDATE  DATE,
      SAL       NUMBER(7,2),
      COMM      NUMBER(7,2),
      DEPTNO    NUMBER(2)
    create or replace type TYP_TAB_REC_EMP is table of TYP_REC_EMP
    CREATE OR REPLACE FUNCTION Ret_Cur RETURN TYP_TAB_REC_EMP
    IS
      TAB TYP_TAB_REC_EMP := TYP_TAB_REC_EMP(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
      CURSOR C_EMP IS
      SELECT *
      FROM   EMP ;
      i PLS_INTEGER := 0 ;
    BEGIN
      FOR CEMP IN C_EMP LOOP
             TAB.extend ;
            i := i + 1 ;
            TAB(i) := TYP_REC_EMP
                            CEMP.EMPNO,
                             CEMP.ENAME,
                             CEMP.JOB,
                             CEMP.MGR,
                             CEMP.HIREDATE,
                             CEMP.SAL,
                             CEMP.COMM,
                             CEMP.DEPTNO
      END LOOP ;
      RETURN TAB ;
    END;
    /And the Sql*plus query :
    SQL*Plus: Release 9.0.1.3.0 - Production on Ve Mar 24 09:18:37 2006
    (c) Copyright 2001 Oracle Corporation.  All rights reserved.
    Connecté à :
    Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.5.0 - Production
    SQL>
    SQL> SELECT DISTINCT(empno),deptno FROM TABLE(ret_cur()) WHERE deptno=20
      2  /
         EMPNO     DEPTNO
          7369         20
          7566         20
          7788         20
          7876         20
          7902         20
    SQL> Francois

Maybe you are looking for

  • Open and cleared items FBL3n

    Hi Guys, I have a query. In FBL3n for G/L line item display , we select open items or cleared items on a particular date. What is the meaning of this? open in what sense? cleared in what sense? thanks.. srikanth

  • Back button no longer works in some specific situations; also, it appears that clearing cache isn't working.

    The "back" button no longer works in certain specific situations on certain specific websites -- especially on the very website on which I need to use it very frequently. This has been going on for a couple of weeks. Also, I noticed today that the "c

  • Standard API  to determine Item Category Group in CRM

    Hi , Can u plz help me out in identifying any standard API  to determine Item Category  group using Product Guid/Product id in CRM 5.0. Our requirement is to implement the BADI  'CRM_COND_COM_BADI'  . Product details are found and Item Category group

  • How to Save PCB design as a component

    Hello,          I'm trying to combine multiple PCB designs into one file in Ultiboard, and I recently find out it has the ability to save pcb design as a componet. Is anyone know how to use this feature ? Thanks  Solved! Go to Solution.

  • RTL text written in 'mirror image' in Dreamweaver CC - semi solution found

    I have Adobe CC, which is set on English with Hebrew support. I downloaded InDesign and Photoshop under this setting, and they work perfectly well in Hebrew. I'm trying to build a site in Hebrew, but whatever I write inside DW *code editing* is shown