miércoles, 29 de mayo de 2013

Differences between PSU , CPU and SPU and how to install

======================================================================
WHAT'S THE MEANING OF ...
======================================================================

Critical Patch Update (CPU) --> Release of security fixes each quarter instead the cumulative database security patch for the quarter.

Patch Set Updates (PSU) --> Cumulative patches that include both the security fixes and priority fixes.  They are "version upgrades" modifying the las number of version (11.2.0.1.1, 11.2.0.1.2,...).

Security Patch Update (SPU) --> It is the new terminology of CPU (From October 2012) . SPU's can't be applied if any PSU's have been applied, unless your database is upgraded with a new base version.

======================================================================
How To Install CPU?

======================================================================



In that example we are going to install Patch 12419278 (CPU) and Patch 12419378 (PSU), Updates released on July 19, 2011. To download them we have to go to MOS (My Oracle Support) and "search" them, select your OS version (In that case, Linux x86) and download.

1) Unzip both Patches



2) We are goint to Install first CPU (12419278), so first for all open a document called "README.html", it will open a browser with the information, bugs fixed, known issues,steps to install it, ... for this CPU. I recommend read it before do something.
3) Check Opatch version, it would be recommend the latest, or at least 11.2 to continue. You can download the last version at Last Version Opatch.

*For install the last version you have to download the last version --> copy or move the contents of your old $ORACLE_HOME/Opatch directory to another directory --> delete the contents of $ORACLE_HOME/Opatch (don't delete the directory) --> unzip last version Opatch into $ORACLE_HOME/Opatch

- To check Opatch version, Open a termianl go to $ORACLE_HOME/Opatch and execute "opatch lsinventory"



4) Shutdown all instances and listeners associated with Oracle_home that we are updating.



5) Be sure that executables "make", "ar", "ld" and "nm" are under $PATH. Usually this executables are under "/usr/ccs/bin". If you haven't it just run "export PATH=$PATH:/usr/ccs/bin

6) Go to the unziped Path directory and execute Opath utility:






7) When finish, open a terminal and connect to sqlplus as sysdba to startup database and execute catbundle.sql script:



















8) The last step is check for any error at .log generated by catbundle script. At the end of the script it says where to find that log, It should be at $ORACLE_HOME/cfgtoollogs/catbundle. If exists any error, you should read "section 4: known issues" from README document to resolve it.

======================================================================
How To Install PSU?
======================================================================


1) Like we just do the pre-install steps, we can run directly the command to execute the PSU. If you didn't install CPU you have to do it from the beggining, execute steps 1,2,3,4,5 from "How To Install CPU"

*Execute the next command to verify that you haven't any conflicting patch installed:







After verify it, apply the PSU, go to the unzipped directory and execute "$ORACLE_HOME/Opatch/opatch apply"






2) Continue with step 7 and 8 of "How To Istalling CPU"

martes, 30 de abril de 2013

Install ASM on existing Oracle database 11gR2


======================================================================
DOWNLOADS


======================================================================
- ASMLIB (Step 4- Prerequisites)
- Grid --> Grid_download

======================================================================
PRE-REQUISITES

======================================================================

1) To see our partitions we have to open a terminal, connect as root user and write "cat /proc/partitions"



















I have 3 partitions, two of 2Gb and one of 3Gb called hdb,hdc and hdd (hda is the primary master, don't do anything!!)



2) To configure the partitions, we have to use fdisk utility. Like partitions are under /dev/sdX, we have to run fdisk /dev/sdX, one time for each partition. In that step, we will write "n","p" "1" (number 1) and "w" (in that order):





3) If we list partitions again we will show the result:

















4) We have to download ASM libraries and drivers. The easy way is using yum utility. Open a terminal with root user and execute:





5) Now we have to configure the kernel module  for ASM executing "/etc/init.d/oracleasm configure" with root. The answers this time will be "oracle", "oinstall", "y" and  "y"















6) Create disks for ASM
/etc/init.d/oracleasm createdisk ASM1 /dev/sdb1
/etc/init.d/oracleasm createdisk ASM2 /dev/sdc1
/etc/init.d/oracleasm createdisk ASM3 /dev/sdd1










7) run scandisk and listdisk to be sure that we have all asmdisk available.
/etc/init.d/oracleasm scandisks 
/etc/init.d/oracleasm listdisks 








======================================================================
INSTALLATION

======================================================================

1) with user oracle, "Unzip" grid software:




2) execute /grid/runInstaller (grid directory is created when we unzipped grid software) to start grid configuration window











3) choose the second option and "Next"




















4) choose your language and "Next"




















5) In that window we only select 2 asmdisk for DATA (the other will be for Flash_recovery_area, we will do it later), it's important choose Extern Redundancy
(you can select the path of your DISKs in "Change discovery path", by default "/dev/oracleasm/disks"):




















6) Time to choose our passwords, different password for accounts or the same password for all the accounts, like you want




















7) Select all groups as dba and "Next" (will appear a warning, but ignore it)





































8) Select the path where grid will be installed




















9) In that step, the installation check that all will be ok, if not you have to check the description of the error and solve it, when all will be ok, "next"




















10) Verify the information showed and "Finish"




















11) wait untill installation finish




















12) Almost at the end of the installation will appear a new window, we must run root.sh with root user, when finish click on accept, and the installation will continue.





















Set /usr/local/bin like teh full pathname of the local bin directory.


















*like we had installed an oracle database before, you must overwrite dbhome, oraenv and coraenv


13) when the installation finish, close the window.





















14) We have already installed grid infraestructure, now we are going to add FLASH_RECOVERY_AREA to the other free asmdisk (step 5). We need to run asmca, to do it we must set the correct ORACLE_HOME and ORACLE_SID. In this case ORACLE_SID will be +ASM and ORACLE_HOME is the grid path. To go to the easy way, open a terminal and write "oraenv", you will be question for the new ORACLE_SID, write "+ASM" and the ORACLE_HOME automatically change too:



















15) A new window appears, choose create:

















16) Now choose the name, select "extern" and select the disk. "Next"



















17) We have now both asmdisks:
















lunes, 29 de abril de 2013

How to install CentOS 5



We are going to install CentOS 5 for intall in the future Oracle database 11gR2. For this purpose, follow this steps:

======================================================================
INSTALLATION

======================================================================

1) Press enter to install Centos 5 in graphical mode :





















                                2) choose skip

















                                3)Next




















                                                                4)Select your language and click next:




















                                                                5)Select your Keyboard language and next:




















                                                                     6) Select “delete all Linux partitions and créate standard design”, next




















                                                                     7) In network, by default you have eth0, it is ok, so go to “next”




















                                                                     8) Select your correct clock and next




















                                                                     9) Set the password for root user:






















                                                                     10) Next, you can configure later






















                                                                     11) Next




















                                                                    12) The installation starts:





















                                                                                                    13) When the installation had finished, click on reboot (without the disk):

 



















======================================================================
CONFIGURATION

======================================================================

When your server has been rebooted, it’s time to configure:

      1) Next


















                                                                                                                      2)    Disable and Next



















                                                                                                      3)      Disable and next






    














                                                                                                      4)      Select the correct data and next




      














                                                                                                      5)      Still we don’t need any user, we will create later (in the installation of Oracle database), click on next





















                                                                                                      6)      Next




       
















                                                                                                      7)      Finish (reboot again)



















                                                                                                                8) And we have CentOS installed: