Copyright (c) 2001, 2009 Oracle. All rights reserved. NAME README - Oracle Multimedia OraDAV Driver Information ======================= Contents ======== Overview Oracle Multimedia OraDAV Driver and Container Concepts Preinstallation Requirements Installing Oracle Multimedia OraDAV Driver in Oracle Database Creating an Oracle Multimedia Container in Oracle Database Configuring OraDAV to Access Oracle Multimedia Content Restarting Oracle HTTP Server Overview ======== This kit provides native WebDAV support for managing Oracle Multimedia content in an Oracle database. This kit enables you to build a customized and integrated content solution that supports the following capabilities: o HTTP access to browse Oracle Multimedia content o HTTP WebDAV access to lock, edit, read, and write Oracle Multimedia content o Mapping of content from arbitrary tables containing LOBS or Oracle Multimedia objects to enable access by WebDAV clients such as Microsoft WebFolders This installation enables you to drag and drop a Web site that contains content into a schema. In addition, it enables you to serve that Web site from the Oracle database and edit it using standard WebDAV clients such as WebFolders. Supported WebDAV clients include WebFolders, Windows 2000, Windows XP, Macromedia Dreamweaver, Macromedia UltraDev, Adobe Go-Live 5.0, sitecopy, and cadaver. Supported standard HTTP clients include Internet Explorer, Netscape, Firefox, Lynx, and Mac OS X. Using OraDAV, you can also expose existing Oracle Multimedia objects in tables and schemas that have already been populated by other applications. Oracle Multimedia OraDAV Driver and Container Concepts ============================================== Oracle Multimedia OraDAV Driver enables WebDAV access to media content in an Oracle database. WebDAV is a protocol extension to HTTP 1.1 that supports distributed authoring and versioning. WebDAV enables the Internet to become a transparent read and write medium, where content can be checked out, edited, and checked in to a URL address. The mod_dav module is an implementation of the WebDAV specification. The standard implementation of the mod_dav module supports read and write access to files. OraDAV is the Oracle implementation of WebDAV. OraDAV refers to the capabilities available through the mod_oradav module, which is an extended implementation of the mod_dav module. The mod_oradav module can read and write to local files or to an Oracle database. The Oracle database must include an OraDAV driver (a stored procedure package) that the mod_oradav module calls to map WebDAV activity to database activity. Essentially, the mod_oradav module enables WebDAV clients to connect to an Oracle database, read and write content, and query and lock documents in various schemas. The mod_oradav module is integrated with the Oracle HTTP Server, which is the Web server component of Oracle Application Server 10g or Oracle Fusion Middleware 11g. Each OraDAV driver manages documents in a repository in an Oracle database by providing support for the following WebDAV functions over the Internet: - Reading and writing documents - Locking and unlocking documents - Managing hierarchies of information, including the following: * Creating them * Populating them * Deleting them - Retrieving properties associated with documents - Associating properties with specific documents Oracle Multimedia OraDAV Driver consists of a set of PL/SQL packages installed in the ORDSYS schema. This driver manages a specific repository, which is called an Oracle Multimedia container (or a container) in an Oracle database. This container includes tables to store media content by default. This container also includes housekeeping tables that enable the driver to provide WebDAV functions on the media content. The Oracle Multimedia container can be created in any user schema. Preinstallation Requirements ===================================== Oracle Multimedia OraDAV Driver requires the following software components: o Oracle Application Server 10g Release 2 (10.1.2) Infrastructure, or Oracle Application Server Release 3 (10.1.3) Basic Installation, or Oracle Portal 11g Release 1, as follows: - OracleAS 10.1.2 Infrastructure includes: Oracle HTTP Server and Oracle Database 10g Release 1 - OracleAS 10.1.3 Basic Installation includes: Integrated Web Server, J2EE Server, and Process Management - Oracle Portal 11g Release 1 is a component of Oracle Fusion Middleware 11g Release 1, which contains Oracle HTTP Server with OraDAV o Oracle Database 11g Release 1 or 11g Release 2 Installing Oracle Multimedia OraDAV Driver in Oracle Database ====================================================== Check the following environment settings before proceeding to the installation: o The environment variable ORACLE_HOME is defined. o The environment variable PATH includes the directory /bin. o On UNIX, the environment variable contains the directory /lib. Follow these steps to install the Oracle Multimedia OraDAV driver: Step 1 Change directory to the admin subdirectory that is local to this kit. The admin subdirectory should contain the orddavin.sql script and the Java class file OraGMTOffset.class. Step 2 Run the following command-line tool to load the OraGMTOffset Java class into the Oracle database you intend to use with Oracle HTTP Server: ------------------------------------------------------------------------- loadjava -force -grant PUBLIC -resolve -schema ORDSYS OraGMTOffset.class ------------------------------------------------------------------------- Step 3 Using SQL*Plus, connect as SYSDBA to the Oracle database you intend to use with Oracle HTTP Server. Then, run the following SQL command to install the Oracle Multimedia OraDAV Driver script (orddavin.sql): NOTE: This script also grants the EXECUTE privilege to the user PUBLIC for the driver package. ------------------------------------------------------------------------- alter session set current_schema = "ORDSYS"; @orddavin.sql ------------------------------------------------------------------------- NOTE: To deinstall the Oracle Multimedia OraDAV driver, connect as SYSDBA to the Oracle database and run the following SQL command: ----------------------------------------------------------------------- alter session set current_schema = "ORDSYS"; @orddavdein.sql ----------------------------------------------------------------------- Creating an Oracle Multimedia Container in Oracle Database =================================================== The Oracle Multimedia container is created in a single database schema, the one to which you will connect. The schema must be granted these privileges: - CONNECT - RESOURCE - CREATE VIEW - DROP TABLESPACE - CREATE TABLESPACE - CREATE ANY TRIGGER Connect to this schema using SQL*Plus. Enter the command SET SERVEROUTPUT ON, and then run the orddavcc.sql script from the admin folder in the kit. This script will prompt you for input when creating a container. First, you will be prompted for the container name. The Container Name option is a prefix of 20 characters or less. It will serve as a prefix for all the tables, views, indexes, sequences, triggers, and tablespaces that are generated for the container. Choose a container name whose prefix will not cause namespace clashes with other DDL objects that have already been created in the schema. Next, you will be prompted for the container size. The Container Size option is the size of the storage you want to allocate for the content. It is an integer that represents megabytes of storage. Choose a number that will not exhaust the disk space on the system where the Oracle database is running. When the container is created, two tablespaces are generated. Twenty percent of the storage allocation is used to create a tablespace that holds the OraDAV housekeeping tables, including all the DDL objects that were created for the container. The remaining eighty percent is used to create another tablespace that is dedicated to the media storage. NOTE: The size of the container dictates how long the orddavcc.sql script will run. If you are creating a large amount of storage, expect a long delay before the script returns control and reports that it has completed. A NoExecute option is supported if you want to generate a script for creating the container without executing any DDL. You can execute this script in SQL*Plus later. Use this option after familiarizing yourself with the system tables created, and when you want to tune the physical storage characteristics of the the container tables. You will also be prompted for the log file directory and the log file name. The LogFileDirectory option prompts you for a file directory to which the Oracle database has been configured to write using the UTL_FILE utility. Logging is done by the server on the server system, rather than by SQL*Plus or the client. The LogFile option is a file that captures all the DDLs that are generated while creating a container. This is useful for recreating the container or tuning storage attributes. This option uses UTL_FILE directives. Tracing is an alterative way of letting you see the DDL that is generated. Tracing output is raw DDL that is generated, and that is less readable than the log file. Tracing output is a good way to see what was built, or to debug problems with the DDL that is executed. NOTE: The logic to create a container will back out of the creation of DDL objects if it cannot complete the entire operation. Example: ---------------------------------------------------------------------- $ sqlplus SCOTT@MyOracleService Enter password: SQL> SET SERVEROUTPUT ON SQL> @orddavcc -- Enter a container name (<= 20 characaters). This will -- serve as a prefix for all the tables, views, triggers, -- indexes, and tablespaces created for the container. -- Default: oradav Container Name: mywebsite -- Enter a container size in megabytes (e.g. 1000) that -- you want for the two tablespaces created for the -- container. Twenty percent of this size will be used -- to create a tablespace for the OraDAV housekeeping -- tables created for the container. The other eighty -- percent will be used for the tablespace that owns -- the media content. -- Default: 1000 Minimum:100 Container Size:1000 -- Enter Y if you do not want to execute the create -- container logic, but only want to generate a script -- (i.e. logfile) which can later be executed directly -- in SQL*Plus. -- Default: n NoExecute :n -- Enter a log file directory if you want to log the -- output of all DDL that is generated to create the -- container. Note that the log file directory MUST -- BE writable by the UTL_FILE utility. -- Default: LogFileDirectory: -- Enter a log file name if LogFileDirectory is set. -- Default: container_install.sql LogFile : -- Enter Y if you want tracing enabled. This means -- that DDL is generated and sent to serveroutput. -- To enable this option, enter the following command -- in SQL*Plus: -- SET SERVEROUTPUT ON -- Default: n Trace Output :n -- Enter Y if you would like a small index.html file -- to be added to the container that is being created. -- This index.html file can later be deleted or -- overwritten with any DAV client. It serves as an -- easy way to visually verify successful container -- creation through a Web browser. -- Default: y Add index.html : y -- Enter Y if you would like the multimedia content to -- be stored in three separate tables of ORDImage, -- ORDAudio, and ORDVideo objects. -- Otherwise, all files will be stored as BLOBs. -- Default: y Use Oracle Multimedia objects : y -- Enter the server directory (including the trailing -- slash, if appropriate) where tablespace data files -- for the container are to be created. If you press -- Enter, the default location for your database will -- be used. -- Default: Tablespace datafile directory : PL/SQL procedure successfully completed. ----------------------------------------------------------------------- NOTE: Oracle recommends checking the tables that are created for the container. As shown in the following example, there should be fifteen tables prefixed with the specified container name. And, the table mywebsite$path should contain three entries: the root, a default index.html file, and a .jpg file. Example: ----------------------------------------------------------------------- SQL> select table_name from user_tables where table_name like '%MYWEBSITE%'; TABLE_NAME ------------------------------ MYWEBSITE$ACE MYWEBSITE$ASL MYWEBSITE$AUDIO MYWEBSITE$BLOB MYWEBSITE$CONTAIN MYWEBSITE$CONTENT MYWEBSITE$IMAGE MYWEBSITE$LOCKS MYWEBSITE$MIME MYWEBSITE$PATH MYWEBSITE$PRINCIPAL MYWEBSITE$PROP MYWEBSITE$STORE MYWEBSITE$TBLOB MYWEBSITE$VIDEO SQL> select path from mywebsite$path; PATH ----------------------------------------------------------------------- / /index.html /clipimg1_50.jpg ----------------------------------------------------------------------- NOTE: To drop the container, call the script orddavdc.sql as follows: ----------------------------------------------------------------------- SQL> @orddavdc ----------------------------------------------------------------------- Configuring OraDAV to Access Oracle Multimedia Content =============================================== To access Oracle Multimedia containers through WebDAV, you must configure the OraDAV parameters used by Oracle HTTP server to map a URL location to a container in an Oracle database as follows: Add a directive in your Oracle HTTP Server configuration file (i.e. httpd.conf or mod_oradav.conf). Then, insert the following line (DAV Oracle) with the required connection information and other options (see DAVParams), as described in the following paragraphs: DAV Oracle For a directive, DAV will be enabled for that portion of the URL namespace. The "DAV Oracle" directive does not contain sufficient information for OraDAV to execute. OraDAV requires the following connection information: - The Oracle database to be connected - The container schema - The container to be used Specify the connection information with the following parameters: DAVParam OraConnect DAVParam OraUser DAVParam OraPassword DAVParam OraContainerName DAVParam OraPackageName You can specify these optional debug parameters as follows: DAVParam OraException DAVParam OraTraceLevel For example, suppose mod_oradav.conf had the following entry: DAV Oracle DAVParam OraConnect database-host:database-port:database-sid DAVParam OraUser SCOTT DAVParam OraPassword tiger DAVParam OraContainerName mywebsite DAVParam OraPackageName ordsys.dav_api_driver DAVParam OraLockExpirationPad 0 DAVParam OraException NORAISE DAVParam OraTraceLevel 0 DAVDepthInfinity ON DAVMinTimeout 5 Options Indexes Oracle HTTP Server would map the location ('/oradav') to the Oracle Database using the connection information "database-host:database-port:database-sid". It would connect to the database schema as user "SCOTT" using the password "tiger". And, it would manage the data in the container "mywebsite" in the "SCOTT" schema. The full URL would be "http://mywebserver/oradav/". This URL would be specified in a WebFolder or some other WebDAV client connection. For more details about how to configure OraDAV, see Oracle HTTP Server Administrator's Guide 10g or Oracle Fusion Middleware Administrator's Guide for Oracle Portal 11g. Restarting Oracle HTTP Server ========================== You can restart Oracle HTTP Server using the opmnctl command in Oracle Application Server 10g or Oracle Portal 11g. For example, enter the following command: ---------------------------------------------------------------------- opmnctl restartproc ias-component=HTTP_Server ---------------------------------------------------------------------- For more details, see Oracle HTTP Server Administrator's Guide 10g or Oracle Fusion Middleware Administrator's Guide for Oracle Portal.