plsql « oracle « Java Database Q&A





1. When should you use java stored procedures with an Oracle database ... what are the drawbacks?    stackoverflow.com

PL/SQL is not my native tongue. Oracle supports writing stored procedures in Java. What are the advantages of doing this over writing the stored procedures in PL/SQL

2. How to pass Map to Oracle PL/SQL function?    stackoverflow.com

I would like to create an equivalent if this Java method as PL/SQL function in Oracle 10g:

String myMethod(int par1, Map<String, Object> par2);
Is it possible to pass a Map (or some simillar ...

3. Launch Oracle stored-procedure in Java code    stackoverflow.com

I wrote a stored-procedure in Oracle and now, I want to launch it in Java code. I will describe a problem. I have a object type:

TYPE PERSON_TYPE AS OBJECT (ID NUMBER(38), NAME ...

4. Call PL/SQL Web Toolkit procedures from Java    stackoverflow.com

I need to call some PL/SQL procedures from my Java application. I can do it with JDBC. But the problem is that procedures are using the "PL/SQL Web Toolkit" ...

5. how can the PL/SQL datatype BINARY_INTEGER materialized as Java types?    stackoverflow.com

What would be the datatype in java equivalent to the PL/SQL datatype BINARY_INTEGER?

6. Are there different methods to call Java from Oracle Application Express    stackoverflow.com

Friends, I'm working on a requirement where I need to call a Java API from Apex. The solution I put forward was to create a Java class, store it the database ...

7. Oracle stored function/procedure with VARRAY or user-defined type as IN parameter    stackoverflow.com

I've defined VARRAY of a user-defined type such as this :

CREATE OR REPLACE TYPE TEST_T  AS OBJECT 
  (C1 VARCHAR2(20 BYTE), C2 VARCHAR2 (11 Byte));
CREATE OR REPLACE TYPE ...

8. Are anonymous blocks stored parsed in the SGA?    stackoverflow.com

I have discovered recently that's possible to call anoymous blocks from jdbc like this:

    String plsql = "BEGIN" +
          ...

9. How can I generate list of classes in order of dependency?    stackoverflow.com

I'm doing a build script for a Java application to run inside the Oracle JVM. In order to import the 50-odd classes, it appears I need to bring them in in ...





10. Problem trying to export java source code from an Oracle database    stackoverflow.com

I am trying to export the source for a java object from an oracle database using the following code.

DECLARE
  blob1 BLOB;
BEGIN
  DBMS_LOB.CREATETEMPORARY(blob1, FALSE);
  DBMS_JAVA.EXPORT_SOURCE('OBJECTNAME', 'SCHEMANAME', blob1);  
END;
Whenever ...

11. Calling an Oracle PL/SQL procedure with Custom Object return types from 0jdbc6 JDBCthin drivers    stackoverflow.com

I'm writing some JDBC code which calls a Oracle 11g PL/SQL procdedure which has a Custom Object return type. Whenever I try an register my return types, I get either ...

12. Accessing the Custom Object Return type from ojdbc6 JDBC Thin Drivers    stackoverflow.com

I'm writing some JDBC code which calls a Oracle 11g PL/SQL procdedure which has a Custom Object return type. I can get the code to call the procedure, but how do ...

13. Invoking a PL/SQL function from EclipseLink    stackoverflow.com

I'm trying to execute a PL/SQL function in EclipseLink which uses Oracle Specific types(eg. Boolean). I've tried using PLSQLStoredProcedureCall which complains that I'm not executing a procedure and I have tried using ...

14. Using UTL_FILE to pull data from an Oracle server to a local file system using JDBC?    stackoverflow.com

I need to consume a file that is being generated on an Oracle server and I have been told to get it using the UTL_FILE package. I intend on consuming ...

15. JDBC result set from an Oracle PL/SQL stored procedure    stackoverflow.com

What does oracleClose() and oracleCloseQuery() do in sqlj.runtime.ExecutionContext.OracleContext. Since we upgraded jdbc driver jar to ojdbc5.jar with the oracleClose() in the finally block we get the below exception when using resultset.next() ...

16. Java: Send array to a PL-SQL function    stackoverflow.com

I need to pass an array of objects to a PL-SQL function My ORACLE code:

CREATE OR REPLACE
TYPE
        uu.ITEMTAB AS TABLE OF ITEMREC; 
/

CREATE OR REPLACE
TYPE
 ...





17. Applying Oracle PL/SQL via JDBC    stackoverflow.com

Is it possible to create/replace PL/SQL via the Oracle JDBC driver, i.e not via SQLPLus* ? Update 1: Driver: ojdbc14 (JDBC) Update 2: Change is being applied to oracle via Ant <SQL> task, ...

18. JDBC + PL/SQL = Is it so simple, or is there a catch?    stackoverflow.com

I am planning to execute Oracle PL\SQL blocks via JDBC (can't test it yet, question of few days). Is there anything I should know? Does everything work as it used to ...

19. Using Java in Oracle database    stackoverflow.com

my current java code is deployed to the DB and the plsql code calls it and uses it. I need to get the Java code out of the database and still be ...

20. Oracle Store Procedures Automation    stackoverflow.com

I am currently working on the process of automating the creation of store procedure and functions in oracle DB I am using java to automate the process of creating store procedures ...

21. Implement the Business Services in PL/SQL or Java? Favor/Cons?    stackoverflow.com

I work for an enterprise that will create a web-service stack architecture (probability rest based), im the technical leader envolved. This architecture will be created using the Java Platform, but I ...

22. Assertion failure Aurora (ORA-29516) in Oracle 10g on loadjava    stackoverflow.com

public class HelloWorld{  

  public static void add(int a, int b){  
  System.out.println(a+b);  

  }  
}
and I load it into oracle via
loadjava -user ...

23. How to setup concurrent calls in Oracle 10g Java VM    stackoverflow.com

If somebody can explain me how to properly configure plsql java wrapper when different database users invoke same procedure to ensure correct concurrent resource access handling. DBMS and JAVA: Oracle 10g, internal ...

24. how to write a oracle function to update tables on different schemas    stackoverflow.com

hello i'm porting a wbsphere application to tomcat, i have to work on two database on the same server and i've integrated tomcat with atomikos transactionessential. This is my first project with ...

25. Creating function in an Oracle database using java directly    stackoverflow.com

I understand that it is possible to create java function in an oracle database using the command CREATE JAVA - look here. I have been reading a lot ...

26. Call Java Cryptography Architecture (JCA) from PL/SQL    stackoverflow.com

Is it possible to access (call) Java Cryptography Architecture (JCA) classes from PL/SQL? For example, when stored procedure are running. P.S. The big task is to validate digital signature (RSA) in PL/SQL. ...

27. Pl/sql %RowType in JDBC    stackoverflow.com

I have been trying to execute a Oracle Stored procedure which returns %ROWTYPE using JDBC, as i mentioned below

  OracleCallableStatement ocs = (OracleCallableStatement)conn.prepareCall("begin <PackageName>.procedureName(?,?,?,?); end; ");
  ocs.setString(1, "001");
 ...

28. oracle 11g database and java 1.5 problem    stackoverflow.com

            ^
x.vmesniki.frkws.X.runtime.XX_LiteralSerializer:32: cannot find symbol
symbol  : class CombinedSerializer
location: class x.vmesniki.frkws.X.runtime.XX_LiteralSerializer
    private CombinedSerializer myns2_string__java_lang_String_String_Serializer;
    ...

29. Executing PL/SQL Begin/End procedure from Oracle JDBC thin driver    stackoverflow.com

I am trying to create Oracle PL/SQL procedures and execute them via Oracle JDBC (thin driver). Here is the full PL/SQL script:

begin
for i in (select owner, constraint_name, table_name from all_constraints ...

30. How to pass a List<> to an Oracle stored procedure    stackoverflow.com

I have code that already stores String data inside a SQL table using a stored procedure:

// my DAO
public class SomeProcedure extends StoredProcedure {
    public void process (String data) ...

31. Call Oracle object-oriented PL/SQL member procedures from JDBC    stackoverflow.com

In object-oriented PL/SQL, I can add member procedures and functions to types. An example is given here:

create type foo_type as object (
  foo number,

  member procedure proc(p in number),
 ...

32. Money computations, comparison between java and Oracle/PL SQL which to use    stackoverflow.com

Guys can you give a good comparison regarding Oracle/PL SQL and Java in terms of their strengths and weaknesses when handling monetary computations. If you were to develop an application ...

33. Trying to run PL/SQL script using Java    stackoverflow.com

I'm familiar with Java JDBC and use it often to run simple SQLs. However, I want to run something like the below. This is more PL/SQL than regular SQL, hence my ...

34. using record types - declaration and body in package    stackoverflow.com

I have problem with my package its looks like:

create or replace
PACKAGE pac AS
  TYPE A IS RECORD
(
  aa VARCHAR2(255)
);

 TYPE B is ARRAY(1) of A;

 PROCEDURE proc1( som OUT ...

35. How to return an array from Java to PL/SQL?    stackoverflow.com

I have no problems to pass numbers and strings back and forth from PL/SQL to Java, but how do I pass arrays ? I'm calling Java from PL/SQL - not other ...

36. xml publisher template    stackoverflow.com

I am trying to edit the template on the data definitions "Standard Purchase Order Data Source". Unfortunately I am not able to edit the template as the update button wont enable. Could ...

37. Cannot read value from SYS_CONTEXT    stackoverflow.com

I have a PL/SQL procedure which sets some variable in user session, like the following:-

Dbms_Session.Set_Context(
    NAMESPACE =>'MY_CTX',
    ATTRIBUTE => 'FLAG_NAME',
    Value => ...

38. How do I call by JDBC a PL/SQL function that returns an UDO and interpret that result?    stackoverflow.com

Say my UDO (user defined object) is:

create or replace
TYPE UDO_PERSON AS object (NAME VARCHAR2(100), AGE INTEGER);
And I have a PL/SQL function
create or replace
FUNCTION CREATE_A_PERSON(NAME VARCHAR2)
RETURN UDO_PERSON
AS  
    ...

41. Advice: Need a path for a quick start in using Java and Oracle PL/SQL    coderanch.com

Good Afternoon, all; Recently, I changed careers from HP Openview Administrator to Oracle Developer at an urban University in Detroit, Michigan. I get all of the PL/SQL I can eat . . .I mean type, but, I am greedy!! I have a novice Java background, but no place to exercise it on a daily basis. And, I see how much you ...

42. JDBC call to PLSQL block having Oracle type object parameter    coderanch.com

Hi Guys, I have been atempting migration from Oracle 9i to 10g(both app server and DB) for my application and am stuck on two issues related to Oracle TYPE parameters. 1. When the "Type" parameter in IN/OUT we get the "protocol violation" error, and if we change the parameter to just IN it completes the JDBC call successfully without error. 2. ...

43. How can I call java class methods in Oracle 10g PL/SQL    java-forums.org

Hello, I have a problem. I want to call my java class and method from Oracle 10g PL/SQL. But I don't know how I can do this. Simply I do the following application. In server side PL/SQL read data from forms and moves this data to the file. In java class, the java method opens the file with given path and ...

44. Oracle and PL/SQL 10g Training CDs and Multiple versions of Java...    java-forums.org

Context: I'm in the middle of training myself how to use Oracle and the PL/SQL technology with the 10g training CDs. These CDs are part of the "Oracle University Technology-Based Training" and I believe they came with some of the books I acquired through a co-worker... Each CD provides movie-like sequences that explain whatever aspects each disc covers, complete with audio ...

45. oracle pl/sql    forums.oracle.com

I am a java daveloper and have poor sql skills but sometimes you come across a situation where you have to manipulate data yourslef and thats why I am here. I know this is not an oracle forum but i am hopeful since this is a basic question somebody would be able to help. I want to run the following commands ...

46. how to implement asynchronous invocation of oracle PL/SQL stored procedure    forums.oracle.com

Hi friends! Is there any way to invoke pl/sql stored procedures asynchronously from inside a standard client-server application (not j2ee application)? I wonder if it is possible without using a dedicated application server. So i'm not planning to create or deploy any middle tier components as well as to deploy my pl/sql procedure as a web service... Thanks in advance . ...

47. Returning Oracle PLSQL Array to Java code ( incorrect Array type code)    forums.oracle.com

----- Java Code calling the PLSQL function to return an array ----- import java.sql.*; import oracle.jdbc.driver.*; import oracle.sql.*; class Array { public static void main(String args[]) throws Exception { DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@ccdev3:1521:CAM2D3","hst","hst"); OracleCallableStatement stmt = (OracleCallableStatement)conn.prepareCall( "begin ? := TEST_PKG_FP.getSimpleArray; end;" ); // The name we use below, SIMPLEARRAY, matches the name of our // type we defined ...