can i install moodle with oracle database

can i install moodle with oracle database

by baraa abd el-hady -
Number of replies: 7
I want to install moodle on my server but i have alot of courses that i need to use a strong database so i want to install the moodle with oracle datebase

what are the steps ?

is it need a coding part or not ?

Average of ratings: -
In reply to baraa abd el-hady

Re: can i install moodle with oracle database

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
If you want a strong database on which to run Moodle, then use Postgres.

Oracle may be many things (expensive to buy and expensive to administer spring to mind wink) but it is not a good database to run Moodle on for two reasons:

1. Oracle does not follow the SQL standard very closely, so Moodle has to jump through hoops to make it work at all. (The worst, to my mind, is that it cannot distinguish an empty string from NULL). Jumping through those hoops hurts performance.

2. Oracle's connection protocol (used for transferring data from the database server to the web server) is hopeless for database driven web sites. Martin Langhoff investigated this because he could not believe how bad the performance was, and it turns out it needs a separate connection/package/something for each CLOB or BLOB, and content management applications like Moodle use a lot of those.

The Open University (3 of the 10 biggest Moodle's in the world http://moodle.org/stats/) is currently running happily on Postgres. There is an attempt being made to move all the OU's systems to Oracle, but our initial load testing is showing that using Oracle is at least 10 times slower on equivalent hardware.

Moodle.org, and I would guess a lot of the other big sites, run on MySQL.
Average of ratings: Useful (1)
In reply to Tim Hunt

Re: can i install moodle with oracle database

by baraa abd el-hady -
thanks alot for your replay
sure i am now flowing your advice and downloading the PostgreSQL
but i need to ask you is there any spicial steps to work on PostgreSQL 
what i mean is what i sould to to make moodle see the PostgreSQL  .
In reply to baraa abd el-hady

Re: can i install moodle with oracle database

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Just like any database, you need to create a user name, password and database for Moodle to use, and then type that information into the Moodle installer. The Postgres online does are pretty good.

Also, as with any high-performance system, you need to learn how to measure and tune it. That will apply to both Postgres, but also Apache and PHP. I am sure you can find information by looking through the hardware and performance forum, or at the relevant bits of the administrator documentation on http://docs.moodle.org/.

If you are really serious about this, and have the money, I would suggest paying Catalyst IT (one of the Moodle Partner companies (http://moodle.com/partners/list/) for some consulting. There are both Postgres and Moodle experts.
Average of ratings: Useful (1)
In reply to Tim Hunt

Re: can i install moodle with oracle database

by Luis de Vasconcelos -

Thanks Tim. Interesting stuff!

What about MSSQL? Is it "as bad" as Oracle?

In reply to Luis de Vasconcelos

Re: can i install moodle with oracle database

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I would say not.

If you are a big software company, and you have a near monopoly on part of a market, what you want to do is to make your product as idiosyncratic as possible, and bundle at much functionality into it as possible, in an attempt to lock your exiting customers in, and leverage your monopoly to take over other parts of the market.

If, on the other hand, you are not in a monopoly position, you want standards and interoperability so customers can easily switch.

So, while in the desktop operating system, Microsoft played dirty to keep and abuse its monopoly position (e.g bundling IE with the OS to kill Netscape), in the enterprise database area it was a latecomer to a market dominated by Oracle and IBM DB2, so it had to go the follow standards and reduce vendor lock-in route. It did this as big companies often do when they are lacking a key technology. It bought out a tiny DB company with some good core technology, then through its development resource at it. (I can't remember the details of which company it bought when.) Anyway, the net result is that MSSQL sticks pretty close to the standard in most respects. I think it is just the normal areas like string concatenation and how to select just the first 50 records where it does its own thing, but fortunately the Moodle DB libraries have those parts of SQL nicely abstracted.

Note how my theory ties in with Oracle being one of the incumbents, and not following the standards very closely.


It is also interesting to compare how big commercial software companies behave with how Moodle behaves as a fairly dominant player in the LMS space. No one is trying to extend Moodle to become a full ePortfolio or SIS system. Instead, we are working to make Moodle interoperate smoothly with any other ePortfolio system, and integrate with SISs.
Average of ratings: Useful (1)
In reply to Tim Hunt

Re: can i install moodle with oracle database

by baraa abd el-hady -
realy realy Moodle is a very big and important project.
we are not very big company we are mansoura university
so we realy have avery big users database
and we have alot of courses also
the behave of the moodle become so bad and slowly with this big database because we use mysql
so i think that if i use oracle or Postgres
i am now going to try Postgres
i hope it work fine but i am have abig question is it easy
it it about changing the connection only .
and they are here want to do the exams online can moodle handle this.
laso i have a question can i encrypt the question while they are in the database so no atacker can take these questions because the questions will be the finail exam
In reply to baraa abd el-hady

Re: can i install moodle with oracle database

by alex smith -
yes u can install moodle with oracle database and this requires coding.

try this

What you will need in order to get started:
  1. An Oracle Database with a UTF-8 character set and the following format for a tnsnames.ora (which is a result of creating the Database, so this may not be useful until later)
  • MOODLE =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = Your-Oracle-Server)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = Secondary-Oracle-Server)(PORT = 1521))
    (LOAD_BALANCE = yes)
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = MOOD)
    )
    )
