Tuesday, July 23, 2013

Oracle Database Preinstallation – Part 2



Dear Readers,

My name is Franz Devantier, creator of this blog.  I am an Oracle Certified Professional (OCP DBA 11g) Security DBA.  I will be sharing with you the basic duties of an Oracle DBA, and also some of the undocumented, and not so well known tasks. 


I will make a deal with you:  If you refer me to a company that needs database support, from a few hours per week to full time, and I am able to sign a contract with them.
Then I will give you 10% of the monthly contract or deal price every month.  When the contract ends, and we re-sign the contract, I will again give you 10% of the monthly contract price.  This will go on until the company no longer employs or contracts me or my agents to look after their databases.
I can do this, because that 10% is my marketing budget.  When we re-sign the contract, in the future, it may depend on you giving the thumbs up again, and that is worth 10% of the monthly contract price, to be given to you as commission.
Contact: Franz

Oracle Database Preinstallation – Part 2
System Architecture
Here we are just going to verify that the system architecture can run the software.
$ uname –m
Now you need to crosscheck with the Oracle documentation, being especially careful with regards to versions.  If things do not match up exactly here, then you will not be able to have a successful install.  Typically you will need to give these findings back to business or management.

Disk Space Requirements
Below are the minimal requirements for installing the Oracle database 11.2.
=> 1GB of space in the /tmp directory
$ df –h /tmp
If there is not enough space, then you need to address this issue, before continuing.  You can address this issue by deleting unnecessary files form the /tmp directory.  You may consider resizing the /tmp directory.  When you configure Oracle, make sure that you set the TMP and TMPDIR environment variables to appropriate values.

Depending on the installation type, there would be different space requirements, for example:
Installation Type
Requirements for Software Files in GB
Enterprise edition
3.95
Standard Edition
3.88
Installation Type
Disk Space for Data Files in GB
Enterprise edition
1.7
Standard Edition
1.5
Installation Type
Requirements for Software Files in GB
Enterprise edition
4.35
Standard Edition
4.22
Installation Type
Disk Space for Data Files in GB
Enterprise edition
1.7
Standard Edition
1.5


The bottom half is the specific requirements for Linux x86-64.  Each OS will have slightly different requirements.

Before you start the installation you should determine the amount of free space on the system.
$ df –h

Don’t forget that additional free disk space is required on your file system or ASM disk group, if you are using the fast recovery area, and automated backups.  Make sure that you have enough space for this configuration, because otherwise the system can potentially hang when it runs out of space.  It is designed to hang, so that the integrity of the data is protected, rather than availability by default.  Think of it this way, not too much point in having things available if the data that you see has been corrupted or compromised.  Rather have too much space allocated for the fast recovery area to start with.

Display Requirements
The minimum resolution for Oracle Database 11.2 is quite high.  The tools will not work on a Display resolution of less than 1024 X 768.  Perhaps a good idea to make sure that you have a decent screen or monitor, before you even start your pre-installation checks.

Franz Devantier,
Need a database health check?
devantierf@gmail.com

Classifieds


Monday, July 22, 2013

Oracle Database Preinstallation – Part 1

Dear Readers,

My name is Franz Devantier, creator of this blog.  I am an Oracle Certified Professional (OCP DBA 11g) Security DBA.  I will be sharing with you the basic duties of an Oracle DBA, and also some of the undocumented, and not so well known tasks. 


I will make a deal with you:  If you refer me to a company that needs database support, from a few hours per week to full time, and I am able to sign a contract with them.
Then I will give you 10% of the monthly contract or deal price every month.  When the contract ends, and we re-sign the contract, I will again give you 10% of the monthly contract price.  This will go on until the company no longer employs or contracts me or my agents to look after their databases.
I can do this, because that 10% is my marketing budget.  When we re-sign the contract, in the future, it may depend on you giving the thumbs up again, and that is worth 10% of the monthly contract price, to be given to you as commission.
Contact: Franz

