Oracle database - use external Java - oracle

I'm looking to find a way how to use higher versions of Java (1.6,1.7,...) instead of Java 1.4 which is available for Java stored procedures in a Oracle 10g.
I'm thinking about deploying a GlassFish server on the database server, and deploy web applications which functionalities would I use by calling them from PL/SQL.
Reasons for using Java instead of PL/SQL would be communications with various devices, calling and deploying web services, text processing...
Does anybody have a better, simpler idea on how to use higher version Java from PL/SQL in Oracle 10g database?

Forget about that. There used to be something called Jserver several years ago, but it was abandoned by Oracle. Theoretically you could use Oracle ver 12c which uses JVM ver 1.6. But even this JVM is slightly different. For example it's GC can kill threads when they are not bound to a "live" DB connection. So you may encounter various interesting problems.
There is no way how to "upgrade" JVM inside current Oracle DB installation.

Related

Oracle Driver vs JDBC vs. close implementation

We have an external server service running Oracle and we can not access his configuration. We have the code for the application and we are interested in the current implementation of connection.close().
So the question is, running a Oracle 12c database, is it possible to connect to the database using older database driver version such as Oracle 11g? We want to exclude a simple configuration problem by drivers not matching the database product version.
Is there any document (other than JavaDoc) that specificates the implementation behaviour of Connection.close() since the Java spec says its implementation depending and there is no general rule.
If you have Metalink access, you can check MOS note 207303.1 on Client-server interoperability.
In summary, Clients 11.2.0 and above are fully supported; 11.1.0 is supported, but bugfixes are possible only for customers with Extended support.

Porting application which uses Oracle mod_plsql to PostgreSQL

I need to port an application that uses Oracle mod_plsql to PostgreSQL. Currently database procedures are called over HTTP with the use of Apache + mod_plsql. The procedures are easily ported to PostgreSQL, but I can not find a replacement for the Apache + mod_plsql part. Does anybody have any experience on ho to do it and what to use?
UPDATE (to make stuff more clear):
See: http://docs.oracle.com/cd/B14099_19/web.1012/b14010/concept.htm for how mod_plsql work.
What I need is a way to call a function on postgrsql as:
protocol://hostname[:port]/DAD_location/[[!][schema.][package.]proc_name[?query_string]]
ei:
http://www.acme.com:9000/pls/mydad/mypackage.myproc?a=v&b=1
You could fork my NodeJS based implementation of web_plsql as a starting point and "simply" replace the Oracle access with PostgreSQL.
You should be able to use pretty much all of the logic in NodeJS and only need to change the way how the code interacts with the database in the oracle.js module.

Connecting to different database versions

I maintain a set of applications that use Pro*C to connect to Oracle 10g databases. These applications are generally involved with moving data from one database to another. In each case a connection is made to the source database and a separate connection is made to the target database. For reasons that are out of my control the target databases are to be upgraded to 11g whilst the source databases are not. I have searched the internet unsuccessfully, well I have posed the problem as many different ways as I can think of in google, in order to determine whether connecting to different versions of the database is acceptable .The only, almost relevant, documentation I can find is this Can anyone point me to any other documentation that would allay my clients fears?
The official client/ server compatibility matrix for Oracle is My Oracle Support 207303.1 "Client/ Server/ Interoperability Support Between Different Oracle Versions". That is probably the documentation that your clients would want to see.
The quick version is that if your application were to use, say, the 10.2 Oracle client, you would be able to connect to databases from 9.2.0.4 to 11.2.0.x. If your application were to use the 9.2 Oracle client, you'd be able to connect to databases from 8.1.7.x to 11.2.0.x. If you used an earlier version of the Oracle client, you would not be able to connect to an 11.1 or an 11.2 database.

What is an Oracle Client?

I'm from MySQL background and am new to Oracle. I want to know
What is meant by Oracle Client?
What is its use?
What is its equivalent in MySQL ?
Thanks
What is meant by Oracle Client?
and
What is its use?
In this context, a client is a class library (DLL) that allows you to connect remotely to the underlying database of an application. A client, always within the same context, can also be called a .NET Data Provider.
You may have multiple data providers based on the underlying database engine with which you're working.
There was System.Data.OracleClient (deprecated), provided by Microsoft.
There is Oracle.Data.Client, which is actually the best ever built Oracle Client, or Oracle .NET Data Provider. You may also download the latest Oracle 11g Data Provider for .NET.
So, when accessing the Oracle underlying database, make sure your work with this provider, proper for your version of Oracle, and start doing ADO.NET with your favorite database! =P
There are also some other tools that you can work with that will ease your data access code pain, such as Enterprise Library or NHibernate, both are frameworks to basically accessing databases.
Enterprise Library can do even more then that!
And NHibernate is an ORM (Object/Relation Mapping) tool that can work just very fine with Oracle.
Remember though, always use Oracle.Data.Client namespace in the Oracle.DataAccess.dll assembly.
What is its equivalent in MySQL ?
As the equivalence for MySQL, I guess it would be MySQL Connector/NET.
It is the Oracle binaries installed that allow communication with the Oracle database. It can be using SQL*Plus, JDBC (type II or IV) or OCI (Oracle Call Interface).
Its a piece of software that allows a remote computer to talk to Oracle. If you were to write a piece of software that communicated with the database, you would use the Oracle Client to facilitate that communication

HSQLDB Manager?

I have tried SQLite in Java, but the speed is slow due to the JDBC driver. Then I tried HSQLDB and thought the speed is good, but I cannot find a good management tool for HSQLDB such as phpMyAdmin for MySQL or SQLite Manager for SQLite.
I'd like to use the manager tool to prepare the test data for unit tests, or use the manager tool to navigate the data after doing some small experiments.
Is there any good tool?
Here are a couple other suggestions you might checkout:
Squirrel SQL http://squirrel-sql.sourceforge.net/
Execute Query http://executequery.org/
Razor SQL (paid) http://www.razorsql.com/
Razor has the best feature set, but is paid. The others are good at different things and worth checking into.
This would only have meaning if you are running in HSQLDB server mode. If you are running in memory or file mode, then you either can't access the DB from another process or doing so would lock it.
In Server mode you could use any universal client. JDBC driver is the hsqldb.jar itself.
Actually HSQL brings its own management tool (which is not super). See http://hsqldb.org/doc/guide/apf.html
I've used Squirrel SQL. It's a universal client for any JDBC database.
See: http://squirrel-sql.sourceforge.net/

Resources