Ez Publish Extension for Oracle(R) Database 2.0 Ez Publish Extension Manual

Ez Publish Extension for Oracle(R) Database 2.0 Ez Publish Extension Manual

eZ Publish Extension for Oracle(R) database 2.0 eZ Publish Extension Manual ©1999 – 2010 eZ Systems AS Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License,Version 1.2 or any later version published by the Free Soft- ware Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license can be downloaded from http://www.gnu.org/copyleft/fdl.html. Corrections and/or suggestions might be sent to [email protected]. This PDF file is generated automatically from the online documentation available at http://doc.ez.no. This version was generated on January 9, 2011. Contents 1 Concepts and basics5 2 Requirements6 3 Installation7 3.1 Automated initialization............................. 13 3.2 Manual initialization............................... 16 3.3 Configuring eZ Publish............................. 19 4 Clustering 25 5 Oracle specific notes 28 2 List of Figures 3 Introduction The purpose of this manual is to introduce and describe the eZ Publish Extension for Oracle Database (also known as the ”ezoracle” extension or ”database extension”) version 2.0, which makes it possible to use Oracle as a database server for eZ Publish 4.1. The sections contained within this manual will help you to understand the following issues: • The purpose of the ”ezdb” library • When the database extension is needed and when it isn’t • How to create a new eZ Publish site running on an Oracle database • How to migrate an existing eZ Publish site from MySQL to Oracle Important note People previously unfamiliar with Oracle should read the ”Oracle specific notes (page 28)” section first. 4 Chapter 1 Concepts and basics The eZ Publish Extension for Oracle Database (also known as the ”ezoracle” extension or ”database extension”) makes it possible to use Oracle as a database server for eZ Publish. The communication/interaction between eZ Publish and the database is done via the ”ezdb” library, which provides a database abstraction layer. This allows developers to access the database using a generic/unified API that is independent when it comes to different databases and their specific ways of doing things. The ”ezdb” library supports MySQL and PostgreSQL databases by default. The database extension contains a database driver implementation (also called the ”ezoracle” database handler) that makes it possible for the ”ezdb” library to connect to an Oracle database. The extension itself makes use of the PHP Oracle functions. This means that you have to make sure that your PHP installation supports Oracle. Refer to the documentation of PHP for more information. You need to use the database extension if you wish to do one of the following: • Create a new eZ Publish site that uses an Oracle database from the beginning. • Migrate an existing site that uses a MySQL database to Oracle. • Access an external Oracle database from an eZ Publish site using the ezdb abstraction layer Note that migration from PostgreSQL is not supported. In addition, once you have migrated from MySQL to Oracle, migrating back to either MySQL or PostgreSQL is not a trivial task, and the database extension does not provide scripts for that. If your site is running on MySQL/PostgreSQL and you do not plan on migrating to Oracle but only need to execute a few Oracle queries (e.g., you need to fetch some data from the Oracle database for one of your pages), you can choose between the following alternatives: • Install the database extension and interact with the Oracle database using the wrapper functions provided by the ”ezdb” library. • Do not install the extension and interact with the Oracle database directly using the PHP Oracle functions. Be aware that if the external Oracle database is later replaced by another database solution (MySQL, PostgreSQL, MSSQL, etc.), you will have to rewrite parts of the code that make direct use of the Oracle database functions. 5 Chapter 2 Requirements The following list shows the requirements for using the database extension v.2.0. 1. eZ Publish version 4.1 or higher. 2. Oracle Database server software version 9i, 10g or 11g. 3. Oracle Database client software version 9 or higher (Oracle Instant Client is ok). The SQL*Plus command line tool is recommended. 4. The PHP version that is required for your specific eZ Publish version, with Oracle sup- port. It is strongly recommended to use a recent stable version of the OCI8 extension module for PHP (version 1.2.5 or 1.3.5 at the time of writing). Refer to the OCI8 changelogs for more information about latest versions of the extension. 5. Proper Oracle environment variables setup (refer to the documentation of the PHP Or- acle functions and the SQL*Plus tool for more information). Note that eZ Publish 4 requires a UTF-8 database, and thus the character set component of the NLS LANG vari- able can only be set to UTF-8 (”AL32UTF8”). This variable must be set if you use Oracle Database server version prior to 9.2. 6. A user that has the following system privileges on the Oracle database server: Privilege Description CREATE SESSION Connect to the database. CREATE TABLE Create tables in own schema. Also allows the creation of indexes (including those for integrity constraints) on table in own schema. CREATE TRIGGER Create a trigger in own schema. CREATE SEQUENCE Create a sequence in own schema. CREATE PROCEDURE Create stored procedures, functions, and packages in own schema. It is recommended that the user also has unlimited quota on the tablespace in which the user schema has been created. This is due to the fact that eZ Publish is a content management system, and therefore it needs to be able to store large amounts of data. The size of the site is usually proportional with the storage needs. 6 Chapter 3 Installation This chapter explains how to install version 2.0 of the database extension. The installation typically consists of the following steps: 1. Choose the appropriate installation method 2. Check the requirements 3. Unclusterize images and other files (optional) 4. Make a backup of your current system (optional) 5. Download and unpack the database extension 6. Test connection to an Oracle database server 7. Test Oracle support in PHP 8. Enable the extension 9. Create and initialize an Oracle database for eZ Publish • Automated initialization (page 13) • Manual initialization (page 16) 10. Configure eZ Publish 11. Clear the caches 12. Import the unclusterized data to the database (optional) Note that for the sake of simplicity, this installation manual uses the term ”instance name” when referring to connect identifiers. For example, ”an instance called X” usually means ”an instance that can be connected to using X as a connect identifier”, where X is most likely defined in your ”tnsnames.ora” file. When using the easy connect naming method, which enables you to connect to an Oracle database without using a ”tnsnames.ora” file, a connect identifier could be something like ”//dbserver.example.com:1521/ORCL”. 7 8 1. Choose the appropriate installation method Before installing the database extension, read the ”Concepts and basics (page5)” section carefully in order to find out about the purpose of the extension and the possible limitations. There are two possible ways of installing the database extension: • Migrating an existing eZ Publish site from MySQL to Oracle. • Creating a new eZ Publish site that uses an Oracle database from the beginning. The first option assumes that you have eZ Publish already installed and configured. A typical example is when you have an eZ Publish site which is created by the setup wizard using either the ”Plain site”, ”Website Interface” or ”eZ Flow” site packages. If the site runs on a MySQL database, you can migrate it to Oracle without breaking the existing functionality. The other option assumes that an eZ Publish distribution is downloaded and unpacked to a web-served directory. All further configuration will be done manually. The setup wizard cannot be used in this case. Therefore, if you want to install any of the standard site packages (such as Plain site, eZ Flow, or the Website Interface), you should choose the first option. 3 If your existing site uses the clustering functionality, you will have to unclusterize the data when migrating from MySQL to Oracle (see step 3 in the instructions below). If you want to continue using clustering after migrating to Oracle, the files should be imported to the new database at a later stage (see step 12). This is because eZ Publish does not use the same database tables for clustering on an Oracle database, and thus the clustering tables cannot be converted automatically when importing the database structure (and data) from MySQL. This will be improved in the future (refer to this page for more information). 2. Check the requirements Verify that the requirements (page6) for the database extension are met. 3. Unclusterize images and other files (optional) If your existing site stores images, binary files and content-related caches in a MySQL database, you must unclusterize the data before migrating to Oracle. Read the instructions on the ”Reverting a cluster setup” documentation page to learn how this can be done. If your existing site does not use the clustering functionality (or if you want to create a completely new site running on Oracle), skip this step. 4. Make a backup of your current system (optional) If you are planning to migrate an existing site that uses MySQL to Oracle, you should make a backup of both the eZ Publish directory itself and the MySQL database. Even though the chances for something going wrong are slim, it is still strongly advised to make a backup.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    31 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us