Oracle Database Preinstallation – Part 1
These are the tasks that you must complete, before you run Oracle Universal Installer (OUI).
Generally speaking there are two things that you should do before installing the Oracle software.  Firstly you should download the installation manual for your specific manual, and perform the pre-installation tasks.  Secondly if you are going to use Oracle Automatic Storage Management (ASM), or Oracle restart, then you should start off by installing Oracle Grid Infrastructure.

My notes are relevant to Linux and Unix, because with windows, most of these pre-installation tasks are transparent, and you can usually just get away with, putting the installation disk in and running it.  Actually I will be focussing on Linux, because Oracle has invested a lot into Linux, and secondly it is very convenient to load the Linux operating system onto your laptop or workstation, or virtual OS.  Oracle Linux has a free version, which you can download and install.  So we are looking at Oracle linux really, which is essentially Red Hat.   

Logging in to the System as root
Firstly you need to complete several tasks as the root user.  If the organization has a problem with giving the DBA the root password, then you will need to work very closely with the Sys Admin.  In windows you really just need an administrator login, and you are good to go.

You must install the software using a X Windows utility, or a X terminal, or any other system that can use or invoke X Server software.  If you are using silent mode installation, the you don’t need X Windows.

Installing from X Windows workstation or X Terminal:
=> Firstly you need to start your local terminal session, which could be something like “xterm”.

=> If you are not going to install the software on the local system, then you need to enable the remote host to display X applications on your local X Server or workstation.
You can achieve this something like:
$ xhost <fully qualified host name>

=> If you are going to install the software on the remote system, then use ssh, rlogin or telnet to connect to the system on which you want to install the software.  If you can use telnet on your site, then you have inherent issues, and I would suggest that you get an Oracle security expert to advice you.

=> If you are not logged in as root, then you must first do something like:
$sudo su root
Otherwise you must work closely with the companies sys admin.

=> To install the Oracle software on Linux, you may have to read through the specific X server documentation or request support from the specific vendors.  However the process should run something like this:
1.) Start your X server software
2.) Configure your X server to allow remote hosts to display X application on your workstation or local system.
3.) Connect to the remote server or where you want to install the Oracle software, and start your terminal or X windows session on that server.  For example an xterm session.  You may need to first logon to root, or do a “sudo” or “sudo su” to root, before you can proceed.

Now that you are logged onto the server where you will install the software, and have some sort of X Windows facilities, you are ready to verify the Hardware Requirements for the installation.

Verifying the Hardware Requirements for 11.2
We will check that we meet the minimal requirements.  If there has been time for planning, then you may have a set of hardware requirements that exceed the minimal requirements.  The areas that we will check include the Memory requirements, System architecture, Disk space requirements, and Display requirements.

Memory Requirements:
Minimum 1GB of RAM, recommended at least 2GB of RAM.

One way to determine the size of the RAM on a linux box is:
$ grep MemTotal /proc/meminfo
If the size of the RAM is less than the minimal required size, then you must first install more RAM before continuing.  The installation will abend if you try to install without enough RAM.

You also need to take into account the relationship between installed RAM, and the configured swap space.  There are specific recommendations by Oracle, and it is good to try to stay within those parameters.
RAM
Swap Space
Between 1GB and 2GB
1.5 times the size of the RAM, 1.5GB to 3GB
Between 2GB and 16GB
Swap space should be equal to the size of the RAM
More than 16GB
Swap space should not be larger than 16GB

If Oracle does start using too much swap space, during operations, you could have a drastically reduced performance throughput.  On Linux you can enable the HugePages feature.  HugePages are basically used for memory-mapped files.  If you are using HugePages, then you should deduct the memory allocated to HugePages from your RAM, before calculating the relationship between RAM and swap space.  You also need to verify that after deducting your HugePages from RAM, you still have at least 1GB of RAM left.

