How to call a remote stored proc from a local stored proc using DB Link

Hi All,
I am trying to call a stored procedure residing in another data base from the local procedure of my local data base using DB link,I am using the following syntax to call the procedure
CREATE OR REPLACE PROCEDURE MYLOCALPROCEDURE(Input1 IN varchar2 ,Input2 IN varchar2) IS
BEGIN
RemoteStoredprocedurename(Input1,Input2)@DBLINK;
END;
END MYLOCALPROCEDURE;
Its giving a compilation error as @ not expected
If i try to execute this way
CREATE OR REPLACE PROCEDURE MYLOCALPROCEDURE(Input1 IN varchar2 ,Input2 IN varchar2) IS
BEGIN
RemoteStoredprocedurename(Input1,Input2);
END;
END MYLOCALPROCEDURE;
Its giving an error as stored procedure must be declared.
A public synonym is created at the Remote database to which DB link is created.
Can you please let me know on the exact syntax to call the procedure residing in other database through DB Link.
Thanks in advance,
Kumar

Try:
CREATE OR REPLACE PROCEDURE MYLOCALPROCEDURE(Input1 IN varchar2 ,Input2 IN varchar2) IS
BEGIN
RemoteStoredprocedurename@DBLINK(Input1,Input2);
END;
END MYLOCALPROCEDURE; Amiel

