Connection in stored procedure

Hi
I'm trying to create a stored procedure that creates few SYNONYM's and then give the user select permisiions on those SYNONYM's.
The problem is that I need to connect as System to grant the select permissions.
CREATE OR REPLACE PROCEDURE DAL_Update_Gazetteer_Link(
gazDataSource_ IN VARCHAR2,
gazSchema_ IN VARCHAR2,
gazSystemUser_ IN VARCHAR2,
gazSystemPassword_ IN VARCHAR2,
pmsSchema_ IN VARCHAR2,
errMsg OUT VARCHAR2
IS
sqlq VARCHAR2(2000);
BEGIN
sqlq := '';
-- Synonyms.
sqlq := 'CREATE OR REPLACE SYNONYM LPI FOR ' || gazSchema_ || '.LPI';
EXECUTE IMMEDIATE sqlq;
CONNECT systemUser/user@service.
-- Select Grants on tables
EXECUTE IMMEDIATE 'GRANT SELECT ON '|| gazSchema_ || '.BLPU TO ' || pmsSchema_;
COMMIT;
end;
END DAL_Update_Gazetteer_Link;
Above is the basic stored proc I cannot get the connection to work, the create SYNONYM's works but the Grant will not run.
Any ideas very welcome as I'm new to Oarcle. 10g
Edited by: user13430017 on 07-Dec-2010 05:30

So basically we have a schema with the national property data in it, we have another schema that does not and never will need the whole data. So we have an application that can import any property into the second schema that is of intrest.
So we have synonym's that in the second schema can view and get the data if required.
The problem is that the client can and does want and need to change the schema which has the main national property data in and therefore breaks any of the synonym's connections.
So we have a settings tool that should allow them to reset synonym's to the new schema.
I hope this helps explain the situation, I'm not sure how it can help with my problem as I'm not the owner or designer of the schemas I'm just writting altering a setting application. To allow them to do what they want to do. Right or Wrong, Risky or not it needs to be done.
So any suggestions would be very grateful.

Similar Messages

  • Establishing database connection in stored procedures/functions

    Hi, any body knows how to do it....
    Consider there is 2 database, Oracle_1 and Oracle_2.
    I want to fetch some table data in Oracle_2 from Oracle_1 database Stored procedure/functions through query staments and cursors. How to establish the Oracle_1 DB connection in Oracle_2 DB stored procedure/function. Is it possible?

    Hi,
    Consider there is 2 database, Oracle_1 and Oracle_2.
    I want to fetch some table data in Oracle_2 from Oracle_1 database Stored procedure/functions through query staments and cursors. How to establish the Oracle_1 DB connection in Oracle_2 DB stored procedure/function. Is it possible?
    It's not the same how you implement the programs in java or .Net to create DB connection. It's different over here. You have use the DataBase Links in order to make to connection with another DB and use that Link in the stored procedure or function where ever its necessary as per your requirement.
    - Pavan Kumar N

  • 3.0 EA1 - DB Connection in Stored Procedure Windows

    I don't know if anybody else has encountered this, or if it was fixed in EA2 (been way too busy to check it out). When I click on a stored procedure in the tree, it doesn't always open for the database connection that I'm selecting it from. Rather, it will use the connection of the last worksheet I had open.
    It doesn't affect me too much since my permissions in our Prod server keep me from breaking too many things. I would be lying if I said I hadn't tried to compile/save a procedures without looking to see what link it was opened with.

    While we can debate about whether it should be on or off by default, and we've had both in the product over the years, we found that the biggest complaint was when you selected a procedure/package and you could not edit. It seemed that most people wanted to be able to edit from the outset. So we changed the behavior to a single set of tabs and in SQL Developer 2.1 you are in edit mode by default. It was an oversight that it was changed for 3.0 and so for consistency the decision has been made to place you in edit mode by default. For those who find this a little scary, there is a the preference to turn this off.
    Sue

  • Error connecting to stored procedure in crystal report

    Hello
    I'm using crystal reports 2008 with the latest service pack.
    i'm trying to access stored procedure using the mysql jdbc driver 5.17. The crystal report has been designed which works fine with a login that created the stored procedure but when i try to run with another login that will used to run the crystal reports
    The login has access to execute the stored procedure but entered in the crystal report it complains about
    "User does not have access to metadata required to determine stored procedure parameter types. If rights cannot be granted, configure with {noAccessToProcedureBodies=true} to have driver generate parameters that represent INOUT strings irregardless of actual paramter types"

    Hi Sharon
    Thanks for response.
    I have checked that the user has permission to read and write. When i try and execute the stored procedure in the database by login with the user, it runs fine.
    When i try and call the stored procedure from crystal reports it throws that error message.
    regards
    Naresh

  • How do I modify a report to show new fields in a stored procedure?

    The server uses Crystal Reports Embedded Server 2008 SP3 (running on Windows Server 2008 R2 / IIS 7.5), and I am using Crystal Reports Developer 2008 SP3 on my PC.
    Hello,
    I am a MSSQL database administrator with little experience with Crystal Reports.  At my job, we have a need to add a couple of fields to a report.  The report comes with an enterprise procurement web-based application and displays the details of a given purchase order.  They want me to add the supplieru2019s address below the supplieru2019s name on the report.  I was hoping there might be a fairly straight-forward, not overly complicated answer to my question.
    The report works with a stored procedure (OrderForm1) which creates a temp table called #ReportParameters.  It then executes another stored procedure (GetReportParameters), in which it uses 'sp_xml_preparedocument' and eventually 'sp_xml_removedocument'.  It then executes a stored procedure called  (OrderForm1Main) which contains the select statement that brings in the bulk of the fields and joining the pertinent tables.  I made a backup copy of OrderForm1Main and modified the original, to include the supplier address fields.
    Don't know if I'm on the right track, but hereu2019s what I tried so far:
    When I open the OrderForm1.rpt in Crystal Designer, I have found that I can go to Database > Set Datasource Location, create a connection (OLE DB (ADO)) to the database, highlight the name of the stored procedure under u2018Current Data Sourceu2019, then find the same stored procedure in the database in the section u2018Replace withu2019:
    http://i.imgur.com/KXBuf.png
    When I clicked the u2018Updateu2019 button, a u2018Enter Valuesu2019 for parameters window pops up:
    http://i.imgur.com/5uQ9V.png
    Iu2019m confused as to what to do at this part.  Whether I click u2018OKu2019 or u2018Cancelu2019, it then adds my database connection with stored procedure to the list in the u2018Current Data Sourceu2019 section:
    http://i.imgur.com/aD4KH.png
    After completing this data source change, in the Field Explorer under Database Fields > OrderForm1, it then includes the new fields I added to the stored procedure.  However, when dragging the new supplier address fields to the report layout, saving the report in this state, and trying to run it in the web application, the report window displays the message u2018Missing parameter valuesu2019 instead of the report:
    http://i.imgur.com/gz8S3.png
    In Field Explorer > Database Fields > Parameters, Iu2019m seeing a list of parameters that arenu2019t the exact ones in the stored procedure, which leads me to believe, they are somehow defined in the report itself.  Also, under u2018Parameter Fieldsu2019 in the Fields Explorer there is the @fParameters listing with a question mark icon, that appeared since the data source change:
    http://i.imgur.com/llkrk.png
    There does not seem to be an equivalent set of parameters in the database, as there were defined in the report.  I imagine that the actual parameter values come from the data held in the currently displayed purchase order (from which you can push a button 'Print PO' that will display the report in question).  I have read that when you change a data source in Crystal, you have to complete the task of resetting, or adding back in the parameters.  That would be easy if they were in the database somewhere.  Whenever I attempt to look at the properties of the u2018ReportInformationu2019 in u2018Set Datasource Locationu2019, or simply try Database > 'Verify Database' to refresh the datasource, an u2018ADO.NET (XML) windows pops up with a file path in it, something to the effect of:
    MyLoanerLaptop\ebo bk\orderform1.xml:
    http://i.imgur.com/SEVOE.png
    I did a search on the entire server for the file OrderForm1.XML and could not find it anywhere.  So Iu2019m thinking that the software companyu2019s development team used that file originally, to create the report (did they use a dataset to do this, or is the temporary XML file created during the process actually the schema here?).  I think Iu2019m basically trying to change the data source in the report, to an updated version of the original stored procedure referenced, while still somehow leaving the parameters list in the report alone and have them still work?
    Any and all help would be greatly appreciated.  I realize that this type of work most likely is routine stuff that can be learned by taking the time to do so.  My team is only interested in allowing me a certain amount of time and resources to delve into Crystal and we do not have a Crystal dev team.  So, hopefully you understand my dilemma here.
    Thank you,
    Mike
    Edited by: Mike_DBA on Jan 23, 2012 8:03 PM
    Edited by: Mike_DBA on Jan 23, 2012 8:05 PM
    Edited by: Mike_DBA on Jan 23, 2012 8:11 PM (2:12 pm EST)
    Edited by: Mike_DBA on Jan 23, 2012 8:13 PM
    Edited by: Mike_DBA on Jan 23, 2012 8:18 PM
    Edited by: Mike_DBA on Jan 23, 2012 8:30 PM
    Edited by: Mike_DBA on Jan 23, 2012 10:58 PM

    Hi Mike,
    CRSE is an OEM Product and for use with a custom application they have written. Unfortunately we don't their reports or how they are connecting, it would appear they were originally built off a SQL and then set to a Dataset in the app or they could be adding the data source at runtime. Lots of variations and without access to the source code to see what they are doing not much we can help you with.
    You need to contact the OEM Partner for help in resolving this and find out what you can and need to do to update your SP and work with their canned reports,
    Thank you
    Don

  • Oracle OLE DB Provider / Stored Procedure REF CURSOR errror

    Post Author: robfurrball
    CA Forum: Data Connectivity and SQL
    All,I'm out of ideas on this and would appreciate any suggestions.I'm trying to use Crystal XI to connect to an Oracle 9i database using the Oracle OLE DB Provider (required to use this provider by a 3rd party program that fires off the report).If I connect using the Microsoft OLE DB Provider for Oracle,  the report will return data.  When connecting with the Oracle OLE DB Provider, I get the following:Database Connector Error: 'ADO Error Code: 0x80040e14
    Source: OraOLEDB
    Description: ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'SP_MOMGLOBCSHBAL_TEST'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Native Error: 6550 [Database Vendor Code: 6550 ]' -
    The procedure's only parameter is an IN OUT SYS_REFCURSOR, and the Oracle OLE DB Provider is version 9.2.0.7.0 Thanks,Rob

    Post Author: robfurrball
    CA Forum: Data Connectivity and SQL
    Summary: After going
    back and forth with Business Objects support they ruled that it was an issue
    with the provider itself, recommended I contact Oracle for resolution, and
    closed the case before I could comment back to them.  I was unable to send this response to their
    support team, so I'm posting it here in hopes that I can save others time/money
    in the future.
    My Response -
      I appreciate your input and would have liked to comment further on the case management system before you closed the case.  I'm a little surprised and disappointed that you recommend I contact Oracle directly about this issue.I would imagine that a company as large as Business Objects would have much better results dealing with Oracle to resolve an issue compared to an individual.Also, since you are able to connect to other objects (such as a table) in Crystal Reports using that provider, I would expect that you would want customers to be able to connect to stored procedures using it as well.  Otherwise, it would seem appropriate to either alert customers of this defect through documentation, public message boards, and forums.Using Crystal to pull data from stored procedures in other databases and data providers made me think that was a viable option for this project.  Since it was not documented as a limitation of Crystal and the provider, it has cost my organization a great deal of time and money trying to troubleshoot an issue I would have expected to be caught in Crystal Reports' internal quality assurance testing.------ This is the final note I received on my support case: -
    Please note that the statement used to execute a procedure within ODBC/OLE DB is different from the native 'Oracle Server' statement.In ODBC or OLE DB, the call is '{CALL "SCHEMANAME"."TEST_PROCEDURE"(3)}' , when using native 'Oracle Server' the call is 'BEGIN "SCHEMANAME"."TEST_PROCEDURE"(:TEST_CURSOR, 1); END ;'In ODBC or OLE DB, the cursor is still used however it is not listed within the SQL Statement as in the Native connection. This is the behavior from Crystal Reports 9 forward that the cursor is not shown through ODBC/OLE DB.In addition to that as the issue is only with the Oracle OLE DB provider and I would suggest you to contact Oracle about this issue, since the issue occurs outside of Crystal Reports when using QTADO with a standard call, so it is not an issue between Crystal Reports and Oracle.The issue is only with Oracle OLE DB provider as the same Oracle stored procedure call works within QTADO with the MS Oracle OLE DB provider.As the issue is with the OLE DB Provider and not with Crystal Reports, we may not be able to proceed further. Hence, I am closing this case from Case Management System.

  • Stored Procedure CS4?

    I use MS2008 SQL Server and I'm trying to get Dreamweaver to connect using stored procedures. ASP VBscript.
    If I use "Command" and click on "Procedures" it starts to load them up and then sits there. I waited about 5 minutes and gave up waiting.
    Same with doing it the Recordsets way. There was a time when doing the recordsets way worked but apparently not now in CS4. So not only has it not be fixed but it's gotten worse.
    Any workarounds? Ideas?
    Is this their way of saying I should move to php?
    Are they EVER going to fix this and if not why do they keep it in the interface when they have no plan to fix it?

    LArtJunky wrote: Glasonbury,
    Are you setting up the lighting because you work for a lighting company? Also, where are you from? I was thinking you lived somewhat southwest of London.
    Lighting is my hobby, I have been doing it for 10 years. Mainly clubs and free parties (raves) but also do a couple stages at the Glade Festival with some friends of mine. I do happen to work for a lighting company, have done for a couple of years, which is why its an ideal job for me. I do all the asp/sql parts of the website that marketing have overall control over. I also do internal systems using asp/sql. I think I have learnt more in the last 2 years than I have in the last decade, and all because the products and the company interest me.
    Now Glastonbury is a good 3 hour drive in an old Merc van full of sound and lighting kit. Your right, I do live west of London, but do parties all over the place. This one wasn't that well attended or well paid, but it was still a good party.
    Steve

  • Crystal Report not showing fields when connected to a stored procedure

    I have a Stored Procedure that returns results when run in SQL Server, but when I add this to a Crystal Report it doesn't show any fields in the Field Explorer. But if I try any other SP, it works fine and I can see its fields.
    As you can see in the picture below, I am unable to expand the fields in the report while creating the report using standard report procedure too.
    I tried different ways, but nothing worked for me here. Please help me here.
    (FYI, I am using Crystal Reports 2008, SQL Server 2008R2)

    Hi Jamie,
    I just found out the reason for this issue.
    I wrote the stored procedure using the fields in the Datamart but the fields in the datamart in backend are connected to a different database which doesn't have SQL Server Authentication (for the Credentials) and that's the reason I was getting this issue.
    Once my BI team granted the permission, for that fields connecting to the backend database, I was able to see all fields in the Crystal Report.

  • 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

  • Crystal Report That Uses Stored Procedure Errors when connecting to the DB

    We had developed reports a few years ago, including one that calls a Stored Procedure on an iSeries AS400 DB2 database.  We upgraded our environments to Crystal Reports 2008 and BO XI 3.1.  Now, the existing report that previously ran in the old environment is not running (note that the other SQL-based reports work without a problem, only this one which uses a store procedure is not working).  I downloaded the report into my local Crystal Reports designer and tried to run it from there and I got the following error message:
    ======
    Failed to retieve data from the database.
    Details: ADO Error Code: 0x
    Source Microsoft OLE DB Provider for ODBC Drivers
    Description: [IBM][iSeries Access ODBC Driver] Statement violates access rule:  Connection is set to read only.
    SQL State: 37000
    Native Error: [Database Vendor Code: 30186 ]
    ======
    {CALL "<database>"."<library>"."RELEASEDNOTINVOICE"({d '2010-03-01'})}
    This call will still work from on a SQL client running on a JDBC connection.  Is there some problem with the new verion of BO and Crystal Reports with using the iSeries ODBC driver?

    ...my issue was resolved by setting the ODBC.INI registry entry for AllowProcCalls from 0 to 1.

  • To connect a datablock to a query - stored procedure: problem

    I have the following table...
    CREATE TABLE I_TIPOLOGIA (
    CODICE NUMBER(6),
    DESCRIZIONE VARCHAR2(100),
    CONSTRAINT I_TIPOLOGIA_PK PRIMARY KEY (CODICE) );
    and the following package to connect a datablock to
    previous table with a stored procedure...
    CREATE or REPLACE PACKAGE DATABANKER_TIPOLOGIE AS
    TYPE TipTableOfRec IS TABLE OF I_TIPOLOGIA%ROWTYPE;
    PROCEDURE leggi(resultset IN OUT TipTableOfRec);
    END DATABANKER_TIPOLOGIE;
    CREATE or REPLACE PACKAGE BODY DATABANKER_TIPOLOGIE AS
    PROCEDURE leggi(resultset IN OUT TipTableOfRec) AS
    BEGIN
    SELECT * BULK COLLECT INTO resultset
    FROM I_TIPOLOGIA;
    END leggi;
    END DATABANKER_TIPOLOGIE;
    When I compile the form I receive in QUERY-PROCEDURE trigger
    en error 306: "number or type of arguments are wrong in POPULATE_BLOCK"
    I post the trigger auto generated by Forms Builder 6i...
    DECLARE
    bk_data DATABANKER_TIPOLOGIE.TIPTABLEOFREC;
    BEGIN
    DATABANKER_TIPOLOGIE.leggi3(bk_data);
    PLSQL_TABLE.POPULATE_BLOCK(bk_data, 'BLOCCO50'); -- <- error here
    END;
    How can I solve this problem? Maybe there is a bug?
    P.S. I'm using Oracle Database 9i

    CREATE or REPLACE PACKAGE DATABANKER_TIPOLOGIE AS
    TYPE TipTableOfRec IS TABLE OF I_TIPOLOGIA%ROWTYPE;
    PROCEDURE leggi(resultset IN OUT TipTableOfRec);
    END DATABANKER_TIPOLOGIE;I have solved with this replacement 1) -> 2)
    1) TYPE TipTableOfRec IS TABLE OF I_TIPOLOGIA%ROWTYPE;
    2) TYPE TipTableOfRec IS TABLE OF I_TIPOLOGIA%ROWTYPE
    INDEX BY BINARY_INTEGER;
    with 2) now works.
    Now I have stored-procedures for query, insert, delete
    and update.
    I have some problems with delete and update of the records
    because it seems that they are locked.
    I think that it is due to the absence of lock
    stored-procedure... there's someone that can help me with
    the lock SP implementation?

  • APEX fails with Java stored procedure that creates a JDBC connection

    Hello!
    We are facing a strange problem since we have upgraded from Oracle 10g and Apache to Oracle 11g with Embedded Gateway.
    Here is what we do:
    ** APEXX calls a PL/SQL package function "OPEN_CONNECTION" that wraps a Java stored procedure called "openConnection".*
    FILE_READER_REMOTE_API.openConnection(user, password, host, port, service);
    ** The Java stored procedures "openConnection" opens a JDBC connection to an other database:*
    public class FileReaderRemote {
    private static Connection conn = null;
    private static DefaultContext remoteContext = null;
    public static void openConnection(String user, String password, String host, String port, String service) throws SQLException {
    // Load the Oracle JDBC driver
    DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
    java.util.Properties props = new java.util.Properties();
    props.put ("user", user);
    props.put ("password", password);
    //props.put ("database", "//" + host + ":" + port + "/" + service);
    props.put ("database", host + ":" + port + ":" + service);
    props.put("v$session.program", "FileReaderRemote2");
    // Connect to the database
    remoteContext = Oracle.getConnection("jdbc:oracle:thin:", props);
    This procedure used to work fine before the upgrade, but now we see the following:
    * It still works when called directly from TOAD or SQL*Plus, even under the user ANONYMOUS.
    * When called from APEX and the target database is Oracle 11g, it still works.
    * When called from APEX and the target database is Oracle 10g, it takes several minutes and we receive this error:
    *"Socket read timed out"*
    We have tested the following workaround:
    We have created a database link to our own database and called the stored procedure through that database link.
    FILE_READER_REMOTE_API.openConnection*@loopback*(user, password, host, port, service);
    This works, but is not really an option.
    I hope some one of you can explain this strange behaviour to me.
    Best regards,
    Matthias

    You wrote
    "Java stored procedures -- by definition - are stored in the 8i rdbms. !!"
    From the Oracle8i Java Stored Procedures Developer's Guide
    Release 8.1.5
    A64686-01
    "If you create Java class files on the client side, you can use loadjava to upload them into the RDBMS. Alternatively, you can upload Java source files and let the Aurora JVM compile them. In most cases, it is best to compile and debug programs on the client side, then upload the class files for final testing within the RDBMS"
    This means that you can create shared classes that are used on both the client and server side. The source does not need to reside within the server (according to their documentation). Please also note the following from the Oracle8i JDBC Developer's Guide and Reference Release 8.1.5 A64685-01 for using the getConnection() method on the server:
    "If you connect to the database with the DriverManager.getConnection() method, then use the connect string jdbc:oracle:kprb:. For example:
    DriverManager.getConnection("jdbc:oracle:kprb:");
    Note that you could include a user name and password in the string, but because you are connecting from the server, they would be ignored."
    So if you're coding a shared class that is to run on both the client and server side, you might do something like this:
    Connection conn =
    DriverManager.getConnection(
    System.getProperty("oracle.server.version") == null
    ? "jdbc:oracle:thin:@hostname:1521:ORCL"
    : "jdbc:oracle:kprb:"),
    "youruserid","yourpassword");
    As stated earlier, the userid and password are supposedly ignored for server connections retrieved in this manner. I haven't tried this yet, but it is documented by Oracle.
    Regards,
    Steve
    null

  • Calling stored procedure inside AM. DB connection and updates on act/passiv

    Hi Experts,
    Currently in my application we have view objects and also we have some stored procedure calls to insert and update data (in the procedure we don't commit it. Due to the volume and complexity we couldn't migrate all the procedures). After the stored procedure call we do refresh the VO (Also in the EO we have checked necessary attributes to refresh on update and insert) to pick up the changes that happened in the stored procedure call. It is working fine and i can be able to see the updated values in the VO after the procedure call. However
    Now my question is what will happen on activation and passivation? In the passivation the pinned DB connection is released and used for another AM. Will the stored changes will be rolled back. I mean the DB transaction. If rollback then the VO updates based on the procedure call will be also rolled back? I have tested this behaviour after disabled the AM pooling and set the pool size to 1. It is working but failing some times (In the procedure i have data insert for the child table, after the refresh i could be able to see the child VOs, some times empty child). Did anyone try this approach before?
    Also what will happen if AM goes to passivation during the stored procedure executing ( i am getting the DB connection from getDBTransaction(() method). When i was testing i got the resultset null and i checked the stack and it was due to the connection closed). If AM behaves it like that is it reliable to use procedure call inside the AM?
    Looking forward you expertise answers.
    Thanks

    Hi,
    I agree with Frank.
    In our application we always commit after calling PL/SQL procedures which performs DML-Statements (insert, update, delete).
    Without commits you will - beside the passivation problem - face problems with locked records in the database.
    To refresh the values from DB we use the "restore current row after rollback" approach (which is applicable for commit too).
    regards
    Peter

  • Stored Procedure Call with Connection Pools

    Hi everybody,
    I have changed my Database-Connection to Connection Pooling.
    No I try to call a stored procedure like this:
    Connection connection;
    CallableStatement callStmt;
    Integer sp_result;
    //--- Set callable stored procedure
    String call = "{?=call myStoredProcedure(?,?,?)}";
    try {
    if( connection != null ) {
    callStmt = connection.prepareCall( call );
    callStmt.registerOutParameter( 1, java.sql.Types.INTEGER );
    callStmt.setInt( 2, 3 );
    callStmt.setString( 3, plz );
    callStmt.setString( 4, ort );
    callStmt.execute( call );
    sp_result = new Integer( callStmt.getInt(1) );
    callStmt.close();
    result = sp_result.intValue();
    } else {
    log.error( "Connection = null" );
    } catch( SQLException ex ) {
    log.error( ex.toString() );
    ServletUtils.forwardRequest(this, request, response,
    "/error.jsp", "errorMsg", ex.toString() );
    Without Connection Pooling, my Connection is of
    'weblogic.jdbc.mssqlserver4.MicrosoftConnection'
    With Connection Pooling my Connection is of
    'weblogic.jdbc2.rmi.SerialConnection'
    And now, the stored procedure can't be found anymore.
    There comes an SQLException:
    Gespeicherte Prozedur 'myStoredProcedure' konnte nicht gefunden werden.
    Severity 16, State 62, Procedure 'myDBServer null', Line 5
    One possibility is that the SerialConnection can't call the stored procedure
    like the Microsoft-specific Connection (I use MS-SQL-Server)
    Another is that the call have to be another stucture.
    I would be pleased if somebody is expirienced in this behaviour.
    Thousand thanx,
    Hammer.

    You need to use a DataModifyQuery as your query does not return anything.
    James : http://www.eclipselink.org

  • Java stored procedures connection context

    In my Oracle database there are two java stored procedures:
    A java stored procedure P1 having
    Connection conn1 = DriverManager.getConnection("jdbc:default:connection")
    and
    a java stored procedure P2 having
    Connection conn2 = DriverManager.getConnection("jdbc:default:connection")
    P1 calls P2 using conn1.CallableStatement.
    Here is the question: does P2 inherit the connection
    context conn1 (so that actualy conn2 = conn1) or P2's transactional
    scope is separate from P1's one?
    Thanks,
    -Eugene

    AFAIK, when you run Java in the database, for local SQL data access, there is only one default connection per session, P1 and P2 should share the same transaction context.
    Kuassi

Maybe you are looking for

  • Automatic Clearing with remainder

    Hello all We have a requirement to use automatic clearing to clear down customer accounts that show a credit balance, and leave an AB document on the customers account for the remaining credit balance. Any thoughts Warwick

  • Content Server error TEST: CL_HTTP_CLIENT= CREATE failed

    Hi, I have installed Content managment server successfully. but I m facing this error when I am trying to create a content repositry in OAC0 can any one help..??? Content Managment - windows 2008 r2 SAP - Solaris sparc10 Edited by: letzfriend on Jan

  • Can't remember the last time I shut down properly!

    Well, my story may be similar to others around here so I will make it quick. I got my MBP 17" 2.33 Core 2 Duo last December, and all was running smooth as it should. During this time I had also bought myself a Netgear 802.11n router and some 11n PCI

  • How do I uninstall Firefox and other related files from a Mac laptop computer?

    I want to remove Firefox and other files that may not be removed from my Mac laptop computer. How do I do this?

  • Why can't I process kodak 1015 using camera raw?

    This camera is registered as ok for use with PS CS3 which I'm using.  Whenever I use Bridge and try to process a picture (.kdc) it tells me it doesn't recognize it, which it should as far as I can tell.  I just bought the camera partly for the camera