July 13, 2009

If you have issues with manipulating XMLType columns beyond the 4K limit imposed by character-type handling, Christopher Jones posted code on how to INSERT in Oracle database, since the SELECT and UPDATE are already covered in Underground PHP and Oracle Manual (new manual page).

My free book (see sidebar) has examples of how to do this using CLOB handling in PHP. I noticed that my xmlinsert.php example in the book does a SELECT and UPDATE, but never actually does an INSERT. The INSERT code is conceptually no different from UPDATE but, for completeness, here is an expanded example explicitly showing it

The idea of the code is to use oci_bind_by_name with maxlength=-1 and type=OCI_B_CLOB while you bind value using oci_new_descriptor :

June 30, 2009

OCI8 extension for Oracle have been improved in PHP5.3 with 7 bugs fixed in addition to many improvements and new features mainly :

  • Added Database Resident Connection Pooling (DRCP) and Fast Application Notification (FAN) support.
  • Added support for Oracle External Authentication (not supported on Windows).
  • Improve persistent connection handling of restarted DBs.
  • Added SQLT_AFC (aka CHAR datatype) support to oci_bind_by_name
  • Changed default value of oci8.default_prefetch from 10 to 100.
  • Allow building (e.g from PECL) the PHP 5.3-based OCI8 code with PHP 4.3.9 onwards
  • Provide separate extensions for Oracle 11g and 10g on Windows.
oracle-php

Oracle support for PHP is already 12 years old since the php/fi 2.0, at that time the oracle.c and oracle.h where checked by Stig Sæther Bakken on April 1997. Download PHP 5.3, For users upgrading from PHP 5.2 there is a migration guide available here, detailing the changes between 5.2 and 5.3 releases.

April 20, 2009

Sun and Oracle announced today a definitive agreement for Oracle to acquire Sun for $9.50 per share in cash. The transaction is valued at approximately $7.4 billion, or $5.6 billion net of Sun’s cash and debt. An agreement that will make of Oracle the first competitor to IBM by having Sun technologies in hardware, Java, Operation system (Solaris), Open Office and even the most popular open source database for the web MySQL !

"The acquisition of Sun transforms the IT industry, combining best-in-class enterprise software and mission-critical computing systems," said Oracle CEO Larry Ellison. "Oracle will be the only company that can engineer an integrated system - applications to disk - where all the pieces fit and work together so customers do not have to do it themselves. Our customers benefit as their systems integration costs go down while system performance, reliability and security go up."

The deal could have very positive effect on Oracle business as mentioned Oracle CEO, especially by providing full solution from hardware, operation system, Java, in addition to Oracle business and database solutions. But until the deal close and real result of this acquisition become visible, things might gets worse before it gets better.

Continue reading "Thoughts On Oracle and Sun Deal" »

December 15, 2008

As a DBA, I have been asked many times to provide an ER diagram for an application schema. There are many tools that can do the job, mostly expensive CASE tools which have reverse engineering capabilities. There are also some rather exotic freeware tools which are largely unsupported and difficult to find.

Fortunately, there is a software tool ideal for drawing ER diagrams, called GraphViz. GraphViz is a general tool for drawing all kinds of graphs. It was created by AT&T Research specifically for graph drawing and it uses so called "dot" language. The tool itself is available on the following web page: http://graphviz.org

The tool uses rather simple language called "dot", which would not be a problem to generate by PHP but the task can be simplified even further. It turns out that PHP Extension and Application Repository, known as "PEAR" contains a package with PHP bindings for GraphViz. The home page for this package is http://pear.php.net/package/Image_GraphViz. In order to use GraphViz, one has to install the GraphViz package, highly portable and available for many platforms, both MS Windows and Linux, among others. Installing the PHP bindings for GraphViz with PEAR installer is also a breeze:

#> pear install Image_GraphViz 
downloading Image_GraphViz-1.2.1.tar ... 
Starting to download Image_GraphViz-1.2.1.tar (Unknown size) 
........done: 23,040 bytes 
install ok: channel://pear.php.net/Image_GraphViz-1.2.1 
#> 

Now, let's see the basic elements of the "dot" language:

Continue reading "Drawing ER Diagrams For Oracle Schemas With PHP And GraphViz" »

December 9, 2008

Just in time for the gift-giving season - as mentioned christopher in his blog - annoucing the December edition of the Underground PHP & Oracle Manual. We have announced the previous edition 1.4 of the manual back in may 2007. The current edition is written by Christopher Jones and Alison Holloway, it include 290 pages and 16 chapters and is 50% bigger than the previous edition - unfortunately we don't have the previous edition at this time to compare, but what we can say is that it's a great eBook that you should get for anyone working with PHP and Oracle.

underground-php-oracle
The manual still aims to bridge the gap between the multitude of PHP books and Oracle books on the market. It is still a "braindump" and in no way replaces any of the other PHP-Oracle books in the marketplace. They all cover different aspects of development with PHP and Oracle, and I encourage you to also consider them for your bookshelf.

Download Underground PHP and Oracle Manual [PDF]

April 18, 2008

XpertDeploy is a Developer Application Deployment Tool that have just released today. A solution that helps developers and DB administrators to improve their application deployment and eliminiate wasted time. Below the press release :

xpertdeploy.png

SQL Interpreter Provides Uniform Method for Application Deployment

Georgetown, TX - April 17, 2008 - XpertDeploy, a leading provider of database developer and administrator productivity solutions, announced today the general availability of XpertDeploy™ For Oracle®.

"Tasks associated with deploying updates to our application or with a new application release costs our team 16 - 20 hours of unproductive time per month," said Tom Beggs, Vice President of Information Technology for a logistics software provider. "By using XpertDeploy™ For Oracle®, that wasted time was reduced to just 4 hours, saving us 12 - 16 hours. The system paid for itself the first month".

Continue reading "XpertDeploy For Oracle® Increases Productivity Of Developers Up To 800%" »

Want more?