On linux you can use a command like this to verify the available RAM and swap space.
$ free

Remember that as the interactions with the server change, from busy to quite, your available RAM and swap space readings are going to keep changing; so you will need to perform this step under various stress conditions, to arrive at meaningful values.  It may also be useful to get recommendations from you OS vendor for specific guidelines on the RAM Swap space settings.

Using Automatic Memory Management (AMM)
From 11g onwards, AMM requires more shared memory than before, which on linux is defined in “/dev/shm”, as well as using more file descriptors.  Two parameters in the database must be smaller than the size of the defined shared memory.  MEMORY_MAX_TARGET or MEMORY_TARGET, typically MEMORY_MAX_TARGET would have the larger value, or would be equal to MEMORY_TARGET.  You would need to add values from all the Oracle instances on the computer, to properly determine the size to assign to the shared memory.

On Linux especially if the operating system mount size that has been defined is too small for the instance being started, defined in “/dev/shm”, then you will get the ORA-00845 error, when you try to start the instance.  The above mentioned Oracle memory variables, define the total size of the combined System Global Area (SGA), and Program Global Area (PGA).

The other variable that can bite is the file descriptors.  There should be at least 512 times the Oracle variable PROCESSES defined.  If the file descriptors is not sized correctly then you will get an Oracle error: ORA-27123.  Potentially you may also get the Linux error “EMFILE (Too many open files)”, especially with regards to non-Oracle related processes.

It is quite easy to determine the amount of shared memory available.
$ df –h /dev/shm/

Keep in mind that if you use the parameter LOCK_SGA, then you can’t use MEMORY_MAX_TARGET or MEMORY_TARGET.  Also if you have defined HugePages on the Linux level, then you can’t use MEMORY_MAX_TARGET or MEMORY_TARGET.

For example, if the shared memory file system allocation on your server is 1GB, and you have set MEMORY_MAX_TARGET = to 2GB, then you will get the following errors, when you try to start the database up.
ORA-00845    MEMORY_MAX_TARGET not supported on this system
ORA-01078   Failure in processing system parameters

To address the ORA-00845 error, you can increase the “/dev/shm” mountpoint size.
For example:
$ mount –t tmpfs shmfs -0 size=7g /dev/shm

Then you will need to make this change persistent across system restarts, by adding an entry in the “/etc/fstab”
For example:
$ smfs /dev/shm tmpfs size=7g 0


The database name is typically limited to 8 characters, however sometimes a user will have a requirement for the database to be named to something that is longer than 8 characters.  What happens in this situation is:
Let’s say the Global Database Name is longer than 8 characters.
DB_NAME parameter is truncated to 8 characters.
DB_UNIQUE_NAME parameter is set to the global name.
The end result is that this is fairly transparent to the end user, but remember the internal representation, for just in case you start to experience issues.

Franz Devantier,
Need a database health check?
devantierf@gmail.com

Classifieds

Wednesday, June 12, 2013

Exalogic vDC Management - Part 8


Dear Readers,

My name is Franz Devantier, creator of this blog.  I am an Oracle Certified Professional (OCP DBA 11g) Security DBA.  I will be sharing with you the basic duties of an Oracle DBA, and also some of the undocumented, and not so well known tasks. 


I will make a deal with you:  If you refer me to a company that needs database support, from a few hours per week to full time, and I am able to sign a contract with them.
Then I will give you 10% of the monthly contract or deal price every month.  When the contract ends, and we re-sign the contract, I will again give you 10% of the monthly contract price.  This will go on until the company no longer employs or contracts me or my agents to look after their databases.
I can do this, because that 10% is my marketing budget.  When we re-sign the contract, in the future, it may depend on you giving the thumbs up again, and that is worth 10% of the monthly contract price, to be given to you as commission.
Contact: Franz

