my dog learned polymorphism*
The moose likes JDBC and the fly likes Stored Procedures Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Stored Procedures " Watch "Stored Procedures " New topic
Author

Stored Procedures

kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1368
My Stored Procedures based on the Oracle DB. If i do DB migration from Oracle to PostgreSQL, can i do any change in the already existing Stored Procedures?
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Stored Procedures are stored in the DB schema they were created in. And normally they will be written in DB-specific procedural language - PL/SQL in the case of Oracle. Postgres does not support PL/SQL, it does however support PL/Perl, PL/Python, PL/pgSQL and PL/TCL. None are exactly like PL/SQL, but will look pretty simmilar. You will have to change all your SPs to be written in one of these and recreate the SPs in your Postgres schema.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1368
Hi Paul,
Java has java stored Procedure, i think it's not dependant on the particular db.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

I am not familiar with a Procedure or StoredProcedure class in the JDK. Which class are you talking about?

Oracle 8i and up does have the concept of a Java Stored Procedure. But this is a proprietory class which runs in the Oracle DB, and can't be run in another database.
[ March 04, 2005: Message edited by: Paul Sturrock ]
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1081

even I dont think java has any stored procdure !!

However Oracle has support FOR using java in PL/SQL


Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Stored Procedures
 
Similar Threads
procedures vs stored procedures
Problem with hibernate
how to change the database?
Calling JDBC or Stored Procedures(in Oracle), which is faster
implementing connection pooling