How to lock record in a remote database ???

Hi All!
How to lock record in a remote table ??? Is it possible to lock by using the RPC ??? What are the options available ??
thanks
Sanjeeb Bose
HCL Infosystems Ltd
Kolkata India

DBLinks may be one option...
--Shirish                                                                                                                                                                                                                       

Similar Messages

  • How to lock records in 8.1.7?

    Hi,
    How can I lock records in 8.1.7 so that only one user can select/update these records at one time? If possible, can it return an error mesg if one user try to select/update records locked by others?
    Thanks a lot.
    David

    Oracle automatically locks a row just before updating or deleting.
    You can lock rows explicitly before doing an update etc by selecting it for update:
    select * from emp where empno=21 for update;
    update emp
    set sal=sal*1.1
    where empno=21;
    commit;
    The lock will be released on the commit (or rollback).
    Please note that in Oracle, writers never block readers and readers never block writers. Which means, that although you have locked a row (or group of rows) for update, other users will still be able to select against those rows (in the pre-changed or consistant state).

  • How to use HR application with Remote Database ?

    Hi,
    I tested the HR application but it working on local database.
    How can I create same application which will communicate with Remote Database.
    Any guideline ?
    Regards,
    Ajay Sharma

    Hi,
    Thanks for the reply.
    My scenario is that there is one web service and this web service has one method name "getQueryOutput".
    Input parameter to this method is Select query
    select ename form empthe return type of this method is Document. Currently I hard coded the select statement as I want to display all employee name as application starts.
    But I am getting following error
    Unable to read DataControl Usages, on loadDataControl for id: Genericwebfollowing is the code of method where I am calling Webservice data control
        public void Execute() {
            Trace.log(Utility.ApplicationLogger, Level.INFO, EmployeeList.class, "Execute",
                      "##############Inside Execute");
            List pnames = new ArrayList();
            List params = new ArrayList();
            List ptypes = new ArrayList();
            pnames.add("query");
            ptypes.add(String.class);
            params.add("select ename from emp");
            try {
                Trace.log(Utility.ApplicationLogger, Level.INFO, EmployeeList.class, "Execute",
                          ">>>>>> Before invokeDataControlMethod");
                // This calls the DC method and gives us the Return
                GenericType result =
                    (GenericType)AdfmfJavaUtilities.invokeDataControlMethod("Genericweb", null, "getQueryOutput",
                                                                            pnames, params, ptypes);
                GenericType cfgt = (GenericType)result.getAttribute("Results");
                int count = cfgt.getAttributeCount();
                for (int i = 0; i < count; i++) {
                    GenericType fgt = (GenericType)cfgt.getAttribute(i);
                    Employee e = (Employee)GenericTypeBeanSerializationHelper.fromGenericType(Employee.class, fgt);
                    GenericType tempgt = (GenericType)fgt.getAttribute("ENAME");
                    e.setEname((String)tempgt.getAttribute(0));
                    s_employees.add(e);
            } catch (AdfInvocationException e) {
                Trace.log(Utility.ApplicationLogger, Level.SEVERE, EmployeeList.class, "Execute",
                          ">>>>>> AdfInvocationException=" + e.getMessage());
                //AdfException ex = new AdfException("Error Invoking Web Service.  Please try later", AdfException.WARNING);
                AdfException ex = new AdfException(e.getMessage(), AdfException.WARNING);
                throw ex;
            } catch (Exception e2) {
                Trace.log(Utility.ApplicationLogger, Level.SEVERE, EmployeeList.class, "Execute",
                          ">>>>>> Exception=" + e2.getMessage());
                //AdfException ex = new AdfException("Error Invoking Web Service.  Please try later", AdfException.WARNING);
                AdfException ex = new AdfException(e2.getMessage(), AdfException.WARNING);
                throw ex;
        }Regards,
    Ajay sharma

  • How do we connect to a remote database from a Java Stored Procedure?

    We have a situation where we are not able to use a PSP (PL/SQL server page) to update a remote database using database link in an Oracle8i database. This is a known bug on 8i and is fixed in 9i. Can this be done using PSP calling a Java stored procedure, which in turn connects to the remote database and performs the update. If so, how we do remote connectivity to another database from the current java stored procedure.

    We have a situation where we are not able to use a PSP (PL/SQL server page) to update a remote database using database link in an Oracle8i database. This is a known bug on 8i and is fixed in 9i. Can this be done using PSP calling a Java stored procedure, which in turn connects to the remote database and performs the update. If so, how we do remote connectivity to another database from the current java stored procedure.

  • How to Centalize the data from remote database

    we have 300-400 databases across remote server.
    we want to collect the centralized inforamtion from remote server into centralized oracle database.
    1.exporting the centralized data at remote server and
    through FTP transfering it to central server and
    importing the dump in central database
    2.Creating database links and collecting data through
    Snapshot
    Which is best or Give any suggestion pls
    if possible give detail information

    Hi,
    Use Proxies For Your Sender SAP System side and Use the Appropriate Adapter at Receuver side according to the Requirement
    Now scenario willl be Proxy-Xi---
    Logic:
    1) Write the Logic inside the Proxy report to pick the records from the tables
    2) And send it to Xi, Xi will routew the data to the third party System based on the adapter you selected
    ABAP Proxies Pre-requisites
    /people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies
    ABAP Client Proxies
    /people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy
    Regards
    Seshagiri

  • How to insert records from form to database?

    Hi all, i manage to make a connection from my form in adobe designer 7
    to my database Oracle 9i, now i want to add some buttons to the form
    and navigate, delete or add data from my form to the database, anyone
    has ideas to accomplish this?, i made a button and use this code
    "xfa.sourceSet.dataConnectionName.addNew();" without the "", but in the
    debugger this message appears:
    "TypeError: xfa.sourceSet.dataConnectionName has no properties
    1:XFA:form1[0].hola[0].Button1[0]:click"
    hope someone can help me with this problem, thanks in advance.
    regards
    Alex

    Alex alatorre do you speak spanish? can you help me?
    I have de same problem
    want to add data from my form to the database, i made a button and use this code xfa.sourceSet.prueba.addNew();
    but in the debugger this message appears:
    TypeError: xfa.sourceSet.prueba has no properties
    1:XFA:form1[0].#subform[0].Button1[0]:click
    My data connection is with microsoft access (local mode). When i configure the data connection i make the test and it says test succes, but...
    how do i know if the connection is really made when i open my form in acrobat? I only need to do new data conection in designer and create de button or a need to configure something else?
    When i create the button ... i only need copy in the javascript window...
    xfa.sourceSet.prueba.addNew();
    or do i need something else?
    I am a newbie with this... and sorry about my english.
    hope someone can help me with this problem, thanks in advance

  • How Forms 6i could connect to remote database 9i

    AOA,
    Our company has different sites located in different cities. In the main office we have developed many modules using Oracle 9i and Developer 6i and our data is highly confidential.
    In all remote sites our modules are running by standalone. Now we want to connect our remote sites with our main Database.
    What will be the options available to make highly secured connection between our sites and main office.
    In our city different ISPs are available who can provide dedicated IP access, DSL and VPN.
    If anybody has any experience please let us know.
    Regards
    Aimed Bill
    System Analyst
    Pakistan
    Message was edited by:
    AB Shah

    In the itvimsapp server execute the command
    emctl status dbconsole
    and see the name server and port, for example:
    ===================================
    [oracle@bddesa oracle]$ emctl status dbconsole
    TZ set to America/Guayaquil
    Oracle Enterprise Manager 10g Database Control Release 10.1.0.3.0
    Copyright (c) 1996, 2004 Oracle Corporation. All rights reserved.
    http://bddesa:5500/em/console/aboutApplication
    Oracle Enterprise Manager 10g is running.
    ===================================
    If the server is running you can connect with the sentence
    http://bddesa:5500/em or http://192.168.1.186:5500/em
    I hope this help
    Regards,
    Wilson

  • How to call stored procedure in remote database

    Hi:
    I have a stored procedure in Oracle 8i database A on server A. I would like to call a stored procedure in Oracle 8i database B on server B. Both servers are on the same network.
    Is there an easy way to accomplish this using PL/SQL?
    What's the "best practice" for this?
    Thanks for your help!
    Rob

    I simply want to make a call from a procedure on server A to an insert procedure on server B. The procedure which is on server B should execute on server B. Is this what I need?
    Thanks!
    I assume you want to initiate the procedure from server B and executed on server A. Is that right ?
    1. Create a database link on server B
    CREATE DATABASE LINK databaseA.world CONNECT TO username identified by password using 'DATABASEA';
    2. Create synonym for the procedure
    CREATE SYNONYM proc_on_databaseB for [email protected];
    3. Execute the procedure using the new synonym.
    HTH,
    Allwyn
    Hi:
    I have a stored procedure in Oracle 8i database A on server A. I would like to call a stored procedure in Oracle 8i database B on server B. Both servers are on the same network.
    Is there an easy way to accomplish this using PL/SQL?
    What's the "best practice" for this?
    Thanks for your help!
    Rob

  • How to get Record Count Of a Database Tables in DBCNT?

    HI ALL,
    I checked  these threads...
    Select Count
    SY-SUBRC
    my question is ..
    i uploaded data to table.. 39 records..
    but when i debug the reprot sy-dcnt value showing 100 times...?
    100 times execution going in select and endselect statement..
    can any body explain...it?

    Hi,
    see this code
    data:itab like mara occurs 0 with header line.
    select * from mara into table itab UP TO 20 rows where matnr like 'C%'.
      write:/ sy-dbcnt.
      LOOP AT itab.
      write:/ sy-tabix.
      ENDLOOP.
    rgds,
    bharat.

  • How to lock a row in a db2/400

    Hi all,
    Could someone show me how to lock a row in the database DB2/400
    The scenario:
    DB.beginTransaction
    User 1 gets a row with a column bill_number
    "select bill_number from numbers where pk = xxx for update"
    aux_bill_number = bill_number
    USER 1 updated this row
    "update numbers set bill_number = bill_number +1 where pk = xxx "
    USER 1, like final step, insert aux_bill_number in other table as primary key
    DB.commitTransaction
    While doing so,
    User 2 also gets a row with a bill_number. this user must take bill_number with value 2, but take the same value 1
    This it causes key duplicated in the destiny table.
    Please, help me.
    How I must lock the row not to allow to read until finishing the previous transaction?

    Hi all,
    Could someone show me how to lock a row in the
    database DB2/400Isn't SELECT FOR UPDATE standard?
    >
    The scenario:
    DB.beginTransaction
    er 1 gets a row with a column bill_number
    "select bill_number from numbers where pk =
    xxx for update"
    aux_bill_number = bill_number
    1 updated this row
    "update numbers set bill_number = bill_number
    +1 where pk = xxx "
    USER 1, like final step, insert aux_bill_number in
    other table as primary key
    DB.commitTransactionSounds like you're trying to do something that a JOIN would do better.
    While doing so,
    User 2 also gets a row with a bill_number. this user
    must take bill_number with value 2, but take the
    same value 1
    This it causes key duplicated in the destiny table.
    Please, help me.
    How I must lock the row not to allow to read until
    finishing the previous transaction?Setting the isolation level to SERIALIZABLE might help.
    %

  • Calling remote database obj in local procesure

    Dear Friends,
    If I want to refer any remote database object(Table or procedure)
    in my (local) procedure, should I be a valid user of that database?
    If so, how should I connect to that remote database from my local
    procedure?
    If I should not be a user of that Database, then how does the connection
    occur?
    Have a nice time,
    Tarek Khan

    You have to create a database link and use it
    RTFM about how to create them

  • How to lock a database Z table before updating it through a report program

    Hi,
    How to lock a database Z table before updating it through a report program and also how to unlock it after my updation.
    The whole process is done through report program.

    Hi,
    Go to SE11, in the option 'Lock object' enter the name of your lock,
    begin with 'E', suppose 'EXXXX' And create. In tab 'Tables' fill the
    table name where the record you want to lock exist and select the
    lock mode. Lock mode can be shared and exclusive. If 'shared',
    when you lock the record, other can also read data, but can not
    modify. If 'exclusive', when you lock the record, other can neither
    read nor modify the record. After save and activate, you will get two
    function module.'ENQUEUE_EXXXX' to lock record,
    'DEQUEUE_EXXXX' to release lock on one record.
    When use this function module it only lock one record at a time. It
    does not lock the table.
    Regards,
    Omkaram.

  • How to delete a record in a connected database?

    We are encountering a problem using the delete function for removing a record in a connected database table. The database is an excel-file and we are able to add a new record, update existing records but not delete records. We are using the following script in FormCalc since I read that the function does not work in JavaScript:
    $sourceSet.DataConnection.delete()
    The error message returned is:
    "Deleting data in a linked table is not supported by this ISAM."
    We are also curious to know how we can reload the connection so that for example a drop-down list containing values from each record in the table is updated automatically when we insert a new record.
    Thanks!
    Annika

    You also asked:<br /><br /><font color="grey"><i>We are also curious to know how we can reload the connection so that for example a drop-down list containing values from each record in the table is updated automatically when we insert a new record.</i></font><br /><br />You should be able to achieve this quite easily using the Data Drop Down List from the Library palette's Custom tab. This object has a pre-defined Initialize script which populates the list with items from a data connection you specify.<br /><br />While the object is pre-configured to load items from the data connection only upon initialization (which only occurs when the form is loaded and after a data merge), you could move the script into a Script Object function and call it whenever you insert a new record (just after the statement which inserts the record).<br /><br />This is the script from the Initialize event of the Data Drop Down list put into a Script Object function called LoadDropDownList which takes the drop down list to populate using the data connection as a parameter:<br /><pre>function LoadDropDownList(oDropDownList)<br />{<br />     /*     This dropdown list object will populate two columns with data from a data connection.<br />     <br />          sDataConnectionName - name of the data connection to get the data from.  Note the data connection will appear in the Data View.<br />          sColHiddenValue      - this is the hidden value column of the dropdown.  Specify the table column name used for populating.<br />          sColDisplayText          - this is the display text column of the dropdown.  Specify the table column name used for populating.<br />     <br />          These variables must be assigned for this script to run correctly.  Replace <value> with the correct value.<br />     */     <br />     <br />     var sDataConnectionName = "&lt;value&gt;"; //     example - var sDataConnectionName = "MyDataConnection";<br />     var sColHiddenValue = "&lt;value&gt;"; //     example - var sColHiddenValue = "MyIndexValue";<br />     var sColDisplayText = "&lt;value&gt;"; //     example - var sColDisplayText = "MyDescription"<br />     <br />     //     Search for sourceSet node which matchs the DataConnection name<br />     var nIndex = 0;<br />     while(xfa.sourceSet.nodes.item(nIndex).name != sDataConnectionName)<br />     {<br />          nIndex++;<br />     }<br />     <br />     var oDB = xfa.sourceSet.nodes.item(nIndex);<br />     oDB.open();<br />     oDB.first();<br />     <br />     //     Search node with the class name "command"<br />     var nDBIndex = 0;<br />     while(oDB.nodes.item(nDBIndex).className != "command")<br />     {<br />          nDBIndex++;<br />     }<br />     <br />     //     Backup the original settings before assigning BOF and EOF to stay<br />     var sBOFBackup = oDB.nodes.item(nDBIndex).query.recordSet.getAttribute("bofAction");<br />     var sEOFBackup = oDB.nodes.item(nDBIndex).query.recordSet.getAttribute("eofAction");<br />     <br />     oDB.nodes.item(nDBIndex).query.recordSet.setAttribute("stayBOF", "bofAction");<br />     oDB.nodes.item(nDBIndex).query.recordSet.setAttribute("stayEOF", "eofAction");<br />     <br />     //     Clear the list first so that we replace any existing items<br />     <b>oDropDownList</b>.clearItems();<br />     <br />     //     Search for the record node with the matching Data Connection name<br />     nIndex = 0;<br />     while(xfa.record.nodes.item(nIndex).name != sDataConnectionName)<br />     {<br />          nIndex++;<br />     }<br />     var oRecord = xfa.record.nodes.item(nIndex);<br />     <br />     //     Find the value node<br />     var oValueNode = null;<br />     var oTextNode = null;<br />     for(var nColIndex = 0; nColIndex < oRecord.nodes.length; nColIndex++)<br><br />     {<br><br />          if(oRecord.nodes.item(nColIndex).name == sColHiddenValue)<br><br />          {<br><br />               oValueNode = oRecord.nodes.item(nColIndex);<br><br />          }<br><br />          else if(oRecord.nodes.item(nColIndex).name == sColDisplayText)<br><br />          {<br><br />               oTextNode = oRecord.nodes.item(nColIndex);<br><br />          }<br><br />     }<br />     <br />     while(!oDB.isEOF())<br />     {<br />          <b>oDropDownList</b>.addItem(oTextNode.value, oValueNode.value);<br />               oDB.next();<br />     }<br />     <br />     //     Restore the original settings<br />     oDB.nodes.item(nDBIndex).query.recordSet.setAttribute(sBOFBackup, "bofAction");<br />     oDB.nodes.item(nDBIndex).query.recordSet.setAttribute(sEOFBackup, "eofAction");<br />     <br />     //     Close connection<br />     oDB.close();<br />}</pre><br />The required modifications to the original script are in bold.<br /><br />The easiest way to create the Script Object is to right-click on the top-level form object ("form1" by default) in the Hierarchy palette and select the <i>Insert Script Object</i> option. This will insert an un-named Script Object which you should then rename to something meaningful like, "ScriptObject". Once you've done this, you can call the function from any event on any object on your form with the following JavaScript:<br /><pre>ScriptObject.LoadDropDownList(&lt;SOM expression for drop down list&gt;);</pre><br />If you were calling this function on an "add record" button's Click event, the drop down list was named "DropDown" and both objects were in the same subform, you would do this:<br /><pre>ScriptObject.LoadDropDownList(DropDown);</pre><br />Stefan<br />Adobe Systems

  • How can I connect to an oracle database remotely using telnet in DIAdem?

    I need to query an oracle database on a remote server and store the result back in DIAdem. Does anyone know how to telnet through diadem and return the result?

    DIAdem provides you with tools to connect to databases using SQL. Specifically, you can use SQL_Connect to open a connection to a database through a DSN (Data Source Name). The DSN has to be configured on the local machine (Control Panel -> Administrative Tools - > Data Sources) and has to point to the remote Database. You can map a network drive in the local machine so you can browse to your remote Database. The DSN will provide the link between DIAdem and the remote Database.
    If your communication has to be throught telnet, then I suggest you try to use an ActiveX control. VBScript doesn't support Telnet natively, but it does support ActiveX controls. You can create one from Visual Basic or try to find a telnet client that has one already.
    Best Re
    gards,

  • How to connect to a remote database in a lan??

    Hey guys......! I need to connect to a remote msaccess database in a lan and import its data into my mysql database.I know how to connect to a msaccess database using ODBC.But I don't know how to connect to a remote database without creating dsn in the machine where database is.One thing more...I want to know, how can I import data into my mysql database?? Is there any query for that or simply I have to select data from msaccess database and insert into tables of my database??Please, send me the source code in the forum itself and explain also.This is the last feature of my project.So I need to do it as soon as possible.

    If the mdb file in LAN, Just map the network drive.[Windows Explorer/Tools/Map Network Drive] in your system from which we need to access the remote mdb. Then go to ODBC Data Source Admin.. and create a new data source[Microsoft Access Driver] . After clicking the Select button, you will find a Network Drive will be visible on your Drives drop down. Select the map Drive, If not visible then just click the Network button there and map the network path where the mdb files reside. And use the JdbdOdbcDriver class to connect from java.

