Why Oracle? Why not an Open Source database such as MySQL, widespreadly used?
Simply because, once again, our goal is to allow people without a technical background to install a platform for analyzing application quality with SONAR. And these people often work in companies where Windows and Oracle are mostly used.
In addition, if MySQL is fairly simple to install and documentation or tutorials fairly easy to meet, this is not the case with Oracle. Many parameters to choose are quite obscure, and furthermore, an error in the installation will often result in an unstable version impossible to recover. This means to perform a complete uninstall and Oracle is even worse to uninstall than to install!
We will see each step one by one and, as in previous articles, with all the illustrations required to prevent any errors. This post will be very long, and will deal only with the installation process. Validation and use of Oracle will be discussed in a future post.
Therefore take time and think everything thoroughly, as some of the settings you may want to use for your installation will be different from mine (language, for example).
Oh yes, I almost forgot: the version of Oracle that we are going to install is an Oracle 11gR2. Make sure beforehand in the installation documentation of SONAR which versions are supported.
You will need an account in order to download Oracle, such as the one you have already created in order to install a JDK,
Once logged in with your account, you can access various links to download various releases of Oracle, from this page: http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html.
In this page, we will choose the 32-bits version for Windows. I recommend you not to take the 64-bits version because there are plenty of software, such as those that you can find to navigate in an Oracle database, operating only in 32 bits mode.So they will not work with an Oracle 64 bits. And exception would be if you want to install a SONAR platform on a shared server. But a 32-bits version is sufficient for your personal environment, such as a laptop for example.
You will have to select the button ‘Accept License Agreement’ to download both zip files corresponding to the Oracle installation.
Warning: you must then unzip these two files in the same directory. therefore:
- Download each file in the same directory.
- Unzip each file into the same directory and not each in its own directory.
Or Oracle would start the installation without checking that it is incomplete, and then will be forced to stop. And you will find yourself in the very difficult position of having to complete an uninstallation of Oracle, with various manipulations not well documented.
In this example, I downloaded the two compressed files (‘win32_11_gR2_database_1of2,zip’ and ‘win32_11_gR2_database_1of2,zip’ in the same directory ‘Oracle’. And I unpacked these two files in the same directory, which had the effect of creating a new folder ‘database’.
Now we can start our installation from this folder.
Double-click this executable: a DOS window opens with the Oracle Universal Installer. Note that it immediately recognizes the ‘spanish’ language on my workstation.
Then the following window will appear, with the installation of Oracle interface and different links in the left bar of the screen corresponding to different views to use. We will examine each of them.
In the first one, Oracle asks to enter an e-mail to receive announcements of updates or security. If you do not wish to receive such mailings, simply activate the button ‘Next’ (or ‘Siguiente’ in the example above).
In the next screen, we will choose the first option to realize a complete installation (software + database).
The second option will involve only the installation of Oracle software, to access an existing database on a network server for example.
The third option would be used to update or upgrade Oracle.
In the next screen (‘System Class’ or ‘Clase de Sistema’), we will choose the second option, to install a server, not just a ‘Desktop’ version. Why? For two reasons:
- To access more options, including settings of the database.
- And because I will have an Oracle installation similar to any customer or company, and therefore will be able to indicate how or to perform any operation (setup, test, up-to-date installation etc.) under the same conditions.
Note the small question mark to the left of the radio button to display online help describing (briefly) this option.
We don’t want to install Oracle on cluster. So we keep the first option selected in the next screen.
In the next screen (‘Install Type’), we will choose the second option (‘Advanced Install’). I like to know what I am installing.
In the screen ‘Product Languages’, the languages available on my laptop is already pre-selected.
We will choose the installation of an ‘Enterprise edition’, for the same reasons as before: it allows me to configure more options and it is also the one I will find in every customer.
Click the ‘Select Options’ button to open the following window. In fact, for an installation on our laptop, we do not need any of these options, which are more about Administration (partitioning, security, etc.). Thus, activate the button ‘De-Select All’ and then ‘Ok’.
Important point: where do we want to install Oracle?
I created a directory ‘C: \ ORA11’ on my hard drive, in which I want to install Oracle. The software itself will be installed in this directory under a folder ‘dbhome_1’.
The notion of ‘dbhome is very important with Oracle, who will use it as an environment variable (and put it anywhere, in the path, the registry, etc.). If you have more than one Oracle installation (or Oracle Forms), you will have several ‘dbhome’ whose management can be complex, even conflicting. And if you search for a solution to any problem or ask for help from a Oracle DBA in your company, you will be asked frequently where is your ‘dbhome’. And if you produce any file or config log, with this ‘dbhome_1’, everyone will understand what it is.
So we’ll leave it ‘dbhome_1’ by default.
On the next screen, we leave checked the first option for a classic transactional database:
The next screen asks us to enter the name of the database that we will create. The default ‘orcl’ will be understood by everyone but has the disadvantage to not indicate the location of the database. As I will sometimes be required to work on a remote Oracle database on a server, as well as on my own local database, I’ll name it with the name of my workstation (JP) followed by ORA11 to indicate the version of Oracle question. So I will have a database name that will be distinct, a little bit more explicit, without being completely esoteric.
The next screen allows you to enter a range of options, as some memory settings for Oracle, to optimize the performance of the database.
We will leave all options selected by default, but note, however, that you can change the character set used by the database in the second tab. SONAR’s recommendation is to use a Unicode character set UTF8.
On the next screen, we will leave the default option active without requiring notification by email.
The next screen allows us to specify where will be stored the files corresponding to our database objets and data. We can leave the default ‘oradata’ which will be located in the Oracle directory that we specified above.
Note that for a network installation, you may indicate a specific hard drive for data, distinct from the one were will be the installed Oracle software itself. For example, a C: drive of limited size for Oracle and a D: drive more efficient for the database and the storage of the code that you want to analyze.
We do not want an automatic backup. We will make our own backups manually.
On the next screen, we will specify a password unique to the individual administrators of the database. We will (almost always) use the user ‘SYSTEM’ to manage our database, but as this is not a frequent activityy, I tend to forget the password. So I am used to create a password with the same name as the user, or ‘system’ in that case (lowercase).
Oracle tells me that password does not meet basic safety rules, but as it is a personal database on a local and non-confidential data, it is not a problem.
Well. Oracle installation begins. In fact, it is checking that it has everything required for it:
It is possible to display the details of the operations going on.
Oracle comes with its own JVM (see our post on installing a JDK if you do not know what is a Java Virtual Machine).
Allow access through the Windows Firewall by selecting the button ‘Allow access’.
Once the installation of the Oracle software is done, the creation of the database begins:
The whole installation takes some time, and finally:
Our installation was successful. Oracle indicates us the url of the Administration Console. Note it well because we will need it for our future operations with Oracle, which we will see in a future post.
See you soon!