Similar Messages

  • Calling a Remote EJBSession Facade from a Local EJBSession Facade

    Hi, I'd like to understand the way of calling a remote ejb application from a local ejbsession facade using its methods (throught data control palette) without I have to generate a Java Client. To do this, where do I put the code to get the remote ejb facade instance?.
    Thanks in advance.

    My problem is to call a application server, using rmi/jndi from a local application which has been developed using ADF+JSF+Toplink.
    Concretely, into a backing bean method I need to call a method that this available one in the facade of the other application, which resides in OAS.
    Using simple clients,it works fine, but I don't know the way to do it within backing bean, since creating a remote interface of the facade with the declaration of the remote method, it does not allow me to declare this like abstract. Nevertheless, and since already I have commented using a simple client it works to me.
    Help please.

  • Calling a remote SSH script from a local script

    When I paste this in Terminal I get the expected output:
    ssh -2 root@$SERVER /Library/WebServer/Sectrum.com/Sectrum/RSS/Update.py
    However when I invoke the same command scriptomatically I get error:
    : No such file or directoryctrum.com/Sectrum/RSS/Update.py
    It looks like the command line is truncated by a control character? What's going on?
    Are there special rules when calling an SSH remote script from inside a script on the local machine?

    Just tried a test with
    #!/bin/sh
    ssh [email protected] command
    with a remote (non-Mac OS X) box, and it worked as expected. Can you post more of an example, or can you try (for instance) invoking a bash script on the remote box with, say, an echo command or two? Try to break down the problem space here.
    And in no particular order...
    The root user wouldn't be my choice for this sort of thing, given the sensitivity of that username.
    Try (for testing) using localhost as the host name, or the full host name.
    Confirm $SERVER (and I'd probably use the ${SERVER} notation for that) is working with an echo.
    And as a completely different approach, it might work to add and use a CGI path into the web server for this operation, too; to use a path other than ssh for the operation. Or (depending on what you're really doing here) maybe a periodic script. (Or Xgrid, maybe ARD or such, or any of various available distributed command environments.)

  • Call a UNIX shell script from an oracle stored procedure

    We need to call a UNIX shell script from an oracle stored procedure
    i.e. the control should come back to the procedure once the script completes. Can any body help to achieve this ?

    There are various ways in achieving this.
    For Example, you can call a PRO*C-Library residing on the database server.
    This requires a PL/SQL library to be generated and some changes to the Listener configuration.
    It is also possible to implement a java procedure on the database being invoked by a PL/SQL wrapper class.
    In this way (and if used right) there is also granularity regarding the filestructure permissions given and it may be called during a Forms or other PL/SQL session.
    The article below explains a more generic approach how to invoke shell commands from within an Oracle Instance.
    Be careful with this, because it really works ;)
    Refer to :
    http://www.oracle-base.com/articles/8i/ShellCommandsFromPLSQL.php
    Message was edited by:
    user434854

  • How to call a custom controller method from view

    Hi,
    I ve created a simple web service and consumed it in a model. Mapped the input & output parameters to custom controller context which in turn mapped to component controller's context which in turn to view's contexts.
    How to call a custom controller method from view?
    Please explain the syntax.
    Regards,
    Manoj.

    Hi Patralekha,
    Give some idea for the below scenario:
    I ve created a simple web service and consumed it in a model. What I did was
    1) for the input parameters, mapped the node from view->custom controller->model
    2)for the output parameter, mapping from model->custom controller->view.
    It works fine.
    But I don't want to access model nodes directly, rather I want to set the input param in somewhere else (like custom controller) before calling the appropriate method, same for the response also.
    Share me your thoughts.
    Regards,
    Manoj.

  • How to call an external web service from OIM?

    Hi,
    I have a question on how to call an external web service from OIM within e.g. creating user process? How should it be done; through adapter and task in the process?
    Any recomendations?
    Thanks in advance!

    it is not clear to me if you are having problems with calling java code from OIM or if the problem is the web service API.
    Lets do some divide and conquer:
    Can you create a simple java class that just writes a couple of lines to the log? Please attach this code to the OIM task and make sure it runs.
    Once this works we can start looking at the web service call.
    Best regards
    /Martin

  • Executing a stored proc from inside a stored proc

    Hi,
    I'm trying to execute a stored procedure from inside another stored procedure, and I can't seem to work out the correct syntax to use, could someone please give me a pointer, it's starting to drive me insane :]
    CREATE OR REPLACE PROCEDURE foo (blah in type) AS
    BEGIN
    EXEC OTHER_STORED_PROC();
    END;
    Thank you kindly,
    Anthony...

    EXEC is a SQL*Plus command, not PL/SQL syntax. In SQL*Plus, EXEC <<procedure name>> is just shorthand for
    BEGIN
      <<procedure name>>
    END;Calling a stored procedure from another stored procedure (or any PL/SQL block), can bypass the extra begin/end pair because it's already inside a PL/SQL block. Thus, the syntax you need is just
    CREATE OR REPLACE PROCEDURE foo (bar IN type)
    AS
    BEGIN
      other_stored_procedure();
    END;Justin
    Distributed Database Consulting, Inc.
    www.ddbcinc.com/askDDBC

  • Call a remote Java API from PL/SQL

    Hi
    I want to call a remote Java API from my PL/SQL. Can someone please provide me the steps to do this?
    Thanks in advance
    -G

    Hello
    thanks for the link. But is not telling me what I want.
    I dont have java in my computer. I will be supplied with a java API name which I have to call by connecting to remote server. I will be have the username and password to connect and call the remote API. I need to get the return value from the remote Java API in my PL/SQL. I hope I have explained the issue clearly.
    Thanks again.
    -G

  • How to call java function with parameter from javascript in adf mobile?

    how to call java function with parameter from javascript in adf mobile?

    The ADF Mobile Container Utilities API may be used from JavaScript or Java.
    Application Container APIs - 11g Release 2 (11.1.2.4.0)

  • How to call a Asynchronous bpel process from a PLSQL procedure?

    How to call a Asynchronous bpel process from a PLSQL procedure?

    Hi,
    You could do something smart and technical very spiffy with soap-stacks in the database and/or dbms_ws/dbms_http. But I allways find AQ with AQ-adapter the simplest. Let Pl/sql enqueue a message on an aq-queue and subscribe an aq-adapter process on it. That can call your async-bpel process. If you want to get answer back in pl/sql, let the aq-adapter process enqueue a response message on another queue or on the same queue with another consumer name. Give it a correlation-id that you provided in the payload of your request message. Your pl/sql process can then do a dequeue on that correlation-id. It will sit and wait until a message with that correlation id is enqueued on the queue.
    Regards,
    Martien

  • How to call a Bapi or RFC from a custom logon module

    Can you provide an example of how to call a bapi or rfc from a custom logon module? (used to authenticate in portal)

    Hello all,
    Is it possible to use SAP JRA instead?
    We have a Connector deployed on the WebAS 6.40. From an EJB (Webservice) it is possible to lookup the connector, but if i try to lookup the connector from a custom LoginModule, i get the following error:
    Path to object does not exist at java:comp, the whole lookup name is java:comp/env/eis/SAPJRA_CRMDC.#
    The whole lookup in LoginModule looks
    try
                   initialcontext    = new InitialContext();
                   connectionFactory = (ConnectionFactory) initialcontext.lookup("java:comp/env/eis/SAPJRA_CRM");
              } catch (Exception ex)
                   location.errorT(ex.getMessage());
    Regards Oliver

  • How do I remove an old username from the app store when using the update function

    How do I remove an old username from the app store when using the update function.
    I purchased my Mac used.  The former owners username prepopulates when I try to perform the updated function on the app store.  It does not allow me to use a different user name.    I have created my own username and password.  I have even been able to purchase items from the app store, it's just when I use the update function it does populate with my username.  Any help is appreciated.

    The first thing to do with a second-hand computer is to erase the internal drive and install a clean copy of OS X. You — not the previous owner — must do that. How you do it depends on the model, and on whether you already own another Mac. If you're not sure of the model, enter the serial number on this page. Then find the model on this page to see what OS version was originally installed.
    1. You don't own another Mac.
    If the machine shipped with OS X 10.4 or 10.5, you need a boxed and shrink-wrapped retail Snow Leopard (OS X 10.6) installation disc from the Apple Store or a reputable reseller — not from eBay or anything of the kind. If the machine has less than 1 GB of memory, you'll need to add more in order to install 10.6. Preferably, install as much memory as it can take, according to the technical specifications.
    If the machine shipped with OS X 10.6, you need the installation media that came with it: gray installation discs, or a USB flash drive for some MacBook Air models. For early MBA models, you may need a USB optical drive or Remote Disc. You should have received the media from the previous owner, but if you didn't, order replacements from Apple. A retail disc, or the gray discs from another model, will not work.
    To boot from an optical disc or a flash drive, insert it, then reboot and hold down the C key at the startup chime. Release the key when you see the gray Apple logo on the screen.
    If the machine shipped with OS X 10.7 or later, you don't need media. It should boot into Internet Recovery mode when you hold down the key combination option-command-R at the startup chime. Release the keys when you see a spinning globe.
    2. You do own another Mac.
    If you already own another Mac that was upgraded in the App Store to the version of OS X that you want to install, and if the new Mac is compatible with it, then you can install it. Use Recovery Disk Assistant to create a bootable USB device and boot the new Mac from it by holding down the C key at the startup chime. Alternatively, if you have a Time Machine backup of OS X 10.7.3 or later on an external hard drive (not a Time Capsule or other network device), you can boot from that by holding down the option key and selecting it from the row of icons that appears. Note that if your other Mac was never upgraded in the App Store, you can't use this method.
    Once booted in Recovery, launch Disk Utility and select the icon of the internal drive — not any of the volume icons nested beneath it. In the Partition tab, select the default options: a GUID partition table with one data volume in Mac OS Extended (Journaled) format. This operation will permanently remove all existing data on the drive.
    After partitioning, quit Disk Utility and run the OS X Installer. You will need the Apple ID and password that you used to upgrade. When the installation is done, the system will automatically reboot into the Setup Assistant, which will prompt you to transfer the data from another Mac, its backups, or from a Windows computer. If you have any data to transfer, this is usually the best time to do it.
    Then run Software Update and install all available system updates from Apple. To upgrade to a major version of OS X newer than 10.6, get it from the Mac App Store. Note that you can't keep an upgraded version that was installed by the previous owner. He or she can't legally transfer it to you, and without the Apple ID you won't be able to update it in Software Update or reinstall, if that becomes necessary. The same goes for any App Store products that the previous owner installed — you have to repurchase them.
    If the previous owner "accepted" the bundled iLife applications (iPhoto, iMovie, and Garage Band) in the App Store so that he or she could update them, then they're linked to that Apple ID and you won't be able to download them without buying them. Reportedly, Apple customer service has sometimes issued redemption codes for these apps to second owners who asked.
    If the previous owner didn't deauthorize the computer in the iTunes Store under his Apple ID, you wont be able to  authorize it immediately under your ID. In that case, you'll either have to wait up to 90 days or contact iTunes Support.

  • How to embed and launch ipa file from another ipa package created using Air for iOS

    Hi Guys,
    Anybody out there knowing how to embed and launch ipa file from another ipa package created using Air for iOS ?
    I am having 1 ipa file created using Xcode, Now i need to include that file in my ipa Package which is created using Flash CS 5.5 and Air for iOS. Also i need to know how to open my 1st ipa file from AS3 ?
    Thanks,

    Hi Sir,
    Thanks for your reply.
    But in that case user need to download 2 applications right. I need user to download my parent application created using Flash and that package contain one more ipa created using Xcode, so from my parent app only user should able to open my 2nd app. Is there any way to do that?
    Ps:  I am not talking about in-app but 2 individual apps inside one package.

  • How to delete/drop all the tables from SQL Server Database without using Enterprise Manager?

    How to delete/drop all the tables from SQL Server Database without using Enterprise Manager?
    I tried using DROP Tables, Truncate Database, Delete and many more but it is not working.  I want to delete all tables using Query Analyzer, i.e. through SQL Query.
    Please help me out in this concern.
    Nishith Shah

    Informative thread indeed. Wish I saw it early enough. Managed to come up with the code below before I saw this thread.
    declare @TTName Table
    (TableSchemaTableName
    varchar
    (500),
    [status] int
    default 0);
    with AvailableTables
    (TableSchemaTableName)
    as
    (select
    QUOTENAME(TABLE_SCHEMA)
    +
    +
    QUOTENAME(TABLE_NAME)
    from
    INFORMATION_SCHEMA.TABLES)
    insert into @TTName
    (TableSchemaTableName)
    select *
    from AvailableTables
    declare @TableSchemaTableName varchar
    (500)
    declare @sqlstatement nvarchar
    (1000)
    while 1=1
    begin
    set @sqlstatement
    =
    'DROP TABLE '
    + @TableSchemaTableName
    exec
    sp_executeSQL
    @sqlstatement
    print
    'Dropped Table : '
    + @TableSchemaTableName
    update @TTName
    set [status]
    = 1
    where TableSchemaTableName
    = @TableSchemaTableName
    if
    (select
    count([Status])
    from @TTName
    where [Status]
    = 0)
    = 0
    break
    end

  • Call Developer 2000 Reports/Forms from PL/SQL stored proc.

    Hello all,
    I am searching for a method for a stored procedure on Oracle 8.0 to call a Oracle Developer 2000 Report or Form.
    Any suggestions,
    Thanks,
    Julian

    No offense,
    Do you mean calling a trigger in a Form or Report to fire off another of the same? Or do you mean how do I fire Forms from a Database stored procedure?
    Please I don't mean any offense, it is just hard, sometimes to say simple concepts and not sound, well, bad.
    Otherwise think about it. A Stored procedure is run inside the database, it has no idea where you client is, and doesn't know which type of client you have (X-Windows, Microsuck), and doesn't know how to fire off an app on the client.
    One concept that is hard, sometimes, to get is where things are run. Forms runs on an Apps Server (Java screens), or a client, like on a PC. Stored procedures run, usually, on a whole different box, a database server. The database server is not that well connected that it can fire off a app on a client. Try to go to a Unix database server and run a command to fire off Internet Explorer on your client!? Not real easy to do.

Maybe you are looking for