I have noticed there's no datasource for Oracle in CakePHP 2.0 for the moment, although it seems they are working on in it now: http://ask.cakephp.org/questions/view/any_news_about_oracle_datasource_with_cakephp_2_0
There are some people explaining how to use an Oracle DB adapting some code from CakePHP 1.3:
http://www.hassanbakar.com/2012/01/09/using-oracle-in-cakephp-2-0/
http://liamgraham.wordpress.com/2007/04/19/using-oracle-with-cakephp-15-minute-blog-tutorial/
But I'm not sure that's the correct way. If it was so simple, they would have released the feature already for CakePHP 2.X...
Would I have any trouble using that "cheat"?
I want to connect CakePHP with PL/SQL procedures and a desktop application and they are working over Oracle. I can not change that.
After asking some CakePHP developers I came out with the conclusion that it is not possible to use an Oracle Database with CakePHP 2.3 if you want to make a proper use of CakePHP Models and their query syntax. There's no yet available any driver for Oracle in CakePHP which is completely functional.
Therefore, the solution I found was to use the OCI8 Functions of PHP.
Like this i could use oci_parse to directly query against the DB or rather call a PL-SQL procedure which is what I finally decided to do. (because of the sql functions complexity and the division of task inside my work group)
Now, I can not make use of many of the advantages of using CakePHP models, but It was the only way.
There is a new CakePHP 3 Driver for Oracle Database released (MIT) and working with Oracle 11g and Oracle 12c databases. Some features:
Triggers
Sequences
Cursors
Stored procedures
Packages
All the basic CRUD features to allow select/insert/update/delete rows.
CakePHP Pagination
CakePHP Bake code generation
Check the Documentation here, and the release announcement here.
Related
I have to do a query into an Oracle Database (11g) to extract an HTML file that is stored as a BLOB (yes BLOB, not CLOB) from my Rails 4 Application. So far while working with this database, since it is not well designed, I have been using a number of workarounds to get what I need to out of it. Unfortunately these are no longer working properly, and it would appear that the easiest way to get the HTML file, to later render in my Rails App, would just be to query the Oracle DB for it.
I have googled around on this issue, but everything I have found on the matter with any body to it is from a couple of years ago and no longer of much use to me. So I was wondering if anyone could tell me the best way to connect to an Oracle 11g Database for a single query from a Rails 4 Application / point me in the right direction to find documentation that will help me accomplish this.
Important to Reiterate: I am not trying to get this working with ActiveRecord as my primary DB for my app, instead I need to send one query and manipulate the response of that query.
The ruby-OCI8 gem can be configured to make a single SQL query to an Oracle Database, the docs have instructions on how to set up the necessary Oracle Instant Client.
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.
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.
working on an Drupal architecture where I'd like to have a stand alone Drupal/DrupalCommerce installation with product definition based on content coming from an apart Oracle DB.
Does anybody have experience in integration between Drupal and ORacle.
I'm not speaking about replacing MySQL by ORacle but by using ORacle content in specific modules.
What is the best connections options : XML-RPC, REST, WebServices/SOAP ...
Did you try to define the Oracle database as a secondary database in the Drupal settings file?
http://www.php.net/manual/en/book.oci8.php
http://drupal.org/project/oracle
If you manage to connect, you could then write a custom module to switch to the secondary database, retrieve the data from the Oracle database and bring it into the Drupal context.
I would like to find out if you found other solutions.
I have 2 databases, Oracle and SQlite. And I want to create exact copies of some of the Oracle tables in SQLite in one of my applications. Most of these tables contains more than 10,000 rows so copying each table by going through each row programmatically is not efficient. Also the table structure may change in the future so I want to achieve this using a generic way without hard-coding the SQL statements. Is there a any way to do this?
p.s. - This application is being developed using Qt framework. All the queries and databases are represented by QtSql module objects.
Can't help with Qt framework, but for large amounts of data is is usually better to use bulk-copy operations.
Export data from Oracle
http://download.oracle.com/docs/cd/B25329_01/doc/admin.102/b25107/impexp.htm#BCEGAFAB
Import data into SQLite
http://www.sqlite.org/cvstrac/wiki?p=ImportingFiles
IHTH
What you probably really want to use is the Oracle Database Mobile Server, which can automatically synchronize a SQLite and an Oracle Database.
The recent release of the Oracle Database Mobile Server (formally called Oracle Database Lite Mobile Server) supports synchronization between an Oracle Database and a SQLite or a Berkeley DB database running on the client. It supports both synchronous and asynchronous data exchange, as well as secure communications between client and server. You can configure the Mobile Server to synchronize based on several options without the need to modify the application that is accessing the database.
You can also find an excellent discussion forum for questions from developers and implementers using the Mobile Server.