A Red Hat Linux Server with command-line access
  • This is what we used:
    • 2xQuad Core Processor
      2GB RAM
      20GB of disk storage
      OS - Red Hat Enterprise Linux 5 (RHEL 5)
Open up terminal and connect to the server using SSH:
  • ssh -l <yourusername> <your linux server address>

Install php and apache using the yum command from within a superuser account:
  • sudo yum install httpd php

Install php addons (pear, gd, ldap using the yum command from within a superuser account):
  • sudo yum install php-pear php-gd php-ldap php-devel php-xmlrpc php-mbstring (and php-mssql if you have an updated repository like utteramblings)

Start Apache using the redhat start script:
  • sudo /etc/init.d/httpd start

Help Document for starting Apache in Red Hat.

Navigate to your web accessible directory:
  • cd /var/www/html

Get The Latest version of Moodle using wget:

Unzip Moodle:
  • sudo unzip moodle-weekly-19.zip

Make Directory Writable to allow the install script to create the config.php:
  • sudo chmod -R 0777 moodle

Create a directory for Moodle Data and then set permissions for it, making sure that this directort is not web accessible:

  • cd /var/www
  • sudo mkdir moodledata
  • sudo chmod -R 0770 moodledata
  • sudo chown -R apache moodledata
  • sudo chgrp -R nobody moodledata

Get and Unzip the Oracle Instant Client which can be found here (I have loaded them onto my own ftp server for easier access) into the /var/instantclient/

Go into the Instant Client Directory that was created by unzipping and make a couple of symbolic links:

  • cd /var/instantclient/instantclient_11_1
  • sudo ln -s libclntsh.so.11.1 libclntsh.so (The number will change with version number)
  • sudo ln -s libocci.so libocci.so

Use Pear to install oci8 support for PHP (the connection from PHP to Oracle)
  • sudo peardev install pecl/oci8
    • When it asks you for the directory to the instantclient, put it in this format:
      • instantclient,/var/instantclient/instantclient_11_1(Or whatever version number the folder is)



In setting up the Oracle and Php Communication, open up the php.ini file in /etc and make the following modifications:
  • cd /etc
  • sudo vi php.ini

Important Note: Don't forget to enable this variable in your php.ini (or .htaccess) file:

(else, all your data will be escaped following MySQL rules, that are incorrect for Oracle)

 magic_quotes_sybase = On

and


In the Dynamic extensions section (just after the commented-out example entries) add: extension=oci8.so

Restart your Apache:
  • sudo /etc/init.d/httpd stop
  • sudo /etc/init.d/httpd start

Go to the Moodle Installation directory via a browser

Enter in the following information for moodle directories: File?id=dcxbprxw_463d745h6hq_b

In the database connect screen format the database information into the following format:
File?id=dcxbprxw_467dgmhrf5k_b

Keep on clicking next and okay and you should be able to get all the way through to this:
File?id=dcxbprxw_470g9tjhvdk_b

Set the Cron Process by navigating to the /etc directory and putting the command in the crontab (here is a crontab tutorial):

  • cd /etc
  • sudo crontab -e
u can visit

www.learn-Oracle-OLAP.com


for further assistance



Average of ratings: Useful (1)