Exalogic vDC Management -  Part 8
Creating Distribution Groups
You can perform these steps to create a Distribution group in Exalogic Control:
1. You want to display the account dashboard, to do this; on the left navigation pane, click “vDC Management”.  Under the vDC Accounts, you will see a list of accounts, click on your account for example “Dept1”.
2.  In the “Actions” pane under “Operate” on the right hand side, click on “Create Distribution Group”.  The Create Distribution Group wizard is displayed.



3. In the Name field enter a name for your distribution group for example: Dept1DistGrp1.  This name must consist of upper and lower case letters, and numbers.  Optionally give it a description and create tabs.  Click on the “Next” button.  The “Distribution Group Configuration” screen is displayed.
4. In the “Number of Elements” field, you define the number of Oracle VM Servers on which the vServers can be placed.  The size of the distribution group is limited by the physical number of Oracle VM Servers that are available in the server Pools of the vDC.  The server Pool is configured by Exalogic Control, by default.
5. Click on the “Next” button, the “Summary” screen is displayed.
6. Review the Summary, and when you are happy you can click on the “Finish” button to create the Distribution group.  You can’t specify a Distribution Group for a set of vServers after you have already created the vServers.

Franz Devantier,
Need a database health check, or a security audit?
devantierf@gmail.com

Tuesday, June 11, 2013

Exalogic vDC Management - Part 7


Dear Readers,

My name is Franz Devantier, creator of this blog.  I am an Oracle Certified Professional (OCP DBA 11g) Security DBA.  I will be sharing with you the basic duties of an Oracle DBA, and also some of the undocumented, and not so well known tasks. 


I will make a deal with you:  If you refer me to a company that needs database support, from a few hours per week to full time, and I am able to sign a contract with them.
Then I will give you 10% of the monthly contract or deal price every month.  When the contract ends, and we re-sign the contract, I will again give you 10% of the monthly contract price.  This will go on until the company no longer employs or contracts me or my agents to look after their databases.
I can do this, because that 10% is my marketing budget.  When we re-sign the contract, in the future, it may depend on you giving the thumbs up again, and that is worth 10% of the monthly contract price, to be given to you as commission.
Contact: Franz

Exalogic vDC Management -  Part 7
Creating Private vNets
A private vNet is an IPoIB network that has been created within the Exalogic fabric, in order to enable secure vServer to vServer communication.

There are a few steps required to create a private vNet.
1. Move to the left navigation panel, and click on “vDC Management”.  Find the name of your account under the “vDC Accounts” that have been listed, for example “Dept1”.  The vDC Account dashboard is displayed.
2. On the “Actions” pane, click on “Create Private vNet”, the Create Private vNet wizard is displayed .



3. Enter a name for the private vNet in the “Name” field.  For example “vNet1”.  The name can consist of letters of the alphabet, upper case and lower case, and numerals.
4. In the “Description” field, you can optionally enter a description for the private vNet.  Optionally you can create tags.
5. Click on the “Next” button.  The “Private vNet Configuration” screen is displayed.
6. Enter the maximum number of vServers that can be part of this vNet, in the “Number of elements” field.  The numbers will be rounded up to the next value in the range of numbers (2,6,14,30,62,126,254,510,1022,2046,4096,8190).  The slider on the screen has a set of limited values.  If you enter a value that is not in the list, then on the summary screen, you will see that it has moved up to the next highest number.  If for example you entered the number 30, then you would have 8 IP addresses in the range.   However the highest and lowest addresses are reserved, so you would effectively have 6 IP addresses in the range, that are available to the private vNet.
7. Click on the “Next” button, the “Summary” screen is displayed.  Review the Summary and when you are satisfied, you can click on the “Finish” button.  This will create the private vNet.  You can verify the private vNet, by clicking on the “Networks” tab on the top navigation bar.  You will see it listed in the “Private vNets” section.  Once you have created a private vNet, then you can use it for new vServers, that are created by Cloud Users in this Account.

Franz Devantier,
Need a database health check, or a security audit?
devantierf@gmail.com