Maybe you are looking for

  • Looping part of a QT movie in keynote

    Hi, I want to be able to have a movie in keynote that plays the whole movie and once it reaches the end it jumps back to a certin point in the movie (not the begining) and plays that part over and over till i change the slide, so the effect is, for e

  • Sound input problem

    I have a weird problem: in using a headset to make calls using Skype or iChat I cannot get the headset microphone to work, though the earphones work fine. Everything is plugged in correctly. Have selected the Line-In option in the Sound panel of Syst

  • RFC-XI-FILE Asynch Scenario

    Hi All, i am working RfcXiFile Asynch. Scenario by using Proxy. i created ABAP proxy in R/3 system and exececuted in XI server. it's working fine. All design and Configuration in IR, ID over. i tested the configuration, it's fine. But the problem is

  • AIR 17 - Sub Textures don't render ( black screen) on HTC Desire 610 ?

    Hello, AIR 17.0.0.124 critical bug on stage3D/Android/ HTC Desire 610 ( full spefication http://www.gsmarena.com/htc_desire_610-6160.php) I was using AIR 16 and all working correctly. In AIR 17 when I'm using SubTextures ( atlas textures) , stage 3D

  • Ever since I updated my iPhone 5s I am unable to access my account information with US cellular

    Has anybody else had this problem since doing an update on their iPhone?