From 32212fb6a0fffc1e5ddd772653f0736a4f3c2d57 Mon Sep 17 00:00:00 2001 From: Carla Schroder Date: Wed, 20 Apr 2016 14:24:48 -0700 Subject: [PATCH 1/2] consolidate oracle pages, move to enterprise section --- admin_manual/configuration_database/index.rst | 1 - .../linux_database_configuration.rst | 101 +----------------- .../enterprise_installation/index.rst | 1 + .../oracle_db_configuration.rst | 39 +++++++ 4 files changed, 41 insertions(+), 101 deletions(-) rename admin_manual/{configuration_database => enterprise_installation}/oracle_db_configuration.rst (88%) diff --git a/admin_manual/configuration_database/index.rst b/admin_manual/configuration_database/index.rst index 17aa1beea..492d92ca8 100644 --- a/admin_manual/configuration_database/index.rst +++ b/admin_manual/configuration_database/index.rst @@ -7,4 +7,3 @@ Database Configuration db_conversion.rst linux_database_configuration.rst - oracle_db_configuration.rst diff --git a/admin_manual/configuration_database/linux_database_configuration.rst b/admin_manual/configuration_database/linux_database_configuration.rst index 67e1f0a07..bdca8e28d 100644 --- a/admin_manual/configuration_database/linux_database_configuration.rst +++ b/admin_manual/configuration_database/linux_database_configuration.rst @@ -13,7 +13,7 @@ The MySQL or MariaDB databases are the recommended database engines. Requirements ------------ -Choosing to use MySQL / MariaDB, PostgreSQL, or Oracle as your database requires that you install and set up the server software first. +Choosing to use MySQL / MariaDB, PostgreSQL, or Oracle as your database requires that you install and set up the server software first. (Oracle users, see :doc:`../enterprise_installation/oracle_db_configuration`.) .. note:: The steps for configuring a third party database are beyond the scope of this document. Please refer to the documentation for your specific database choice for instructions. @@ -217,82 +217,6 @@ this: "dbhost" => "localhost", "dbtableprefix" => "oc_", -Oracle Database -~~~~~~~~~~~~~~~ - -If you are deploying to an Oracle database make sure that you have installed -and enabled the `Oracle extension `_ in PHP. The PHP configuration in -:file:`/etc/php5/conf.d/oci8.ini` could look like this: - -:: - - # configuration for PHP Oracle extension - extension=oci8.so - -Make sure that the Oracle environment has been set up for the process trying to use the Oracle extension. -For a local Oracle XE installation this can be done by exporting the following environment variables -(eg. in :file:`/etc/apache2/envvars` for Apache) - -:: - - export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib - -Installing and configuring Oracle support for PHP is way out of scope for this document. -The official Oracle documentation called `The Underground PHP and Oracle Manual `_ -should help you through the process. - -Creating a database user for ownCloud can be done by using the sqlplus command line interface -or the Oracle Application Express web interface. -The database tables will be created by ownCloud when you login for the first time. - -To start the Oracle command line mode with a DBA account use:: - - sqlplus system AS SYSDBA - -After entering the password a **SQL>** prompt will appear. Now enter the following lines and confirm them with the enter key: - -:: - - CREATE USER owncloud IDENTIFIED BY password; - ALTER USER owncloud DEFAULT TABLESPACE users - TEMPORARY TABLESPACE temp - QUOTA unlimited ON users; - GRANT create session - , create table - , create procedure - , create sequence - , create trigger - , create view - , create synonym - , alter session - TO owncloud; - -.. note:: In Oracle creating a user is the same as creating a database in other RDBMs, so no ``CREATE DATABASE`` statement is necessary. - -You can quit the prompt by entering:: - - exit - -An ownCloud instance configured with Oracle would contain the hostname on which -the database is running, a valid username and password to access it, and the -name of the database. The :file:`config/config.php` as created by the -:doc:`../installation/installation_wizard` would therefore contain entries like -this: - -:: - - "oci", - "dbname" => "XE", - "dbuser" => "owncloud", - "dbpassword" => "password", - "dbhost" => "localhost", - -.. note:: This example assumes you are running an Oracle Express Edition on - ``localhost``. The ``dbname`` is the name of the Oracle instance. - For Oracle Express Edition it is always ``XE``. Troubleshooting --------------- @@ -363,25 +287,6 @@ the respective host name:: (1 row) postgres=# \q -**Oracle**: - -On the machine where your Oracle database is installed, type:: - - sqlplus username - -:: - - SQL> select * from v$version; - - BANNER - -------------------------------------------------------------------------------- - Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production - PL/SQL Release 11.2.0.2.0 - Production - CORE 11.2.0.2.0 Production - TNS for Linux: Version 11.2.0.2.0 - Production - NLSRTL Version 11.2.0.2.0 - Production - - SQL> exit Useful SQL commands ~~~~~~~~~~~~~~~~~~~ @@ -390,22 +295,18 @@ Useful SQL commands MySQL : SELECT User,Host FROM mysql.user; PostgreSQL: SELECT * FROM pg_user; - Oracle : SELECT * FROM all_users; **Show available Databases**:: MySQL : SHOW DATABASES; PostgreSQL: \l - Oracle : SELECT name FROM v$database; (requires DBA privileges) **Show ownCloud Tables in Database**:: MySQL : USE owncloud; SHOW TABLES; PostgreSQL: \c owncloud; \d - Oracle : SELECT table_name FROM user_tables; **Quit Database**:: MySQL : quit PostgreSQL: \q - Oracle : quit diff --git a/admin_manual/enterprise_installation/index.rst b/admin_manual/enterprise_installation/index.rst index 485e0f690..2f7b9717b 100644 --- a/admin_manual/enterprise_installation/index.rst +++ b/admin_manual/enterprise_installation/index.rst @@ -8,4 +8,5 @@ Enterprise Subscription Installation (ES Only) linux_installation supported_apps_installation license_keys_installation + oracle_db_configuration \ No newline at end of file diff --git a/admin_manual/configuration_database/oracle_db_configuration.rst b/admin_manual/enterprise_installation/oracle_db_configuration.rst similarity index 88% rename from admin_manual/configuration_database/oracle_db_configuration.rst rename to admin_manual/enterprise_installation/oracle_db_configuration.rst index ca8d70e46..cca88660d 100644 --- a/admin_manual/configuration_database/oracle_db_configuration.rst +++ b/admin_manual/enterprise_installation/oracle_db_configuration.rst @@ -173,3 +173,42 @@ The configuration file should look something like this: 'dbpassword' => '********', 'installed' => true, ); + +Useful SQL Commands +------------------- + +**Is my dB Reachable?** + +On the machine where your Oracle database is installed, type:: + + sqlplus username + +:: + + SQL> select * from v$version; + + BANNER + -------------------------------------------------------------------------------- + Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production + PL/SQL Release 11.2.0.2.0 - Production + CORE 11.2.0.2.0 Production + TNS for Linux: Version 11.2.0.2.0 - Production + NLSRTL Version 11.2.0.2.0 - Production + + SQL> exit + +**Show Database Users**:: + + Oracle : SELECT * FROM all_users; + +**Show available Databases**:: + + Oracle : SELECT name FROM v$database; (requires DBA privileges) + +**Show ownCloud Tables in Database**:: + + Oracle : SELECT table_name FROM user_tables; + +**Quit Database**:: + + Oracle : quit From 8a810752f24348d1ade176fb3afc09ab95d498cc Mon Sep 17 00:00:00 2001 From: Carla Schroder Date: Thu, 21 Apr 2016 07:45:28 -0700 Subject: [PATCH 2/2] minor corrections to Oracle docs --- .../configuration_database/linux_database_configuration.rst | 3 ++- .../enterprise_installation/oracle_db_configuration.rst | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/admin_manual/configuration_database/linux_database_configuration.rst b/admin_manual/configuration_database/linux_database_configuration.rst index bdca8e28d..a552bd2d1 100644 --- a/admin_manual/configuration_database/linux_database_configuration.rst +++ b/admin_manual/configuration_database/linux_database_configuration.rst @@ -13,7 +13,8 @@ The MySQL or MariaDB databases are the recommended database engines. Requirements ------------ -Choosing to use MySQL / MariaDB, PostgreSQL, or Oracle as your database requires that you install and set up the server software first. (Oracle users, see :doc:`../enterprise_installation/oracle_db_configuration`.) +Choosing to use MySQL / MariaDB, PostgreSQL, or Oracle (ownCloud Enterprise Subscription only) as your database requires that you install and set up the server software first. +(Oracle users, see :doc:`../enterprise_installation/oracle_db_configuration`.) .. note:: The steps for configuring a third party database are beyond the scope of this document. Please refer to the documentation for your specific database choice for instructions. diff --git a/admin_manual/enterprise_installation/oracle_db_configuration.rst b/admin_manual/enterprise_installation/oracle_db_configuration.rst index cca88660d..e8327956b 100644 --- a/admin_manual/enterprise_installation/oracle_db_configuration.rst +++ b/admin_manual/enterprise_installation/oracle_db_configuration.rst @@ -177,7 +177,7 @@ The configuration file should look something like this: Useful SQL Commands ------------------- -**Is my dB Reachable?** +**Is my Database Reachable?** On the machine where your Oracle database is installed, type::