Monday, June 10, 2013

Exalogic vDC Management - Part 6


Dear Readers,

My name is Franz Devantier, creator of this blog.  I am an Oracle Certified Professional (OCP DBA 11g) Security DBA.  I will be sharing with you the basic duties of an Oracle DBA, and also some of the undocumented, and not so well known tasks. 


I will make a deal with you:  If you refer me to a company that needs database support, from a few hours per week to full time, and I am able to sign a contract with them.
Then I will give you 10% of the monthly contract or deal price every month.  When the contract ends, and we re-sign the contract, I will again give you 10% of the monthly contract price.  This will go on until the company no longer employs or contracts me or my agents to look after their databases.
I can do this, because that 10% is my marketing budget.  When we re-sign the contract, in the future, it may depend on you giving the thumbs up again, and that is worth 10% of the monthly contract price, to be given to you as commission.
Contact: Franz

Exalogic vDC Management -  Part 6
Examining Cloud User's Account Information
You must log into the Exalogic machine with your Cloud User credentials.
-> On the left navigation pane, click on “vDC Management”.  Under “vDC Accounts”, find the name of your Account and click on it, for example “Dept1”.  The vDC Account dashboard is displayed in the center pane.

-> View the vDC dashboard, and notice how there are tabs on the top with different types of information in them.



-> To examine the networks in your vDC Account, you can click on the “Networks” tab.  Then you can view the private vNets in your Account and their resource quota and limits.

-> To view the storage information, you click on the “Storage” tab on the top navigation bar.  Here you can view information about the storage resources and quotas in your Account.  Also information about the vServer root disks, Volumes, and Snapshots.

-> Click  on the “vServers” tab on the top navigation bar.  You will then see information related to the vServers and Distribution groups in your Account.

-> Click on “Server Templates” on the top navigation bar, to examine the Server Templates available in your Account.

-> Click on the “Incidents” tab on the top navigation bar.  Here you can view incidents and alerts on your Account.

-> Click on the “Jobs” tab on the top navigation bar.  Here you can examine current or historical jobs.

Uploading and Registering a Server Template
Server templates contain the configuration of an individual vServer with its virtual disk.  Templates can have the extension or format of .tgz, or .tar, or other file types.  In order to upload a server template from a network you can use HTTP, HTTPS, or FTP network protocols.  The network types that the template was on could include EolB networks, as long as this network is available  to the Ops Center Enterprise Controller VM.

You can follow these steps to upload a Server template to Exalogic Control.
1. On the left navigation pane, click on “vDC Management”.  Then you move to “vDC Accounts” and click on the name of your account, for example it could have been “Dept1”.  You will see th vDC dashboard displayed.
2. On the navigation bar at the top. Click on “Server Templates”.  The server templates in account “Dept1” will be displayed.
3. Under Server Templates, click on the “Upload Server Template” icon.  As an alternative you could have clicked on “Upload Server Template” below “Operate”, which would be available on the “Actions” pane.
The Upload Server Template wizard is displayed.



4. Bring the “Identify Server Template” screen up.  On this screen you can enter a name for the template, as well as a description.  It would make sense to add tags as well, to make it easier to find later on.
5. Click on the “Next” button, the “Specify Server Template Details” screen is displayed.



6. Next to “Image SubType” click on the “Template” radio button.
7. Next to the “Upload Source” click on the “URL” radio button.  Then you can go down to the “Server Template URL:” and enter the URL where the template is located.  When you are finished you can click on the “Next” button.
8. The Summary screen is displayed.  Review the summary, when you are satisfied, you can click on the “Upload” button.  You will see the Server Template listed with the others, on the left navigation pane under “Server Template”.
9. You can also click on “Server Templates” on the top navigation bar.  You will see the Server Templates listed, and the one you have just uploaded should also be there.

