MySQL/j Stored procedure on Server Failure? is it a bug? workaround?

Hi all, with the release of SE 6 pending, I thought that this issue should be addressed. As I'm not sure if it's a bug or not, I decided to post in this forum to see if anybody has haad experience with it, has a workaround or any other information that could be usefull.
The issue:
MySQL v5.x offers stored procedures. the MySQL/j connector has the ability to call these procedures.
If you run the stored procedure localy through Java, the stored procedure executes perfectly.
Once deployed onto a server, and the stored procedures on the same server in a mysql database and "ALL PRIVILAGES" including "EXECUTE ROUTINE" are granted. The stored procedure fails to run.
The error returned by the mysql/j connector is this :
"Driver requires declaration of procedure to either contain a 'nbegin' or 'n' to follow argument declaration, or SELECT privilege on mysql.proc to parse column types."
Here is a link to a MySQL forum about the issue:
http://forums.mysql.com/read.php?98,67532,67532#msg-67532
So it appears that it is a java issue.
Is there a workaround?
Has anybody successfully been able to use Java with MySQL stored Procedures?? (Pretty sad if we havn't)
Any help on this topic would be greatly appreciated.
cheers!

Yes, I read through the threads, that is Why I cam here after posting back with MySQL trying all the suggeestions, I still can't find the thread from the MySQL/J developer, I did find the one from a MySQL developer though.
We can't actually change permissions oursevles with our currecnt Servlet host.
So they changed permissions for us:
We checked to see if we had permissions, All permissions are granted for the localhost.
currently not sure how to check them for the '%' assignment
Our host also tried to drop the procedurees and create them again with the invoker command, but this was also to no avail.
I was also sure that it was a MySQL issue, but was hoping someobody had another method of a workaround.
It seems to be something to do with Java wanting the metadata for registering output variables.

Similar Messages

  • Getting error code 1 when calling SSIS package from a stored procedure (SQL Server 2008 R2)

    Hello,
    I am trying to execute a SSIS package from SQL Server 2008 R2 stored procedure but getting error code 1 (as per my knowledge, error code description is as below:
    0 The package executed successfully.
    1 The package failed.
    3 The package was canceled by the user.
    4 The utility was unable to locate the requested package. The package could not be found.
    5 The utility was unable to load the requested package. The package could not be loaded.
    6 The utility encountered an internal error of syntactic or semantic errors in the command line.
    Details:
    I have a stored procedure named "Execute_SSIS_Package" (see below sp) which executes 'Import_EMS_Response' SSIS package (when I execute this package directly from SQL Server BID it works fine it means package itself is correct) and calling
    it from SQL as:- EXEC Execute_SSIS_Package 'Import_EMS_Response'.
    Here I receives error code 1.
    Can anyone help me to resolve this issue please?
    Thanks in advance!
    CREATE PROCEDURE [dbo].[Execute_SSIS_Package]
     @strPackage nvarchar(100)
    AS
    BEGIN
     -- SET NOCOUNT ON added to prevent extra result sets from
     -- interfering with SELECT statements.
     SET NOCOUNT ON;
     DECLARE @cmd VARCHAR(8000)
     DECLARE @Result int
     DECLARE @Environment VARCHAR(100)
        SELECT @Environment = Waarde
     FROM  Sys_Settings
     WHERE Optie = 'Omgeving'
     --print @Environment
     SET @strPackage = '"\W2250_NGSQLSERVER\BVT\' + @Environment + '\' + @strPackage + '"'
     SET @cmd = 'dtexec /SQL ' + @strPackage +  ' /SERVER "w2250\NGSQLSERVER"  /Decrypt "BVT_SSIS" /CHECKPOINTING OFF /REPORTING E'
     --print @cmd
     EXECUTE @Result = master..xp_cmdshell @cmd, NO_OUTPUT
     --print @Result
    END

    It has something to do with the security.
    E.g. cmdshell is not enabled or the caller has not rights over the package.
    There could be a syntax error, too.
    I suggest you make the package runnable off a SQL Agent job then trigger the job from the stored proc with
    sp_start_job <job name>
    Arthur
    MyBlog
    Twitter

  • 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

  • Editing Stored Procedures (SQL Server?)

    This may seem like a dumb question but I just finished my project for our Oracle data warehouse and now I need to move on to SQL Server to upgrade those procedures... does SQL Developer not support the editing of SPs for SQL Server? Are the SPs for SQL Server read-only?
    Using SQL Developer Version 1.5.0.53.58
    on Win XP box...
    Thanks!
    Tim

    Hello,
    Please try the following ones:
    http://msdn.microsoft.com/en-us/library/ms190669.aspx
    http://www.sql-server-performance.com/2003/stored-procedures-basics/
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Stored procedure/function deployment failure PLS-00306

    Hi there,
    I'm using
    Oracle 10g2 10.2.0.1.0 (with patch set 1 10.2.0.2.0)
    ODE 10.2.0.2.20
    ODP 10.2.0.2.21
    VS 2005
    I was able to deploy and run .NET procedure/function from within Visual Studio, but after reconfiguring tnsnames.org and listener.org a couple of times, I began to have this weird problem:
    Whenever I deploy a stored procedure (the same one that I could deploy and run without any problem), the icon beside the name of the procedure in the tree list of Oracle Explorer becomes one that has a small "red light" at the corner. The options of "run", "run debug" and "step into" are disabled in the pop-up menu, and if I choose "compile" or "compile debug" from the menu, the "PLS-00306 wrong number or types of arguments in call to 'EXECUTEPROCEDURE'" error will show up -- the same error appears if I execute the procedure in SqlPlus.
    Has anyone ever met this problem before?
    Thanks so much ...

    This is my table structure :
    SQL> desc jobs
    Name Null? Type
    JOB_ID      NOT NULL VARCHAR2(10)
    JOB_TITLE      NOT NULL VARCHAR2(35)
    MIN_SALARY NUMBER(6)
    MAX_SALARY NUMBER(6)
    My Requirement is, User will enter the above field value in the form of array. I need to store these value and after manupulating this I will return that value also.
    Here I am using procedure just for testing purpuse.
    In my case I will take one array argumentlike JOB_ID and after manupulating these data I will return that array value.
    I am also not able to run this example through SQL.
    Can U give me exact code for running this prog.
    create or replace package associative_array as
    -- define an associative array type for each column in the jobs table
    type t_job_id is table of jobs.job_id%type index by pls_integer;
    type t_job_title is table of jobs.job_title%type index by pls_integer;
    type t_min_salary is table of jobs.min_salary%type index by pls_integer;
    type t_max_salary is table of jobs.max_salary%type index by pls_integer;
    -- define the procedure that will perform the array insert
    procedure array_insert (p_job_id in t_job_id,
    p_job_title in t_job_title,
    p_min_salary in t_min_salary,
    p_max_salary in t_max_salary);
    end associative_array;
    create or replace package body associative_array as
    -- implement the procedure that will perform the array insert
    procedure array_insert (p_job_id in t_job_id,
    p_job_title in t_job_title,
    p_min_salary in t_min_salary,
    p_max_salary in t_max_salary) is
    begin
    forall i in p_job_id.first..p_job_id.last
    insert into jobs (job_id,
    job_title,
    min_salary,
    max_salary)
    values (p_job_id(i),
    p_job_title(i),
    p_min_salary(i),
    p_max_salary(i));
    end array_insert;
    end associative_array;
    Regards,
    manish Kumar

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

  • How to execute MYSQL stored procedure  using java

    Hello friend
    I am very new to MYSQL stored procedure how to call external stored procedure , from where i got good tutorials about MYSQL stored procedure and JAVA

    If you need help with MYSQL or stored procedures this is not the place. If you need help with JDBC:
    http://java.sun.com/docs/books/tutorial/jdbc/basics/index.html

  • MySQL Views and Procedures

    I am a newbie using Dreamsweaver MX 2004 with MySQL and php.
    How do I use
    SQL Views and Procedures with Dreamweaver. Can someone point
    me to some
    examples of using them?
    Thank you.....

    Richard Hulbert wrote:
    > The point is that mysqli and stored
    > procedures exist and are a good thing and Adobe should
    IMHO have
    > developed a Server model for that,
    I don't disagree. I submitted a feature request to Adobe as
    far back as
    May 2005 to add support for stored procedures in the
    PHP/MySQL server
    model. The more people who request such features, the more
    likely Adobe
    is to respond:
    http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
    A point that has been made to me frequently by the
    development team is
    the need to prioritize. While a particular feature might be
    highly
    desirable, there's always a tradeoff between the development
    time it
    would involve and the overall impact it would have on users.
    The slow
    takeup of PHP 5 by hosting companies has, I'm sure, had a
    significant
    impact on decisions about PHP support in Dreamweaver. Of
    course, you
    could argue that the situation might have been different if
    Adobe had
    taken the lead in providing support for PHP 5. But doing so
    might
    equally have damaged Dreamweaver's position for those who
    don't use PHP.
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • ERROR WHILE INSERTING BLOBS AS PARAMETERS OF EXISTING STORED PROCEDURE

    I have 2 simple tables to keep large application data (as XMLDOCUMENT in one table and BLOB in another):
    SQL> desc bindata_tbl;
    Name Null? Type
    BDATA_ID NOT NULL NUMBER(10)
    BDATA NOT NULL BLOB
    SQL> desc metadata_tbl;
    Name Null? Type
    MDATA_ID NOT NULL NUMBER(10)
    MDATA NOT NULL SYS.XMLTYPE
    and stored preocedure to input new data into those tables:
    "SP_TEST_BIN_META_DATA"
    i_MetaData in METADATA_TBL.MDATA%TYPE,
    i_BinData in BINDATA_TBL.BDATA%TYPE
    as
    begin
    if i_MetaData is not null then
    insert into METADATA_TBL (MDATA_ID, MDATA)
    values (METADATA_SEQ.nextval, i_MetaData);
    end if;
    if i_BinData is not null then
    insert into BINDATA_TBL (BDATA_ID, BDATA)
    values (BINDATA_SEQ.nextval, i_BinData);
    end if;
    COMMIT;
    -- Handle exceptions
    EXCEPTION
    WHEN OTHERS THEN
    ROLLBACK;
    RAISE;
    end;
    I communicate with database from .Net application using "Oracle.DataAccess 10.1.0.200 (Runtime version v1.0.3705)" component.
    Following procesure is a [simplified] examlple of the code I use, which demonstrates the errors while inserting XMLDOCUMENT and BLOB values simultaneously.
    In my application those should be quite big objects (~200 K XML and ~5-25M binary image data), but following sample keeps failing even with very small-sized objects:
    Line Number
    1          private void PureTest()
    2          {
    3               OracleConnection conn = null;
    4               OracleTransaction tx = null;
    5               OracleCommand command = null;
    6
    7               try
    8               {
    9                    // Open connection
    10                    string strConn = "Data Source=AthenaWf; User ID=AthenaWf; Password=Poseidon";
    11                    conn = new OracleConnection( strConn );
    12                    conn.Open();
    13
    14                    // Begin transaction (not sure if really needed)
    15                    tx = conn.BeginTransaction();
    16
    17                    // Create command
    18                    string strSql = "SP_TEST_BIN_META_DATA";
    19                    command = new OracleCommand();
    20                    command.Connection = conn;
    21                    command.CommandText = strSql;
    22                    command.CommandType = CommandType.StoredProcedure;
    23
    24                    // Create parameters
    25                    // 1) XmlType parameter
    26                    string strXml = "<?xml version=\"1.0\"?><configuration testValue=\"123456789\"/>";
    27                    XmlDocument xmlDoc = new XmlDocument();
    28                    xmlDoc.LoadXml( strXml );
    29                    OracleXmlType oraXml = new OracleXmlType( conn, xmlDoc );
    30                    //oraXml = null;
    31                    //
    32                    OracleParameter xmlPrm = new OracleParameter();
    33                    xmlPrm.ParameterName = "i_MetaData";
    34                    xmlPrm.Direction = ParameterDirection.Input;
    35                    xmlPrm.OracleDbType = OracleDbType.XmlType;
    36                    xmlPrm.Value = oraXml;
    37                    command.Parameters.Add( xmlPrm );
    38
    39                    // 2) Blob type
    40                    byte[] buf = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
    41                    OracleBlob oraBlob = new OracleBlob( conn, true );
    42                    //oraBlob.Write( buf, 0, buf.Length );
    43                    oraBlob = null;
    44                    //
    45                    OracleParameter blobPrm = new OracleParameter();
    46                    blobPrm.ParameterName = "i_BinData";
    47                    blobPrm.Direction = ParameterDirection.Input;
    48                    blobPrm.OracleDbType = OracleDbType.Blob;
    49                    blobPrm.Value = oraBlob;
    50                    command.Parameters.Add( blobPrm );
    51
    52
    53                    // Execute command finally
    54                    command.ExecuteNonQuery();
    55                    tx.Commit();
    56               }
    57               catch( Exception ex )
    58               {
    59                    // Clean-up
    60                    if( command != null )
    61                    {
    62                         command.Dispose();
    63                    }
    64                    if( tx != null )
    65                    {
    66                         tx.Dispose();
    67                    }
    68                    if( conn != null )
    69                    {
    70                         conn.Dispose();
    71                    }
    72
    73                    // Display error message
    74                    MessageBox.Show( ex.Message, "Error" );
    75               }
    76          }
    If I try insert only XMLDOCUMENT object (lines 30, 42 are commented out, 43 IS NOT) - everything is OK.
    If I try to insert only BLOB object (lines 30, 42 are NOT COMMENTED OUT, line 43 is commented out) - everything is OK again.
    If I try to insert them both having some values (lines 30, 43 are commented out, 42 is not commented out) - it fails right on "command.ExecuteNonQuery();" (line 54)
    with the following exception:
    "ORA-21500: internal error code, arguments: [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%]".
    Even when I nullify oraBlob before assigning it to OracleParameter value (line 30 is commented out, line 42 and 43 are not) I have the same exception.
    XMLDOCUMENT and DLOB data logically are very coupled objects (in my application), so I really want to insert them simultaneously in one stored procedure in transactional way.
    Is it bug of drivers, server, .net environment, or I miss something in implementation?
    PS. In some articles on Oracle web and in MSDN site I found a mention about necessity of wrapping all write/update operations in a transaction, while working with temporary LOBs. I use it here, but it does not look like changing anything.

    Hello,
    I tested your code with the 10.1.0.4.0 ODP and 10.1.0.4.0 Client and it worked fine.
    Can you please apply the 10.1.0.4.0 patches for both ODP and client to see if this resolves the issue for you.
    Here is the output from the same execution of the ODP application you provided as a testcase. These rows were inserted at the same time when I executed the application and passed the data as parameters to the SP you provided.
    Results of Testing with 10.1.0.4.0
    ==========================
    SQL> select count(*) from BINDATA_TBL
    2 ;
    COUNT(*)
    1
    SQL> select count(*) from METADATA_TBL;
    COUNT(*)
    1
    SQL> select dbms_lob.getlength(bdata) from BINDATA_TBL;
    DBMS_LOB.GETLENGTH(BDATA)
    10
    SQL> select mdata from METADATA_TBL;
    MDATA
    <?xml version="1.0"?><configuration testValue="123456789" />

  • Stored procedure in Sender JDBC Adapter

    Hi All,
    My Scenrio goes like this ...
    Stored Procedure(SQL Server) --- PI  -
    File
    I need to write the results of  stored procedure to File.Here I don't need any mapping.So how many DT , MT and MI need to be created?
    The interface need to run by 6AM from Monday to Thrusday, how can i achieve this ?
    Stored Procedure has only select statement and no Update statement , but it takes Date as Input parameter , so what i need to provide in sender JDBC adapter.
    Thanks,
    Monish

    Hi Monish,
    As per your requirement it is JDBC to File. Please be careful with the structure to be created for sender JDBC. I am unable to understand why you donot require a mapping for this. How XI will send the data to a file then.As per my knowledge if it's file to file and just pick and drop then we can neglect IR and go for ID.But here you are working with JDBC and File so you will be in need of it.
    IR:
    DT: 2
    JDBC_Sender_DT
    File_Output_DT(Optional)
    You can use the JDBC sender data type structure for File output also.
    MT as per your DT
    MI:2
    Outbound MI: JDBC structure
    Inbound MI : File structure
    MM: 1
    IM: 1
    ID as similar to other scenarios.All 1 objects for RD,ID,Sender Agreement and Receiver Agreement.
    Sender JDBC channel:
    Query: Select * from table where date
    But I have a query how are you providing date in input paramerter.It will be dynamically entered into the query right.
    You can mention the Avalibility planning for your interface to work in RWB.
    Go to RWB>Component Monitoring>Adapter Engine->Communication Channel Monitoring>Avaliablity Planning
    Please explain.
    Regards,
    Nutan

  • Error Calling Stored Procedure Receiver adapter

    Hi Guys,
    I am trying to send data to a stored procedure SQL server R2 2008 from SAP PI7.11.
    Transport Protocol: JDBC2.0
    Message Protocol : XMLSQLFORMAT
    I am able to read from same database using sender adapter.
    Name of SP:  InderTest
    Paramters in SP :      @Carrier Varchar(20), @Location Varchar(20), @Product Varchar(20), @Zone Varchar(20),
         @dteStart date, @dteEnd date, @strType Varchar(1),     @intRate Float
      <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MT_FreightPricing xmlns:ns0="http://na.holcim.com/pi/o2c/pricingmaster">
    - <StatementName1>
    - <InderTest action="EXECUTE">
      <table>InderTest</table>
      <Carrier isInput="true" type="VARCHAR">4000004</Carrier>
      <Location isInput="true" type="VARCHAR">3600</Location>
      <Product isInput="true" type="VARCHAR">3553</Product>
      <Zone isInput="true" type="VARCHAR">Zone1</Zone>
      <dteStart isInput="true" type="DATE">20110704</dteStart>
      <dteEnd isInput="true" type="DATE">20120704</dteEnd>
      <strType isInput="true" type="VARCHAR">A</strType>
      <intRate isInput="true" type="FLOAT">10.00</intRate>
      </InderTest>
      </StatementName1>
      </ns0:MT_FreightPricing>
    Error in JDBC Receiver
    Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'InderTest' (structure 'StatementName1'): java.lang.IllegalArgumentException
    Any clue...
    I was reading this help document. They have mentioned 5 configuration step, i have worked on JDBC earlier but never did anything like that.... Any idea ?
    http://help.sap.com/saphelp_nw70/helpdata/en/b0/676b3c255b1475e10000000a114084/content.htm
    Regards
    Inder

    <table> element is optional in the structure. In that case you can try:
    <?xml version="1.0" encoding="UTF-8" ?>
    <ns0:MT_FreightPricing xmlns:ns0="http://na.holcim.com/pi/o2c/pricingmaster">
    <StatementName1>
    <InderTest action="EXECUTE">
    <Carrier isInput="true" type="VARCHAR">4000004</Carrier>
    <Location isInput="true" type="VARCHAR">3600</Location>
    <Product isInput="true" type="VARCHAR">3553</Product>
    <Zone isInput="true" type="VARCHAR">Zone1</Zone>
    <dteStart isInput="true" type="DATE">20110704</dteStart>
    <dteEnd isInput="true" type="DATE">20120704</dteEnd>
    <strType isInput="true" type="VARCHAR">A</strType>
    <intRate isInput="true" type="FLOAT">10.00</intRate>
    </InderTest>
    </StatementName1>
    </ns0:MT_FreightPricing>
    Regards
    Raj

  • STORED PROCEDURE & DATABASE TRIGGER

    제품 : FORMS
    작성날짜 : 1995-11-07
    * STORED PROCEDURE
    1. Oracle Forms 4.5에서는 PL/SQL Code를 Server-Side에 저장하거나 Forms 내 Trigger, Procedure로 갖을 수도 있다.
    다음과 같은 경우 Procedure를 Database Server에 저장하는 방법을 선택하는
    것이 좋다.
    - Procedure가 Standard한 기능을 제공하여 다른 Tool이 공유할 수 있을 때.
    - Procedure가 중요한 DML 기능을 가질 경우.
    - Oracle Forms 4.5에서는 PL/SQL의 Version을 1.1까지 지원하므로, PL/SQL
    Version 2.X 의 기능이 필요한 경우.
    2. Stored Procedure의 제한사항
    (1) Server가 7.0 이상이어야 한다.
    (2) Pass되는 Variable은 2000 Byte이하이어야 한다.
    - 2000이 넘으면 Truncate가 되고, PL/SQL에서 Value_Error Exception이
    발생한다.
    (3) Menu PL/SQL에서는 Stored Procedure와 Function을 부를 수 없다.
    (4) Stored Subprogram의 정의가 바뀐 경우, Forms를 다시 Server와 Connect
    하기 전에는 영향을 주지 않는다.
    3. Oracle 7 Server 에서 제공하는 Standard Package들
    - dbms_alert
    - dbms_ddl
    - dbms_describe
    - dbms_lock
    - dbms_mail
    - dbms_output
    - dbms_pipe
    - dbms_session
    - dbms_snapshot
    - dbms_standard
    - dbms_transaction
    - dbms_utility
    < Oracle7 Developers Guide 참조>
    4. Calling Stored Procedures
    (1) Database Procedure는 Server-Side PL/SQL Engine에 의해 실행되도록
    Design된 PL/SQL Block이다.
    (2) Stored Procedure를 Call하기 위해서는 EXECUTE Privilege가 필요하다.
    (3) Server-Side Procedure와 Forms에서의 PL/SQL의 중요한 차이점은
    Server-Side 에서는 Forms의 Bind Variable (:Block_Name.Item_Name 등)
    을 인식하지 못한다는 것이다.
    (4) Parameter/Return이 가능한 Data Type
    - VARCHAR2 : Maximum of Varchar2(2000)
    - NUMBER
    - DATE
    - BOOLEAN
    제한사항
    - TABLE%ROWTYPE, TABLE.COLUMN%ROWTYPE으로 정의된 것은 Reference가
    안된다.
    - Unsupported Parameter나 Return Value를 사용하면 다음의 Error가
    발생한다.
    * PL/SQL error 313 at line xxx, column yyy 'PROCNAME'
    not declared in this scope.
    * PL/SQL error 201 at line xxx, column yyy identifier 'FUNCTNAME'
    must be declared.
    (5) Formal Parameter의 Default Value
    - Defulat Value는 제공하지 않는다.
    - User가 임의로 줄 수 있다.
    - Procedure Private_Test(a in VARCHAR2 := 'Hello' b in
    VARCHAR2 := 'There') IS
    BEGIN
    Dbms_Output.Put_Line(a);
    Dbms_Output.Put_Line(b);
    END;
    (6) 다른 User의 Stored Subprogram이나 Remote Database를 Call하려면
    - User Name이나 Database Link명을 숨기기 위하여 Synonym을 생성하여야
    한다.
    - CREATE SYNONYM lib_hr_syn FOR libowner.lib_hr;
    - Program에서 Call할 때에는 ss_num ;= lib_hr_syn.get_ssn(:EMP.EMPNO);
    5. PL/SQL Compiler가 해당 Procedure를 찾는 순서
    (1) Current PL/SQL Block 내에 정의되어 있는가?
    (2) Standard PL/SQL Command인가?
    (3) Oracle Forms 내의 Built-in Procedure 혹은 Function인가?
    (4) User_Named Procedure 혹은 Function인가?
    (5) Server-side에 정의된 DBMS_STANDARD Package인가?
    (6) Current user가 Server-Side의 어떤 Procedure나 Function을 Access
    하는가?
    * 이상의 질문에 대하여 전부 'NO'라는 대답이 나오면 Compiler는 다음과 같은
    Error Message를 준다.
    - PL/SQL error 313 at line xxx, column yyy 'PROCNAME' not declared in
    this scope.
    - PL/SQL error 201 at line xxx, column yyy identifier 'FUNCTNAME'
    must be declared.
    * DATABASE TRIGGER
    1. Database Trigger는 Forms에서의 Trigger와 개념적으로 거의 동일하다.
    차이점은 Trigger가 Fire되는 원인을 제공하는 사건과 후속코드가 실행되는
    장소가 틀린 것이다.
    2. Database Trigger는 Table과 연관된 PL/SQL Block들이다. Table에 대한
    UPDATE, INSERT, DELETE 등의 행위에 의해 Fire된다.
    3. Error 발생 시에는 RAISE_APPLICATION_ERROR Built-In Procedure를 사용하
    여 Error를 표시한다.
    RAISE_APPLICATION_ERROR Procedure에서는 Error Number가 20000 - 20999의
    Range를 가진다.
    4. Creating & Editing Database Triggers
    아래와 같은 적절한 권한이 주어진다면 Forms Designer Mode에서 Database
    Trigger를 직접 Create, Edit, Compile, Browse 할 수 있다.
    - Execute Privilege, Create Privilege, Compile Privilege,
    Drop Privilege
    * Create하려면
    - Navigator에서 Database Objects와 Table Nodes를 Expand한다.
    - 원하는 Table을 선택하고 Expand한다.
    - Triggers Nodes를 선택하고 Menu Bar의 Navigator*Create를 선택한다.
    - Database Trigger Editor에서 작성, compile한다.
    * Edit 하려면
    - Navigator에서 Database Objects와 Table Nodes를 Expand한다.
    - 원하는 Table을 선택하고 Expand한다.
    - 원하는 Trigger에서 Double-Click하면 Editor가 나타난다.
    - Database Trigger Editor에서 변경, compile한다.

    not possible via forms
    you can debug it on SQL Developer by using manual INSERT Updates commands

  • How to use Parameterized Stored Procedure in OBIEE 10 g..?

    Hi All,
    In my rpd, to load the data in the Physical layer, I'm using a Stored Procedure (*SQL Server Stored Procedure*).
    This stored procedure is using some parameters, so my intention is
    1) Provide prompts for each parameter
    2) Allow the user to select parameter value from the prompt
    Can some one let me know if this is possible and if so how to do this.
    Thanks in Advance
    Mithun

    Dear,
    In report triggers you can write your procedure/functions or call it like
    function AfterPForm return boolean is
    begin
    myprocedure(:mydate);
    return (TRUE);
    end;
    Thanks
    Jamil

  • Stored Procedures - Get Column Information

    Hello,
    I recently switched from ODP Unmanaged to ODP Managed (I'm using Entity Framework).
    The Unmanaged drivers were working fine after adding the necessary information in the web.config section. I could add the stored procedures and generate the complex types using the Function Import - Get Column information.
    After the switch the config section was updated and it all appeared to work. By the way the changes in the format of the config-section is poorly documented - to say the least.
    However when I try to generate the complex types again I just get a "System.notSupportedException" (Message: The specified type is not supported by this selector).
    Was this functionality not ported to the Managed Drivers? Is there something that can be done to enable this functionality?

    The implicit ref cursor config file format is different between Unmanaged ODP.NET and Managed ODP.NET.
    To save yourself from pulling your hair out, do the following -
    1) Install ODT 12.1 if you haven't already
    2) Find the stored procedure in server explorer, right click it and run it, and enter input parameters.
    3) For the output ref cursor that represents the return value for your Entity Function, choose "Add to Config" checkbox.
    4) Then select either "Show Config" (and then cut and paste) or "Add to Config".
    Here is a screenshot of what I am talking about:
    http://i.imgur.com/t1BfmUP.gif

  • Connecting to SQL Server and MYSQL from a Java stored procedure

    hope someone can help with this. i'm trying to connect to different databases (My SQL, SQL Server) from a java stored procedure. when invoking from within an oracle 9i database, i get the java exception error -
    "Cannot connect to MySQL server on 135.177.196.75:3306. Is there a MySQL server running on the machine/port you are trying to connect to?java.security.AccessControlException)".
    this store procedure works fine when invoked from outside of oracle. any replies would be greatly appreciated. thanks!

    the correct drivers have been loaded. it works when called from outside of oracle. only when invoking from within oracle do we get the error message "Cannot connect to MySQL server on 135.177.196.75:3306. Is there a MySQL server running on the machine/port you are trying to connect to?(java.security.AccessControlException)". it sounds like a permissions/security/configuration issue - oracle is not allowing access to the machine/port for the MySQL or SQL Server database. appreciate the responses so far.

Maybe you are looking for