Installing Stored Procedure on a remote DB

Hi,
Is it possible to install stored procedures from a
JDBC client without using tools like sqlplus?
Thanks and regards,
Venkat.

Hi
Basically via JDBC you can execute all SQL statements. Therefore it is not a problem. Just write your own tool or do a search on the internet... we will certainly find one!
Chris

Similar Messages

  • How to install Stored Procedures

    Hi
    We are creating a .net application. At the time of installation in client location, the installation should write some stored procedures to the existing oracle 8i database. Please guide us to do this. we are nowise in this.
    Thanks
    Lee1212

    There is no actual install process for stored procedure. Stored procedures are the so called stored program units, and are considered as regular Oracle objects that can be created with a regular DDL command (Data Definition Language) i.e. CREATE command. You must have suitable privileges to perform the action, otherwise an error will show up. Packages are composed of a package specification and a package body, which usually are written on two different files.
    You are supposed to write or have a sql script on the third party side, who will perform the action. You must have a user with suitable privileges created by your administrator.
    Once you have met all requirements, just issue the command to run the script. This script, as a de facto standard has a *.sql extension (in case both specification and body are in the same file) In case the specification and the body were written on different files, then as a de facto standard, the first file will have a *.pls extension, meanwhile the body will have a *.plb extension.
    Usually, but not required, the package body is written in a wrapped format (some sort of encoding).
    Run the script as previously directed. You can verify the existence of the recently created objects from the USER_OBJECTS view or from the DBA_OBJECTS (privileges are required to access dba_* views).
    ~ Madrid

  • MS SQL Server 2005...  Problem while executing stored procedure

    Hi.. all
    I have got a problem with sql server 2005
    When i execute any stored procedure on a remote database using
    ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_READ_ONLY
    options, it throws SQL Exception with following message
    "A server cursor cannot be opened on the given statement or statements. Use a default result set or client cursor."
    Note: Every thing works fine, if I execute the same sp from the PC where sql server is installed, it throws this exception only when i execute sp from a computer different thn one where SQL server is installed.
    Here is d code.
    CallableStatement call = conn.prepareCall( "{call getAttributeLabelValues(?,?,?)}",
    ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_READ_ONLY
    // set parameters.
    ResultSet rs = call.executeQuery( ) ;
    If I remove options
    ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_READ_ONLY
    while executin SP, thn every thing works fine.
    here is d exception
    com.microsoft.sqlserver.jdbc.SQLServerException: A server cursor cannot be opened on the given statement or statements. Use a default result set or client cursor.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
    at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.sendExecute(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteQuery(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(Unknown Source)
    I will appreciate any help.
    Sudhir
    http://www.jyog.com

    use sql server jdbc driver v1.2..........

  • ODBC Error connecting to a stored procedure SQL Server 2008 - Crystal 8.5

    I am running a local copy of SQL server 2008 and get an ODBC error when connecting to any stored procedure with or without parameter. The database are running in SQL Server 2000 compatibility mode on the local server.
    Do not get the error when connecting to one or more databse tables or when connecting to a stored procedure on a remote database.
    The error reported is "ODBC error:[Microsoft][ODBC SQL Server driver] Syntax error or access violation"
    I am running Vista OS.
    Any help would be appreciated..

    Hello,
    Interesting combination. All but CR 8.5 is supported on that OS.
    When you created your DSN did you using the 2008 Client or MDAC?
    I suggest you go back to supported platforms for CR 8.5
    If not then start debugging Vista permissions to start with...
    good luck
    Don

  • How can I check a Remote Database is alive in a Stored Procedure

    Hi
    In a PL/SQL stored procedure, I do a select from a table on a remote database via the database link. There is a Loop around the select as it waits for a flag to be set on the remote table. However, on several occasions, while looping, the remote database has gone down and the procedure then fails with error:
    'Details ORA-02068: following severe error from ORA-02068: following severe error from 'Remote Database ' ORA-01033: ORACLE initialization or shutdown in progress ORA-06512: at "Current Database.Stored Procedure", line'
    Is it possible to trap this error and prevent the procedure from crashing?
    My current code is like:-
    LOOP     
    SELECT flag
    INTO v_flag
    FROM remote_table@remote_db;
         IF v_flag= 'OK'
         THEN
    < Run Oracle Warehouse Builder Process Flow >
         EXIT;
         ELSE dbms_lock.sleep(600);
         END IF;
    END LOOP;
    Any help with this would be appreciated.
    Thanks
    GB

    Hi Bernd
    Thanks for your help. If I do this, I think the procedure would continue onto the 'IF' statement. I am looking for a way of looping round and trying to run the select again before moving on.
    If I did something like
    LOOP --- Loop 1 ---
    LOOP --- Loop 2---
    BEGIN
    SELECT flag
    INTO v_flag
    FROM remote_table@remote_db;
    EXCEPTION WHEN OTHERS THEN NULL;
    END;
    -- Need to exit if no exception ---
    END LOOP;
    IF v_flag= 'OK'
    THEN
    < Run Oracle Warehouse Builder Process Flow >
    EXIT;
    ELSE dbms_lock.sleep(600);
    END IF;
    END LOOP;
    Is there a way of going back to the start of Loop 2 if there was an exception, otherwise EXIT and continue onto the 'IF' statement.

  • Using SQL stored procedures How to get the list of .rar files from e:\Tempbackup directories from the different remote desktop windows server and delete the .rar files which contains the current month and date

    Concept:
    Every month i need to find the list of .rar files from the
    E:/TempBackup directory from the different environments (remote desktop servers) and i need to delete the current month
    .rar files alone from the respective (E:/TempBackup) directory. below is example files structure inside the
    E:/TempBackup.
    example:
    zDROP_2014_08_31_Backups.rar
    zDROP_2014_09_31_Backups.rar
    zDROP_2014_10_31_Backups.rar
    from the above list i need to delete the zDROP_2014_08_31_Backups.rar(current month) file alone and also logs should be capture for this deletion.
    key words for this are zDROP and Current month and date.
    i need a stored procedure for this concept. could you please help on this.

    Hello,
    You can schedule an operating system task (Control Panel -> Schedule task) to either call a batch file or a PowerShell script.
    Please read the following resources for examples:
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/61373719-fffb-4d94-bdbe-7d8ed8620b44/delete-filesfolders-on-remote-servers-using-powershell?forum=winserverpowershell
    http://www.networknet.nl/apps/wp/archives/943
    http://jeffwouters.nl/index.php/2011/10/powershell-script-to-delete-files-older-that-a-week/
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Remote Stored Procedure Call Dispatcher WEB WERVICE

    Hello all,
    Environment: Windows OS, Oracle 10g, mod_plsql
    I am looking for solutions to the following problem:
    A way to dispatch calls to stored procedures from client to server with a minimal impact on performance.
    We are looking at two possible solutions:
    1) Making a call to a Remote Stored Procedure Call Dispatcher (RSPCDispatcher) stored procedure through mod_plsql.
    2) Making a call to a Remote Stored Procedure Call Dispatcher (RSPCDispatcher) stored procedure through a web service.
    Solution 1) is not the preferred one as you may already know that mod_plsql will not be supported starting 12g.
    Solution 2) is the one we prefer as we believe that web services will be ever more supported in the future. When we move to 11g we may turn this web service into a native one (avoiding overhead in the OC4J for hosting the web service etc.).
    We are looking for code examples and information pointers of how we could implement this dispatcher as a stored procedure in a DB package. We know that the implementation should be similar to the one done for mod_plsql in the OWA schema but the code there is obfuscated, so we could not borrow ideas from there.
    We are not sure how to deal with the generalization of the above stated problem. We need to be able to pass to this dispatcher the stored procedure package and name we are invoking, ordered list of parameters (or parameters map), and the transport strategy (XML, JSON, etc.).
    Basically, we are notsure how to deal with the USING clause of the EXECUTE IMMEDIATE statement. We can dynamically generate the SQL statement corresponding to the stored procedure we want to call, but we are not sure how to bind the parameters we are passing?
    Also, we know that EXECUTE IMMEDIATE may be slow sometimes. So if could avoid it, this could further improve performance.
    Perhaps the run-time generalized stored procedure execution may not be what we are looking for?! Perhaps we should include several design-time steps?! What about a script that given a package name (or just a single stored procedure) would generate a wrapper package which stored procudures' names would correspond to their respective counterparts in the given package which would take two parameters - the list of parameters in some sort of format, and the transport (content delivery strategy) and would return the result in the given content delivery strategy?! This script may also define the XSD of the XML message a stored procedure is called with (the parameter map) as well as the XSD of the XML result the stored procedure returns. Also the script could generate client code with the given language strategy (Java, .NET, etc.) for calling the RSPCDispatcher web service.
    We request the following from the Oracle community folks:
    a) Please, give us any relevant information that could be helpful to resolve this problem.
    b) Any resource of how to inspect stored procedures in a package, its parameters, parameter types and direction (IN, OUT, or INOUT), etc.
    Thank you very much in advance.
    Regards,
    Georgi

    Hello all,
    Environment: Windows OS, Oracle 10g, mod_plsql
    I am looking for solutions to the following problem:
    A way to dispatch calls to stored procedures from client to server with a minimal impact on performance.
    We are looking at two possible solutions:
    1) Making a call to a Remote Stored Procedure Call Dispatcher (RSPCDispatcher) stored procedure through mod_plsql.
    2) Making a call to a Remote Stored Procedure Call Dispatcher (RSPCDispatcher) stored procedure through a web service.
    Solution 1) is not the preferred one as you may already know that mod_plsql will not be supported starting 12g.
    Solution 2) is the one we prefer as we believe that web services will be ever more supported in the future. When we move to 11g we may turn this web service into a native one (avoiding overhead in the OC4J for hosting the web service etc.).
    We are looking for code examples and information pointers of how we could implement this dispatcher as a stored procedure in a DB package. We know that the implementation should be similar to the one done for mod_plsql in the OWA schema but the code there is obfuscated, so we could not borrow ideas from there.
    We are not sure how to deal with the generalization of the above stated problem. We need to be able to pass to this dispatcher the stored procedure package and name we are invoking, ordered list of parameters (or parameters map), and the transport strategy (XML, JSON, etc.).
    Basically, we are notsure how to deal with the USING clause of the EXECUTE IMMEDIATE statement. We can dynamically generate the SQL statement corresponding to the stored procedure we want to call, but we are not sure how to bind the parameters we are passing?
    Also, we know that EXECUTE IMMEDIATE may be slow sometimes. So if could avoid it, this could further improve performance.
    Perhaps the run-time generalized stored procedure execution may not be what we are looking for?! Perhaps we should include several design-time steps?! What about a script that given a package name (or just a single stored procedure) would generate a wrapper package which stored procudures' names would correspond to their respective counterparts in the given package which would take two parameters - the list of parameters in some sort of format, and the transport (content delivery strategy) and would return the result in the given content delivery strategy?! This script may also define the XSD of the XML message a stored procedure is called with (the parameter map) as well as the XSD of the XML result the stored procedure returns. Also the script could generate client code with the given language strategy (Java, .NET, etc.) for calling the RSPCDispatcher web service.
    We request the following from the Oracle community folks:
    a) Please, give us any relevant information that could be helpful to resolve this problem.
    b) Any resource of how to inspect stored procedures in a package, its parameters, parameter types and direction (IN, OUT, or INOUT), etc.
    Thank you very much in advance.
    Regards,
    Georgi

  • How to retrive data through stored procedure in mysql from remote machine?

    Hello everybody,
    I am having problem in accessing data of mysql through stored procedure. It works fine if I use "jdbc:mysql://localhost:3306/[database name]" instead of "jdbc:mysql://[IP address]:3306/[database name]". The connection is fine for both, but when stored procedure is called the system stops at "stmt.execute();" line in java file while debuging. In case of localhost there is no any problem. The code for connecting procedure is:
    stmt = dbConn.prepareCall("{? = call testing()}"); stmt.registerOutParameter(1, Types.VARCHAR); stmt.execute();
    I have to connect java application running in Windows to the mysql database running in remote machine(RHEL 5).
    I am using "mysql-connector-java-5.1.5-bin.jar", jdk 1.5.0 and remote database Mysql version : 5.0.22.
    There is no exception and application hangs at stmt.execute();
    Can anybody help me with this problem?
    Thank you.

    I got it. its about connection...

  • Calling Remote Stored Procedure from Pocket PC

    Hi all,
    I have finished building an application based on IBM's SMF framework which conforms to the OSGI standards. Currently, I am having a problem with connecting to the main server DB which resides on a Websphere server. Basically, user will enter information on their pocket pc and then save it to a local DB2e database. I thought about going with the synchronization solution with the DB2 Sync server, but really all the user is trying to do is updating records in the main server database tables and there's really no need to sync anything back from the server to the pocket pc. So, I m thinking maybe I should try to invoke a stored procedure that resides on the main DB server from my device, passing in parameters through a WLAN connection.
    My question now is:
    1. user should be connecting through a WLAN connection and my company have set up a login that prompts the user to login everytime they try to access anything on the server. It won't be nice if the user will hv to do that every single time. Is there a way that I can log the user in programmatically so they do not have to do it with a separate log in window?
    2. Is calling a remote stored procedure a bad idea?
    3. If the network goes down, then there's no way the users can update anything to the main server DB. So, the changes will be saved locally and once the network goes back up, the user should be able to update those changes back to the server. I am just wondering if it's bad to do a loop and send those updates to the server by calling the stored procedures repeatedly passing in diff. parameters? what safeguards do I need to put in? like what exceptions should I expect to catch? also, I would like to be able to track those updates that failed, how do I do that?
    Any help will be appreciated. I tried to find resources online, but to no avail. I am not sure if I am overly complicated things. Please advice! Thanks alot everyone!

    The error message is:
    ORA-04067: not executed, stored procedure "schema.P$PROC@remote_db" does not exist

  • Remote execution of DTS packages from Java Stored Procedures

    I'm an Oracle 10G DBA and Linux/Unix Sysadmin looking for a Java guru to help me find a reusable template or locate a solid programming methodology (examples) that will enable me to connect via JDSI to SQL Server 2000/2005 and remotely execute DTS packages from within Oracle. I am working at office that's absolutely addicted to MicroSlop products and the DBA team cannot conceive of giving up their precious DTS packages. I've already converted their MS SQL Server 2000 database to Oracle 10G on RHEL4 via SQLDeveloper but I am unschooled in the art of java programming and would like to locate some sort of rudimentary template or examples or java class that can easily be loaded into the Oracle 10G database instance via the loadjava utility. These java classes/methods/stored procedures need to be executable from within embedded PL/SQL code and able to connect to SQL Server 2000 to execute DTS packages via passing dtsrun commands ... Any help or direction would be greatly appreciated.

    Hi Ilford:
    Sure you can use fully package notation in your Java classes.
    Look at this Java source code:
    http://dbprism.cvs.sourceforge.net/dbprism/cms-2.1/src/com/prism/cms/core/
    All of them are Java Stored procedures.
    Best regards, Marcelo.

  • Put a commit in a stored procedure that is called remotely, give error

    I put a commit in a stored procedure that is called remotely, this gives me an error. Why?

    Why? Because only the calling procedure - the local one - can have commits. Please read my reply to Re: DBlink: Can I access to a remote type?. In particularly read the part of the documentation it links to, about distributed transactions.
    Cheers, APC

  • Error - remote stored procedure includes in a function

    Hi,
    I have a stored procedure, it runs properly
    ecos.GetCustTier@BSCSDEV in PL/SQL
    But after included into function F_GETCUSTTIER, it comes error.
    SQL> select f_getcusttier(585510,'20020808') from dual
    ORA-06571: Function F_GETCUSTTIER does not guarantee not to update database
    [Function F_GETCUSTTIER]
    create or replace FUNCTION f_getcusttier(
    Begin
    ecos.GetCustTier@BSCSDEV(i_customer_id, i_at_date, o_seqno, o_custcode, o_tier_id, o_tier_des, o_join_date, o_join_reason,
    o_renewal_date, o_next_review_date, o_last_review_amt_no, o_exit_date, o_exit_reason,
    o_input_by, o_input_date, o_update_by, o_update_date, o_expiry_date, o_next_job_review_date,
    o_status_id, o_return_code);
    RETURN o_tier_id;
    I also try to create a package for this function
    CREATE OR REPLACE PACKAGE abc AS
    FUNCTION f_getcusttier(i_customer_id number, i_at_date varchar2) RETURN NUMBER;
    PRAGMA RESTRICT_REFERENCES(f_getcusttier, WNDS);
    END abc;
    CREATE OR REPLACE PACKAGE BODY bwan AS
    FUNCTION f_getcusttier(
    i_customer_id in number,
    i_at_date in varchar2
    Begin
    ecos.GetCustTier@BSCSDEV(i_customer_id, i_at_date, o_seqno, o_custcode, o_tier_id, o_tier_des, o_join_date, o_join_reason,
    o_renewal_date, o_next_review_date, o_last_review_amt_no, o_exit_date, o_exit_reason,
    o_input_by, o_input_date, o_update_by, o_update_date, o_expiry_date, o_next_job_review_date,
    o_status_id, o_return_code);
    RETURN o_tier_id;
    But with Warning: Package Body created with compilation errors.
    2/1 PLS-00452: Subprogram 'F_GETCUSTTIER' violates its associated
    pragma
    How can I fixed it? Can function pack with remote stored procedure?
    DB version: 8.0.4.4.0
    I know that this problem is resolved in Release 8.1, is it no solution for release 8.0.4.4.0?

    First of all, please do not post three separate threads for the one problem. It simply clutters up the forum for the rest of us.
    Prior to 8i you need to explicitly guarantee that your function does not write to the database. You do this with the RESTRICT_REFERENCES pragma:
    CREATE PACKAGE yr_package AS  -- package specification
       FUNCTION whatever
             (pn IN NUMBER) RETURN NUMBER;
       PRAGMA RESTRICT_REFERENCES (whatever, WNDS);
    END yr_package;The following link goes to a page of helpful stuff assembeled by some of use regulars:Re: How to attach a java bean in forms6i
    It includes jumps to the Oracle online documentation. You may find the Application Developer's Guide - Fundamentals an instructive read.
    Regards, APC

  • Excuting stored procedure remotly from SQL Server

    Hi everybody,
    H recive an error message when I try to execute a remote stored procedure on Oracle from SQL Server though a linked server of ME OLE provider for oracle.
    I can view all of the Oracle tables and views within SQL Enterprise Manager. When I try to execute a the command (execute OracleServer...StoredProcedure) through MS query analyzer using the linked Oracle server, I receive the error.
    Could you please help me overcome this problem
    I found something similiar, but with no accepted answer:
    Accessing Oracle Table via Linked Server
    Thanks alot

    Let's put it in another way:
    How could I execute a stored procedure on Oracle from an OLE DB connection?
    Is there syntax for PL/SQL to use from other languages like Transact-SQL?
    Thanks once again

  • 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 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

Maybe you are looking for

  • Query to view the support group of a generated ticket in the Database, not the Data Warehouse

    Hi, I need a query to view the support group of a generated ticket, but the query must be useful in the only Database (I don't know what happened in the DW, could be a issue). Please help me, Greetings! 

  • Trade- In Sales

    Hi, Anybody worked in a retail scenario? In case of Trade-In Sales, where sales (eg. Rs.100) & purchase of goods (buy-back Rs.5) ) are booked simultaneously, can we have a booking of purchases & sales simultaneously & only 1 net invoice generated? or

  • How can i understand my i4 locked or not?

    I bought an iphone from someone who told me that bought it directly an apple shop in the UK. I just really wondered that how can i understand its locked to any network or not? Is there anyone help me? Thanks.....

  • Can't use Function keys after creating curves adjustment ?

    After I create a curves adjustment layer, the Function keys are disabled.  Every Function key changes the cursor to an eydropper.  You must first click on the left-arrow at the bottom of the pallette to exit the curves adjustment.  Is there a way to

  • Canon 1DS Mark III

    Does Aperture support the newly released Canon 1DS Mark III (which is different from the 1D Mark III)?