Making a Server Template Public
The server template is then available to the Cloud Users, that are assigned to the account that it was loaded into.  If you want to make it available to all the accounts, in the vDC, then you must make it into a Public Template.
1. From the left navigation pane, select “vDC Management”.
2. Under “vDCs”, expand “MyCloud”.
3. Now you can expand “Accounts”, and then select your account.
4. Now you can click on the “Server Templates” tab.
5. Click on the server template that you want to work on.  Then click on the “Register Server Template” icon.



6.  Clicking on “Register Template Server” is what changes the value of “Public” to Yes, A confirmation screen will come up, click on the “OK” button.



7. There should now be a “Yes” under the “Public” field.

9. If you decided to make this template private again, then you would select the template, and clidk on the “Unregister Server Template” icon, after this you just need to follow the recommendations to change it.

Franz Devantier,
Need a database health check, or a security audit?
devantierf@gmail.com

Sunday, June 9, 2013

Exalogic vDC Management - Part 5


Dear Readers,

My name is Franz Devantier, creator of this blog.  I am an Oracle Certified Professional (OCP DBA 11g) Security DBA.  I will be sharing with you the basic duties of an Oracle DBA, and also some of the undocumented, and not so well known tasks. 


I will make a deal with you:  If you refer me to a company that needs database support, from a few hours per week to full time, and I am able to sign a contract with them.
Then I will give you 10% of the monthly contract or deal price every month.  When the contract ends, and we re-sign the contract, I will again give you 10% of the monthly contract price.  This will go on until the company no longer employs or contracts me or my agents to look after their databases.
I can do this, because that 10% is my marketing budget.  When we re-sign the contract, in the future, it may depend on you giving the thumbs up again, and that is worth 10% of the monthly contract price, to be given to you as commission.
Contact: Franz

Exalogic vDC Management -  Part 5
Verifying the vDC
The Cloud Admin will verify the vDC, after the Cloud Users have performed their actions.  The Cloud Admin can verify and monitor the vNets and Storage available in the vDC, as well as the CPU allocation, the memory allocation, and the storage allocation.  Then the Cloud Admin can look at the usage metrics to see how much of the allocated resources are boing used.

To verify the vDC:
-> Firstly you must log into the Exalogic Control as the Cloud Admin User.

-> Move to the left navigation pane.  Click on “vDC Management”,  under the vDCs, find and click on the name of the default vDC, in your Exalogic machine.
The “Dashboard” tab is displayed in the central pane.
Under the “Resource Allocation” tab, you will find graphical views of the CPU, Memory, and Storage resources that have been allocated to the accounts in the vDC.  Under the “Resource Usage” tab, you will find details on the CPU resource usage, Memory resource usage, and Storage resource usage.

-> Click on the “Networks” tab on the top navigation pane.  Under “Application Internal Networks”, you can view all the private vNets.

-> Click on the “Storage” tab on the top navigation pane.  Here you can view information about the allocation and usage of storage in the vDC.  For example you can view information about the vServers  root disks, vServers block starage, and the vServers storage allocation. 

Logging Out of Exalogic Control
It is always good practice to logout of the Exalogic Control after completing a series of tasks.  The logout link is on the right hand side top corner of the Exalogic Control BUI.

Creating and Managing Exalogic vDC Resources
There are a number of broad categories in this process:
-> Logging in as a Cloud User.
-> Examining Cloud Users Account information.
-> Updating and registering a Server template.
-> Creating Private vNets.
-> Creating Distribution Groups.
-> Creating Volumes.
-> Creating vServers.
-> Managing high availability of vServers.
-> Detaching Volumes from a vServer.
-> Creating a Snapshot from a Volume.  
->Creating a Volume from a Snapshot.

Logging In As a Cloud User
You would simply log into the Exalogic Control Console as a Cloud user, for example as “User1”, if User1 was a Cloud User.

Franz Devantier,
Need a database health check, or a security audit?
devantierf@gmail.com