3 Day Oracle DBA on  Unbreakable Linux Technopaq Inc.
<ul><li>Introduction Oracle on Unbreakble Linux </li></ul><ul><li>Linux File System Structure </li></ul><ul><li>Installati...
<ul><li>Root Directory is identified with / symbol. </li></ul><ul><li>All subdirectories of the system are below it. </li>...
<ul><li>Before you can start using the system you must log as a valid user of the system. </li></ul><ul><li>Either as: </l...
<ul><li>/usr – binary files/programs. </li></ul><ul><li>/etc – configuration files of the system. </li></ul><ul><li>/home ...
<ul><li>/etc/profile – startup file and configuration for all users. </li></ul><ul><li>/home/[username]/.bash_profile – in...
<ul><li>File/Directory Commands </li></ul><ul><li>Directory Creation:  mkdir [option] [directory-name] </li></ul><ul><li>D...
<ul><li>User/Group Administration </li></ul><ul><li>User Creation:  useradd -g [primary-group] -G [other-groups] [user-nam...
<ul><li>User/Group Administration </li></ul><ul><li>Switching User: su – [username] </li></ul><ul><li>Note: </li></ul><ul>...
<ul><li>Text/File Reading/Manipulation  </li></ul><ul><li>Reading Text File:  </li></ul><ul><ul><li>cat [filename] </li></...
<ul><li>Command Mode:  [ESC] </li></ul><ul><ul><li>To Save:  [:]w filename   </li></ul></ul><ul><ul><li>To Quit:  [:]q </l...
<ul><li>Checking for Required Libraries. </li></ul><ul><li>Checking for System Requirements. </li></ul><ul><li>Creation of...
<ul><li># binutils-2.15.92.0.2-10.EL4 </li></ul><ul><li># compat-db-4.1.25-9 </li></ul><ul><li># control-center-2.8.0-12 <...
<ul><li>#rpm -q binutils compat-db control-center gcc gcc-c++ glibc glibc-common  </li></ul><ul><li>gnome-libs libstdc++ l...
<ul><li>Checking for amount of RAM and Swap Space: </li></ul><ul><li># grep MemTotal /proc/meminfo </li></ul><ul><li>MemTo...
<ul><li>Creation of oracle user and dba/oinstall groups: </li></ul><ul><li># /usr/sbin/groupadd oinstall </li></ul><ul><li...
<ul><li>Creation of Directory for Installation: </li></ul><ul><li># mkdir -p /u01/app/oracle </li></ul><ul><li># chown -R ...
<ul><li>Using vi as the root user:  </li></ul><ul><ul><li>#vi /etc/sysctl.conf </li></ul></ul><ul><ul><li>Add the followin...
<ul><li>Using vi as the root user:  </li></ul><ul><ul><li>#vi /etc/profile </li></ul></ul><ul><ul><li>Add the following en...
<ul><li>Creation of oracle user and dba/oinstall groups: </li></ul><ul><li># /usr/sbin/groupadd oinstall </li></ul><ul><li...
<ul><li>Inside the installation directory run: </li></ul><ul><li>#./runInstaller </li></ul><ul><li># Select Installation M...
<ul><li># Specify Inventory Directory and Credentials </li></ul><ul><li>* Inventory Directory: /u01/app/oracle/oraInventor...
<ul><li># Product-specific Prerequisite Checks </li></ul><ul><li>* If you've been following the steps in this guide, all t...
<ul><li># Configuration Assistants </li></ul><ul><li>* The Oracle Net, Oracle Database, and iSQL*Plus configuration assist...
<ul><li># End of Installation </li></ul><ul><li>* Make note of the URLs presented in the summary, and click on Exit when r...
<ul><li>Configuration of ENVIRONMENT Variables </li></ul><ul><li>As the oracle user:  $vi .bash_profile </li></ul><ul><li>...
<ul><li>Services to Start </li></ul><ul><li>1. Listener </li></ul><ul><li>$lsnrctl start </li></ul><ul><li>2. Database </l...
<ul><li>To Access the Enterprise Manager: </li></ul><ul><li>1. Open a web browser and type the following URL: </li></ul><u...
Upcoming SlideShare
Loading in …5
×

Asian Spirit 3 Day Dba On Ubl

1,671 views

Published on

3 Day UBL on the Net

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,671
On SlideShare
0
From Embeds
0
Number of Embeds
27
Actions
Shares
0
Downloads
1
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Asian Spirit 3 Day Dba On Ubl

  1. 1. 3 Day Oracle DBA on Unbreakable Linux Technopaq Inc.
  2. 2. <ul><li>Introduction Oracle on Unbreakble Linux </li></ul><ul><li>Linux File System Structure </li></ul><ul><li>Installation of Oracle 10g R2 in Linux </li></ul><ul><li>Getting Started with Enterprise Manager </li></ul><ul><li>Configuring Network Environment </li></ul><ul><li>Managing Oracle Instance </li></ul><ul><li>Managing Database Structures </li></ul><ul><li>Administering Users and Security </li></ul><ul><li>Managing Schema Objects </li></ul><ul><li>Performing Backup and Recovery </li></ul>Course Topics
  3. 3. <ul><li>Root Directory is identified with / symbol. </li></ul><ul><li>All subdirectories of the system are below it. </li></ul><ul><li>Root Directory is only writable/modifiable to the root user. </li></ul><ul><li>All other subdirectories beneath it are necessary for the system to run. </li></ul><ul><li>Individual Directories have various rôle for the system to run. </li></ul>Linux File System Structure
  4. 4. <ul><li>Before you can start using the system you must log as a valid user of the system. </li></ul><ul><li>Either as: </li></ul><ul><li>Administrator User: root </li></ul><ul><li>Regular User: student/any-other-created-user </li></ul><ul><li>Log-on can be down 2 approach: </li></ul><ul><ul><li>Local – can be on the graphical log-on or command line. </li></ul></ul><ul><ul><li>Remote: </li></ul></ul><ul><ul><ul><li>telnet or ssh </li></ul></ul></ul><ul><ul><ul><li>vnc/remote desktop </li></ul></ul></ul>Logging on the Linux System
  5. 5. <ul><li>/usr – binary files/programs. </li></ul><ul><li>/etc – configuration files of the system. </li></ul><ul><li>/home – user files. </li></ul><ul><ul><li>/home/[username] </li></ul></ul><ul><li>/var – system/services data files. </li></ul><ul><li>/opt – alternative installation for applications. </li></ul>Linux Directory Structure
  6. 6. <ul><li>/etc/profile – startup file and configuration for all users. </li></ul><ul><li>/home/[username]/.bash_profile – individual startup file and configuration per user. </li></ul>Configuration Files
  7. 7. <ul><li>File/Directory Commands </li></ul><ul><li>Directory Creation: mkdir [option] [directory-name] </li></ul><ul><li>Directory Removal: rmdir [directory-name] </li></ul><ul><li>Copy File/Directory: </li></ul><ul><li>cp [option] [source-file/directory] [destination-file/directory] </li></ul><ul><li>Change Directory: cd /[directory-name] </li></ul><ul><li>Listing Files: ls [option] [directory] </li></ul><ul><li>Determining Current Directory: pwd </li></ul>Linux Commands
  8. 8. <ul><li>User/Group Administration </li></ul><ul><li>User Creation: useradd -g [primary-group] -G [other-groups] [user-name] </li></ul><ul><li>User Modification: usermod -g [primary-group] -G [other-groups] [user-name] </li></ul><ul><li>User Deletion: userdel [-r] [username] </li></ul><ul><li>Password Setting: passwd [username] </li></ul><ul><li>Group Creation: groupadd [option] [groupname] </li></ul><ul><li>Group Modification: groupmod [option] [groupname] </li></ul><ul><li>Group Deletion: groupdel [groupname] </li></ul>Linux Commands
  9. 9. <ul><li>User/Group Administration </li></ul><ul><li>Switching User: su – [username] </li></ul><ul><li>Note: </li></ul><ul><li>command prompt symbols: </li></ul><ul><li>$ - regular user </li></ul><ul><li># - root user </li></ul><ul><li>Determining User: whoami </li></ul>Linux Commands
  10. 10. <ul><li>Text/File Reading/Manipulation </li></ul><ul><li>Reading Text File: </li></ul><ul><ul><li>cat [filename] </li></ul></ul><ul><ul><li>more [filename] </li></ul></ul><ul><ul><li>less [filename] </li></ul></ul><ul><ul><li>Modifying Text Files </li></ul></ul><ul><ul><li> vi [filename] </li></ul></ul><ul><ul><li> </li></ul></ul>Linux Commands
  11. 11. <ul><li>Command Mode: [ESC] </li></ul><ul><ul><li>To Save: [:]w filename </li></ul></ul><ul><ul><li>To Quit: [:]q </li></ul></ul><ul><ul><li>To Save and Quit: [:]wq </li></ul></ul><ul><li>Insert Mode: [i] </li></ul>Vi Modes
  12. 12. <ul><li>Checking for Required Libraries. </li></ul><ul><li>Checking for System Requirements. </li></ul><ul><li>Creation of Users/Groups. </li></ul><ul><li>Modification of Kernel Parameters. </li></ul><ul><li>Setting of Environment Variables. </li></ul><ul><li>Creation of Directories for Installation. </li></ul><ul><li>Installation of Oracle. </li></ul><ul><ul><li>Configuration of Network </li></ul></ul><ul><ul><li>Creation of Initial Database </li></ul></ul>Oracle Installation Steps
  13. 13. <ul><li># binutils-2.15.92.0.2-10.EL4 </li></ul><ul><li># compat-db-4.1.25-9 </li></ul><ul><li># control-center-2.8.0-12 </li></ul><ul><li># gcc-3.4.3-9.EL4 </li></ul><ul><li># gcc-c++-3.4.3-9.EL4 </li></ul><ul><li># glibc-2.3.4-2 </li></ul><ul><li># glibc-common-2.3.4-2 </li></ul><ul><li># gnome-libs-1.4.1.2.90-44.1 </li></ul><ul><li># libstdc++-3.4.3-9.EL4 </li></ul><ul><li># libstdc++-devel-3.4.3-9.EL4 </li></ul><ul><li># make-3.80-5 </li></ul><ul><li># pdksh-5.2.14-30 </li></ul><ul><li># sysstat-5.0.5-1 </li></ul><ul><li># xscreensaver-4.18-5.rhel4.2 </li></ul><ul><li># libaio-0.3.96 </li></ul><ul><li># openmotif21-2.1.30-11 </li></ul>Checking for Required Libraries
  14. 14. <ul><li>#rpm -q binutils compat-db control-center gcc gcc-c++ glibc glibc-common </li></ul><ul><li>gnome-libs libstdc++ libstdc++-devel make pdksh sysstat xscreensaver libaio openmotif21 </li></ul><ul><li>binutils-2.15.92.0.2-15 </li></ul><ul><li>compat-db-4.1.25-9 </li></ul><ul><li>control-center-2.8.0-12.rhel4.2 </li></ul><ul><li>gcc-3.4.4-2 </li></ul><ul><li>gcc-c++-3.4.4-2 </li></ul><ul><li>glibc-2.3.4-2.13 </li></ul><ul><li>glibc-common-2.3.4-2.13 </li></ul>Checking for Required Libraries
  15. 15. <ul><li>Checking for amount of RAM and Swap Space: </li></ul><ul><li># grep MemTotal /proc/meminfo </li></ul><ul><li>MemTotal: 1034680 kB </li></ul><ul><li># grep SwapTotal /proc/meminfo </li></ul><ul><li>SwapTotal: 1534196 kB </li></ul><ul><li>Checking for Disk Space: </li></ul><ul><li># df -h </li></ul><ul><li>Filesystem Size Used Avail Use% Mounted on </li></ul><ul><li>/dev/sda3 6.8G 1.3G 5.2G 20% / </li></ul><ul><li>/dev/sda1 99M 17M 77M 18% /boot </li></ul>Checking for System Requirements
  16. 16. <ul><li>Creation of oracle user and dba/oinstall groups: </li></ul><ul><li># /usr/sbin/groupadd oinstall </li></ul><ul><li># /usr/sbin/groupadd dba </li></ul><ul><li># /usr/sbin/useradd -m -g oinstall -G dba oracle </li></ul><ul><li># id oracle </li></ul><ul><li>uid=501(oracle) gid=502(oinstall) groups=502(oinstall),503(dba) </li></ul><ul><li>Setting of password: </li></ul><ul><li># passwd oracle </li></ul>Creation of Users and Groups
  17. 17. <ul><li>Creation of Directory for Installation: </li></ul><ul><li># mkdir -p /u01/app/oracle </li></ul><ul><li># chown -R oracle:oinstall /u01/app/oracle </li></ul><ul><li># chmod -R 775 /u01/app/oracle </li></ul>Creation of Directories
  18. 18. <ul><li>Using vi as the root user: </li></ul><ul><ul><li>#vi /etc/sysctl.conf </li></ul></ul><ul><ul><li>Add the following entries: </li></ul></ul><ul><ul><li>kernel.shmall = 2097152 </li></ul></ul><ul><ul><li>kernel.shmmax = 536870912 </li></ul></ul><ul><ul><li>kernel.shmmni = 4096 </li></ul></ul><ul><ul><li>kernel.sem = 250 32000 100 128 </li></ul></ul><ul><ul><li>fs.file-max = 65536 </li></ul></ul><ul><ul><li>net.ipv4.ip_local_port_range = 1024 65000 </li></ul></ul><ul><ul><li>net.core.rmem_default=262144 </li></ul></ul><ul><ul><li>net.core.wmem_default=262144 </li></ul></ul><ul><ul><li>net.core.rmem_max=262144 </li></ul></ul><ul><ul><li>net.core.wmem_max=262144 </li></ul></ul>Configuration of Kernel Parameter
  19. 19. <ul><li>Using vi as the root user: </li></ul><ul><ul><li>#vi /etc/profile </li></ul></ul><ul><ul><li>Add the following entries: </li></ul></ul><ul><ul><li>if [ $USER = &quot;oracle&quot; ]; then </li></ul></ul><ul><ul><li>if [ $SHELL = &quot;/bin/ksh&quot; ]; then </li></ul></ul><ul><ul><li>ulimit -p 16384 </li></ul></ul><ul><ul><li>ulimit -n 65536 </li></ul></ul><ul><ul><li>else </li></ul></ul><ul><ul><li>ulimit -u 16384 -n 65536 </li></ul></ul><ul><ul><li>fi </li></ul></ul><ul><ul><li>umask 022 </li></ul></ul><ul><ul><li>fi </li></ul></ul>Setting User Limit
  20. 20. <ul><li>Creation of oracle user and dba/oinstall groups: </li></ul><ul><li># /usr/sbin/groupadd oinstall </li></ul><ul><li># /usr/sbin/groupadd dba </li></ul><ul><li># /usr/sbin/useradd -m -g oinstall -G dba oracle </li></ul><ul><li># id oracle </li></ul><ul><li>uid=501(oracle) gid=502(oinstall) groups=502(oinstall),503(dba) </li></ul><ul><li>Setting of password: </li></ul><ul><li># passwd oracle </li></ul>Creation of Directories
  21. 21. <ul><li>Inside the installation directory run: </li></ul><ul><li>#./runInstaller </li></ul><ul><li># Select Installation Method </li></ul><ul><li>* Select Basic Installation </li></ul><ul><li>* Oracle Home Location: /u01/app/oracle/product/10.2.0/db_1 </li></ul><ul><li>* Installation Type: Enterprise Edition (1.3GB) </li></ul><ul><li>* UNIX DBA Group: oinstall </li></ul><ul><li>* Make sure Create Starter Database is checked </li></ul><ul><li>* Global Database Name: orc l </li></ul><ul><li>* Enter the Database Password and Confirm Password </li></ul><ul><ul><li>Password: oracle </li></ul></ul><ul><li>* Click on Next </li></ul>Installation
  22. 22. <ul><li># Specify Inventory Directory and Credentials </li></ul><ul><li>* Inventory Directory: /u01/app/oracle/oraInventory </li></ul><ul><li>* Operating System group name: oinstall </li></ul><ul><li>* Click on Next </li></ul>Installation
  23. 23. <ul><li># Product-specific Prerequisite Checks </li></ul><ul><li>* If you've been following the steps in this guide, all the checks should pass without difficulty. If one or more checks fail, correct the problem before proceeding. </li></ul><ul><li>* Click on Next </li></ul><ul><li># Summary </li></ul><ul><li>* A summary of the products being installed is presented. </li></ul><ul><li>* Click on Install. </li></ul>Installation
  24. 24. <ul><li># Configuration Assistants </li></ul><ul><li>* The Oracle Net, Oracle Database, and iSQL*Plus configuration assistants will run automatically </li></ul><ul><li># Execute Configuration Scripts </li></ul><ul><li>* At the end of the installation, a pop up window will appear indicating scripts that need to be run as root. Login as root and run the indicated scripts. </li></ul><ul><li>* Click on OK when finished. </li></ul>Installation
  25. 25. <ul><li># End of Installation </li></ul><ul><li>* Make note of the URLs presented in the summary, and click on Exit when ready. </li></ul><ul><li># Congratulations! Your new Oracle Database 10g Release 2 database is up and ready for use. </li></ul>Installation
  26. 26. <ul><li>Configuration of ENVIRONMENT Variables </li></ul><ul><li>As the oracle user: $vi .bash_profile </li></ul><ul><li>Add the following lines: </li></ul><ul><li>ORACLE_SID=orcl </li></ul><ul><li>ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1 </li></ul><ul><li>ORACLE_OWNER=oracle </li></ul><ul><li>export ORACLE_SID ORACLE_HOME ORACLE_OWNER </li></ul><ul><li>PATH=$PATH:$ORACLE_HOME/bin </li></ul><ul><li>export PATH </li></ul>Post Installation Steps
  27. 27. <ul><li>Services to Start </li></ul><ul><li>1. Listener </li></ul><ul><li>$lsnrctl start </li></ul><ul><li>2. Database </li></ul><ul><li>$sqlplus /nolog </li></ul><ul><li>SQL> conn sys/oracle as sysdba; </li></ul><ul><li>SQL> startup; </li></ul><ul><li>SQL> select instance_name from v$instance </li></ul><ul><li>3. Enterprise Manager </li></ul><ul><li>$emctl start dbconsole </li></ul>Post Installation Steps
  28. 28. <ul><li>To Access the Enterprise Manager: </li></ul><ul><li>1. Open a web browser and type the following URL: </li></ul><ul><li>http://localhost:5500/em </li></ul>Post Installation Steps

×