Archive

Author Archive

UNIX: Change SSH port in RHEL

July 15, 2011 Leave a comment

By default ssh runs on port 22.

For higher level of security you may want to obscure your SSH PORT.

Here is how you do this.

vi /etc/ssh/ssh_config

Now, here you will find

#PORT 22

Uncomment the Port and Change it to the desired port, say 1991

PORT 1991

save the file and restart the sshd as follows

/etc/init.d/sshd restart

To confim,
netstat -anp |grep sshd
Also,
ssh root@localhost -p 1991
Now,
in order to ssh to the vmware instance, connect to you router,
and add ssh Server to the virtual machine Guest IP.
Categories: HOME

CMD: FIND

July 14, 2011 Leave a comment

netstat -an| find “1521”

Categories: HOME

ORACLE: ALERTS

July 12, 2011 Leave a comment

To check for errors, check Alert logs.

Additionally, Oracle provides the following views.

SQL> SELECT * FROM DICTIONARY WHERE TABLE_NAME LIKE '%ALERT%';
SQL> column table_name format a30
SQL> column comments format a40
SQL> /

TABLE_NAME                     COMMENTS
------------------------------ ----------------------------------------
DBA_OUTSTANDING_ALERTS         Description of all outstanding alerts
DBA_ALERT_HISTORY              Description on alert history
DBA_ALERT_ARGUMENTS            Message Id and arguments of outstanding
                               alerts

DBMS_ALERT_INFO
V$ALERT_TYPES                  Synonym for V_$ALERT_TYPES
GV$ALERT_TYPES                 Synonym for GV_$ALERT_TYPES

6 rows selected.
Categories: HOME

ORACLE: Explain Plan for select …

July 11, 2011 2 comments
SQL> create table temp_jp (num int,name char(4));
SQL> DECLARE
 BEGIN
 FOR i in 1..1000 loop
 if mod(i,2)=0 then
 insert into temp_jp values(i,'ram');
 else
 insert into temp_jp values(i,'sita');
 end if;
 end loop;
 end;
 /
SQL> Create index idx_temp_jp on temp_jp(num);
SQL> set timing on
SQL> explain plan for select count(*) from temp_jp where name='sita';

Explained.

Elapsed: 00:00:00.15
SQL> select * from table(DBMS_XPLAN.DISPLAY);

PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
Plan hash value: 2917205682

------------------------------------------------------------------------------
| Id  | Operation          | Name    | Rows  | Bytes | Cost (%CPU)| Time     |
------------------------------------------------------------------------------
|   0 | SELECT STATEMENT   |         |     1 |     6 |     3   (0)| 00:00:01 |
|   1 |  SORT AGGREGATE    |         |     1 |     6 |            |          |
|*  2 |   TABLE ACCESS FULL| TEMP_JP |   500 |  3000 |     3   (0)| 00:00:01 |
------------------------------------------------------------------------------

Predicate Information (identified by operation id):

PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
---------------------------------------------------

   2 - filter("NAME"='sita')

Note
-----
   - dynamic sampling used for this statement

18 rows selected.

Elapsed: 00:00:01.51

SQL> ANALYZE TABLE TEMP_JP COMPUTE STATISTICS;

Table analyzed.

Elapsed: 00:00:00.52

SQL> explain plan for select count(*) from temp_jp where name='sita';

Explained.

Elapsed: 00:00:00.01
SQL> select * from table(DBMS_XPLAN.DISPLAY);

PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
Plan hash value: 2917205682

------------------------------------------------------------------------------
| Id  | Operation          | Name    | Rows  | Bytes | Cost (%CPU)| Time     |
------------------------------------------------------------------------------
|   0 | SELECT STATEMENT   |         |     1 |     4 |     3   (0)| 00:00:01 |
|   1 |  SORT AGGREGATE    |         |     1 |     4 |            |          |
|*  2 |   TABLE ACCESS FULL| TEMP_JP |   500 |  2000 |     3   (0)| 00:00:01 |
------------------------------------------------------------------------------

Predicate Information (identified by operation id):

PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
---------------------------------------------------

   2 - filter("NAME"='sita')

14 rows selected.

Elapsed: 00:00:00.10
SQL>
========================================================================
NOW,
To gather the stats for the entire schema including all tables and all indexes use the following.

SQL> EXEC DBMS_UTILITY.ANALYZE_SCHEMA('AKSHAY','COMPUTE');

PL/SQL procedure successfully completed.

Elapsed: 00:00:01.24
Alternatively, we can use
exec DBMS_UTILITY.ANALYZE_SCHEMA('AKSHAY','ESTIMATE', estimate_rows => 1000);
exec DBMS_UTILITY.ANALYZE_SCHEMA('AKSHAY','ESTIMATE', estimate_percent => 25);
exec DBMS_UTILITY.ANALYZE_SCHEMA('AKSHAY','DELETE');

To Create stats on a table, or index, use the following:
ANALYZE table scott compute statistics;
ANALYZE table scott estimate statistics sample 25 percent;
ANALYZE table scott estimate statistics sample 1000 rows;
analyze index sc_idx compute statistics;
analyze index sc_idx validate structure;
Categories: HOME

ORACLE: ORACLE_HOME

SQL > var OHM varchar2(100);
SQL > EXEC dbms_system.get_env(‘ORACLE_HOME’, :OHM) ;
SQL > PRINT OHM

or

echo $ORACLE_HOME  on UNIX.

or

windows

start > run > regedit > HKEY_LOCAL_MACHINE > SOFTWARE  > ORACLE

Categories: HOME

ORACLE: ORA-12560: TNS:protocol adapter error

C:\Users\test>sqlplus

SQL*Plus: Release 10.2.0.3.0 - Production on Fri Jul 8 19:21:29 2011

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

Enter user-name: /as sysdba
ERROR:
ORA-12560: TNS:protocol adapter error
----------------------------------------
RUN>SERVICES.MSC> Start ORACLESERVICE_SID SERVICE.
Categories: HOME

ORACLE: Upgrade

Complete Checklist for Upgrades to 11gR1 using DBUA [ID 556477.1]

Modified 18-MAY-2011     Type BULLETIN     Status PUBLISHED

In this Document
Purpose
Scope and Application
Complete Checklist for Upgrades to 11gR1 using DBUA
Requirements:
Checking for Invalid Components and Objects before upgrade
Collecting Optimizer Statistics 
Check for TIMESTAMP WITH TIMEZONE Datatype
Disable Oracle Database Vault 
Check for Invalid user accounts or roles 
Backing up Enterprise Manager Database Control Data 
Configuring Network ACL’s 
Analyze the database using the Pre-Upgrade Information Tool.
Starting Upgrade Using  DBUA:
References


Applies to:

Oracle Server – Enterprise Edition – Version: 11.1.0.6 to 11.1.0.7 – Release: 11.1 to 11.1
Information in this document applies to any platform.

Purpose

This document is created for use as a guideline and checklist for upgrading from Oracle 9i ,Oracle 10gR1, Oracle 10gR2 to Oracle 11gR1 (11.1) using DBUA also with minimum downtime and errors.

The DBUA automates the upgrade process by performing all of the tasks normally performed manually.There are some steps which can be performed when the database is running.If this steps can be done manually before upgrading using DBUA, the downtime can be minimized.

These instructions are incomplete for migrating an ASM / RAC installations.  Refer to the migration guide for additional information for ASM / RAC installations.

Scope and Application

Database Administrators, Support

Complete Checklist for Upgrades to 11gR1 using DBUA

Database Upgrade Assistant (DBUA) 
==========================

  • The Database Upgrade Assistant (DBUA) interactively steps you through the upgrade process and configures the database for the new Oracle Database 10g release.
  • The DBUA automates the upgrade process by performing all of the tasks normally performed manually.
  • The DBUA makes appropriate recommendations for configuration options such as tablespaces and redo logs. You can then act on these recommendations. This method is very easy and user friendly.

DBUA performs some of the checks before the upgrade.These steps can be performed when the database is in normal startup mode.By performing this steps manually , the down time can be minimized.

After upgrade DBUA will not retain the Underscore ( ” Hidden “) Parameters . If needed , you need to manually add them in database after the upgrade .
The problem is DBUA does not shows any warning messages that these parameters will be lost after the upgrade.
Also currently there is no option to include these parameters during upgrade in DBUA.

Refer the Metalink Note 551141.1 Database Server Upgrade/Downgrade Compatibility Matrix to find the upgrade compatibility

DBUA performs the following checks before the upgrade:

=> Invalid user accounts or roles
=> Invalid data types or invalid objects
=> Desupported character sets
=> Adequate resources, including rollback segments, tablespaces, and free disk space
=> Missing SQL scripts needed for the upgrade
=> Listener running (if Oracle Enterprise Manager Database Control upgrade or configuration is requested)
=> Oracle Database software linked with Database Vault option. If Database Vault is enabled, then DBUA will return an error asking you to disable Database Vault prior to upgrade. See “Disable Oracle Database Vault”

Requirements:

  • Download and Install Oracle 11g Release 1 in a new Oracle Home and make sure there are no relinking errors.
  • Install the latest available Patchset from Metalink. (If available).
  • Install the latest available Critical Patch Update. (If available).

Refer the Metalink Note 551141.1 Database Server Upgrade/Downgrade Compatibility Matrix to find the upgrade compatibility

Checking for Invalid Components and Objects before upgrade

  • There should not be any invalid objects in the database before upgrade.
  • Prior to upgrade, resolving invalid objects under SYS and SYSTEM is mandatory

Use the following command/Query to find the invalid objects :

$ cd $ORACLE_HOME/rdbms/admin
$ sqlplus “/ as sysdba”

spool invalid_pre.log
Prompt
Prompt Components Status Before Upgrade
Prompt
SELECT SUBSTR(comp_id,1,12) comp_id, status,
SUBSTR(version,1,10) version,
SUBSTR (comp_name,1,40) comp_name
FROM dba_registry ORDER BY 1;
Prompt
Prompt Invalid Objects Before Upgrade
Prompt
SELECT substr(owner,1,12) owner,
SUBSTR(object_name,1,30) object,
SUBSTR(object_type,1,30) type,
status
FROM dba_objects
WHERE status <>’VALID’
AND object_name NOT LIKE ‘BIN$%’;
spool off

  • Run $ORACLE_HOME/rdbms/admin/utlrp.sql to validate the invalid objects in the database and then re-execute multiple times, until there is no change in the number of invalid objects.

$ cd $ORACLE_HOME/rdbms/admin
$ sqlplus “/ as sysdba”
SQL> @utlrp.sql

Collecting Optimizer Statistics 

  • When upgrading to Oracle Database 11g Release 1 (11.1), optimizer statistics are collected by DBUA for dictionary tables that lack statistics.
  • This statistics collection can be time consuming for databases with a large number of dictionary tables, but statistics gathering only occurs for those tables that lack statistics or are significantly changed during the upgrade.
  • To decrease the amount of downtime incurred when collecting statistics, you can collect statistics prior to performing the actual database upgrade.
  • As of Oracle Database 10g Release 1 (10.1), Oracle recommends that you use the DBMS_STATS.GATHER_DICTIONARY_STATS procedure to gather these statistics

For example, you can enter the following:

$ sqlplus “/as sysdba”
SQL> EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;

  • If you are using Oracle Database 9i Release 2 (9.2), then you should use the DBMS_STATS.GATHER_SCHEMA_STATS procedure to gather statistics.
  • To do this, you can run the scripts provided in Appendix D
  •  Appendix D has sample script, which creates the table, dictstattab, and exports the statistics for the RDBMS component schema into it.
  • The statistics collection might give errors if a particular component schema does not exist in the database, or if a component is not installed or invalid.
  • Backup the existing statistics to revert / import back the statistics, once the upgrade is successful.For example, the following PL/SQL subprograms import the statistics for the SYS schema after deleting the existing statistics:

SQL> EXEC DBMS_STATS.DELETE_SCHEMA_STATS(‘SYS’);
SQL> EXEC DBMS_STATS.IMPORT_SCHEMA_STATS(‘SYS’,’dictstattab’);

Note : It is recommended to gather the statistics during the Off-Peak Hours


Check for TIMESTAMP WITH TIMEZONE Datatype

  • The time zone files that are supplied with Oracle Database 11g Release 1 (11.1) have been updated from version 2 to version 4 to reflect changes in transition rules for some time zone regions.
  • The changes might affect existing data of TIMESTAMP WITH TIME ZONE data type.
  • If you have not already updated your existing databases to time zone file version 4, you must do so prior to upgrading to Oracle Database 11g Release 1 (11.1).

Refer below articles for the patch availability :

To find the Version 4 Patch for your current Database:
Note 413671.1 Applying “version 4” Time Zone Files on an Oracle Database

If patch is not available for your patchset, then refer
Note 396387.1 Workarounds when Database time zone patches are not available for your patchset

  • If your existing databases are already using a time zone file version greater than 4, then after installing Oracle Database 11g Release 1 (11.1), you must patch the ORACLE_HOME with the appropriate patch for the time zone file version in use with the databases you will be upgrading.
  • If the time zone file version used by the Oracle Database 11g Release 1 (11.1) server does not match the time zone file version that was used with the existing database being upgraded, then the upgrade script will terminate without upgrading the database.
  • The TIMESTAMP WITH TIME ZONE data stored in the database can be corrupted during the upgrade if there is a time zone file version mismatch.

Finding the Version of existing timezone files:
In Oracle 10gR1 and Oracle 10gR2 :

SQL> select * from v$timezone_file;

FILENAME VERSION
———— ——-
timezlrg.dat 4
In Oracle 9iR2 :

SQL> SELECT CASE COUNT(DISTINCT(tzname))
WHEN 183 then 1
WHEN 355 then 1
WHEN 347 then 1
WHEN 377 then 2
WHEN 186 then CASE COUNT(tzname) WHEN 636 then 2 WHEN 626 then 3 ELSE 0 END
WHEN 185 then 3
WHEN 386 then 3
WHEN 387 then case COUNT(tzname) WHEN 1438 then 3 ELSE 0 end
WHEN 391 then case COUNT(tzname) WHEN 1457 then 4 ELSE 0 end
WHEN 392 then case COUNT(tzname) WHEN 1458 then 4 ELSE 0 end
WHEN 188 then case COUNT(tzname) WHEN 637 then 4 ELSE 0 end
WHEN 189 then case COUNT(tzname) WHEN 638 then 4 ELSE 0 end
ELSE 0 end VERSION
FROM v$timezone_names;

VERSION
———-
4

NOTE: Scripts taken from Note 402742.1 USA 2007 DST Changes: Frequently Asked Questions for Oracle Database Patches

If the Version of the existing timezone is less than or higher than 4 , then :

Case 1:
If you are upgrading from 10gR1 or 10gR2 to 11.1.0.6 :
Note 829734.1 Actions for the DSTv4 update in the 11.1.0.6 base release

Case  2:
If you are upgrading from 10gR1 or 10gR2 to 11.1.0.7
Note 568125.1 Actions for the DSTv4 update in the 11.1.0.7 patchset

Case 3:
If you are upgrading from 9iR2 to 11.1.0.6 :
Note 829734.1 Actions for the DSTv4 update in the 11.1.0.6 base release

Case 4:
If you are upgrading from 9iR2 to 11.1.0.7 :
Note 568125.1 Actions for the DSTv4 update in the 11.1.0.7 patchset

Note: If the timezone files are updated to version 4, run utlu111i.sql script to record the new timezone file version in the registry$database. Ignoring will result in “ORA-01722 invalid number”.

Disable Oracle Database Vault 

If you have enabled Oracle Database Vault, then you must disable it before upgrading the database, and enable it again when the upgrade is finished.If Database Vault is enabled, then DBUA will return an error asking you to disable Database Vault prior to upgrade

Refer to the following Metalink Documents for Disabling Oracle Database Vault before the upgrade and enabling it after the upgrade.

Note 453903.1 – Enabling and Disabling Oracle Database Vault in UNIX
Note 453902.1 – Enabling and Disabling Oracle Database Vault in WINDOWS

Check for Invalid user accounts or roles 

After upgrading to Oracle Database 11g Release 1 (11.1) from Oracle Database9i Release 2 (9.2) or Oracle Database 10g Release 1 (10.1), the CONNECT role has only the CREATE SESSION privilege; the other privileges granted to the CONNECT role in earlier releases are revoked during the upgrade.

To identify which users and roles in your database are granted the CONNECT role, use the following query:

SELECT grantee
FROM dba_role_privs
WHERE granted_role = ‘CONNECT’
AND grantee
NOT IN (‘SYS’, ‘OUTLN’, ‘SYSTEM’, ‘CTXSYS’, ‘DBSNMP’,’LOGSTDBY_ADMINISTRATOR’,
‘ORDSYS’,’ORDPLUGINS’, ‘OEM_MONITOR’, ‘WKSYS’, ‘WKPROXY’,’WK_TEST’,
‘WKUSER’, ‘MDSYS’, ‘LBACSYS’, ‘DMSYS’,’WMSYS’, ‘OLAPDBA’, ‘OLAPSVR’,
‘OLAP_USER’,’OLAPSYS’, ‘EXFSYS’, ‘SYSMAN’, ‘MDDATA’,’SI_INFORMTN_SCHEMA’,
‘XDB’, ‘ODM’);’
If users or roles require privileges other than CREATE SESSION, then grant the specific required privileges prior to upgrade. The upgrade scripts adjust the privileges for the Oracle-supplied users.

In Oracle 9.2.x and 10.1.x CONNECT role includes the following privileges:

SELECT GRANTEE,PRIVILEGE
FROM DBA_SYS_PRIVS
WHERE GRANTEE =’CONNECT’

GRANTEE PRIVILEGE
——- ———————-
CONNECT CREATE VIEW
CONNECT CREATE TABLE
CONNECT ALTER SESSION
CONNECT CREATE CLUSTER
CONNECT CREATE SESSION
CONNECT CREATE SYNONYM
CONNECT CREATE SEQUENCE
CONNECT CREATE DATABASE LINK
From Oracle 10.2, ‘CONNECT’ role only includes ‘CREATE SESSION’ privilege


Backing up Enterprise Manager Database Control Data

After upgrading to Oracle Database 11g release 1 (11.1), if you want to downgrade Oracle Enterprise Manager Database Control you must save your Database Control files and data before upgrading your database. The emdwgrd utility can be used to keep a copy of your database control files and data before upgrading your database. The emdwgrd utility resides in the ORACLE_HOME/bin directory in the Oracle Database 11g release 1 (11.1) home.

1. Set ORACLE_HOME to your old Oracle home
2. Set ORACLE_SID to the SID of the database being upgraded.
3. Set PATH, LD_LIBRARY_PATH and SHLIB_PATH to point to the Oracle home from which the database is being upgraded.
4. Change directory to Oracle Database 11g release 1 (11.1) home.
5.
a- Run the following command for single instance database

$ emdwgrd -save -sid old_SID -path save_directory

where old_SID is the SID of the database being upgraded and save_directory is the path to the storage place you have chosen for your Database Control files and data:

b- For RAC database, remote copy is required across the cluster nodes. Define an environment variable to indicate which remote copy is configured. For example: setenv EM_REMCP /usr/bin/scp

$ emdwgrd -save -cluster -sid old_SID -path save_directory

Note: If 10g Oracle home is on a shared device, add -shared to the previous command line.

6. Enter the SYS password for the database to be upgraded.

Note : On RAC databases you will be prompted to run ‘/tmp/racdwgrd_dbctl.sh’ on each of the nodes

Configuring Network ACL’s

Configuring Network ACL’s can be done after the upgrade.
Oracle Database 11g Release 1 (11.1) includes fine-grained access control to the UTL_TCP, UTL_SMTP, UTL_MAIL, UTL_HTTP, or UTL_INADDR packages using Oracle XMLDB. If you have applications that use one of these packages, you must install OracleXML DB if it is not already installed. You must also configure network access control lists (ACLs) in the database before these packages can work as they did in prior releases.

As the DBMS_NETWORK_ACL_ADMIN package is introduced after upgrading the database and not available in prior releases ,to avoid “ORA-24247: network access denied by access control list (ACL)” when executing UTL packages (Network related Packages), access has to be granted to user using these packages refer the following note.

Note 453786.1 ORA-24247 When Executing UTL_HTTP UTL_INADDR Packages


Analyze the database using the Pre-Upgrade Information Tool.

The Upgrade Information Tool displays warnings about possible upgrade issues with the database. It also displays information about required initialization parameters for Oracle Database 11g Release 1 (11.1).

Pre-Upgrade Information Tool is also recommended if you are upgrading with DBUA, so that you can preview the items that DBUA checks

Log in to the system as the owner of the new 11gR1 ORACLE_HOME and copy the following file from the 11gR1 ORACLE_HOME/rdbms/admin directory to a directory outside of the Oracle home, such as the /tmp directory on your system.

$ORACLE_HOME/rdbms/admin/utlu111i.sql
Change to the directory where utlu111i.sql had been copied in the previous step.

Start SQL*Plus and connect to the database instance as a user with SYSDBA privileges. Then run and spool the utlu111i.sql file. Please note that the database should be started using the Source Oracle Home (9.2.0.x or 10.1.0.x or 10.2.0.x)

$ sqlplus ‘/ as sysdba’
SQL> spool upgrade_info.log
SQL> @utlu111i.sql
SQL> spool off
Check the spool file and examine the output of the upgrade information tool.
Sample output and description/recommendation of the output of the Pre-Upgrade Information Tool can be found from the link.

 

SELF NB: Connect as oracle user, and go to oracle home of the user

cd [enter]

pwd

/home/oracle

vi .bash_profile

add the following 

export ORACLE_BASE=/oracle/Oracle11

export ORACLE_HOME=$ORACLE_BASE/11201

and comment out

#export ORACLE_BASE=/oracle/Oracle10

#export ORACLE_HOME=$ORACLE_BASE/10201

on saving the file, 

set the PATH, LD_LIBRARY_PATH and ORACLE_SID.

export PATH=$ORACLE_HOME/bin:usr/sbin:/usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin:$PATH

export PATH=$ORACLE_HOME/bin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib64:/usr/lib64:/usr/local/lib64:/usr/x11r6/lib64

export ORACLE_SID=harry

 

Starting Upgrade Using  DBUA:

Click here for link to “Oracle Database Upgrade Guide 11g Release 1 (11.1) Chapter 3 Upgrading to the New Release” which contains the screenshots and steps by step procedure to upgrade a database using the DBUA graphical user interface and continue the upgrade.

Note  : The logfiles for DBUA can be found in the location : <ORACLE_HOME>/cfgtoollogs/dbua

References

NOTE:396670.1 – Usage of utltzuv2.sql before updating time zone files in Oracle 9
NOTE:396671.1 – Usage of utltzuv2.sql before updating time zone files in Oracle 10
NOTE:402742.1 – USA 2007 DST Changes: Frequently Asked Questions for Oracle Database Patches
NOTE:413671.1 – Applying “version 4” Time Zone Files on an Oracle Database
NOTE:429825.1 – Complete Checklist for Manual Upgrades to 11gR1
B28531-01 Oracle Database Security Guide 11g Release 1 (11.1)
B28300-01 Oracle Database Upgrade Guide 11g Release 1 (11.1)

 Related


Products


  • Oracle Database Products > Oracle Database > Oracle Database > Oracle Server – Enterprise Edition

Keywords


COMPATIBILITY MATRIX; DATA; DBUA; GATHER STATISTICS; INVALID DATA; MIGRATE; STATISTICS GATHERING

Errors


ORA-24247; ORA-1722

Back to top

Rate this document 

Categories: HOME

ORACLE: xhost

When receiving errors of the nature:

X11 error

Can not display error

GUI can not be displayed errors

run the following on a separate terminal as root:

 

xhost local:oracle

xhost will enable the GUID for DOMAIN SERVER “local” and for user “oracle”.

 

Categories: HOME

ORACLE: INSTALLATION ORCL11g

CONNECT as root.

[root@localhost~]# su – oracle

\-bash-3.2$ su – oracle

Password: oracle

-bash-3.2$ pwd

/home/oracle

-bash-3.2$ cd /

-bash-3.2$pwd

bash-3.2$/

dir —————[or “ls”]

bin data etc lib media mnt opt proc sbin srv tftpboot usr boot dev

home lost+found misc net oracle root selinux sys tmp var

-bash-3.2$cd /oracle

-bash-3.2$mkdir Oracle11

-bash-3.2$cd Oracle11

-bash-3.2$mkdir 11201

-bash-3.2$cd /

>>>Enter CD into CDROM and navigate to media

-bash-3.2$cd media 

-bash-3.2$dir

-bash-3.2$110621_1852 cdrom

-bash-3.2$cd 110621_1852

-bash-3.2$ls

linix_11gR2_database_1of2.zip  linix_11gR2_database_2of2.zip

-bash-3.2$cp   *.zip   /oracle/tempsoftware/oracle11g

-bash-3.2$cd /oracle/tempsoftware/oracle11g

-bash-3.2$ls

linix_11gR2_database_1of2.zip  linix_11gR2_database_2of2.zip

-bash-3.2$unzip linix_11gR2_database_1of2.zip 

-bash-3.2$unzip linix_11gR2_database_2of2.zip 

-bash-3.2$ls

database   linix_11gR2_database_1of2.zip    linix_11gR2_database_2of2.zip

-bash-3.2$cd database

-bash-3.2$ls

doc  install response rpm runInstaller sshsetup stage welcome.html

-bash-3.2$./runInstaller

——–> Starts the GUI. Use this OUI to install the Oracle Binaries.

Uncheck> i wish to receive security updates via My Oracle Support

Will pop up an Alert message, safely ignore message and say yes.

We will be installing database software only as the DBCA provides more flexibility and additional capabilities for db creation.

Next, choose whether this will be a Single instance database installation or a RAC. We are choosing the first option.

Available languages, English please, thank you very much.

Next choose, Enterprise Edition( needs 3.95 GB for installation)

Next is an important step. We are to chose

1. Oracle BASE and

2. need to specify the software location which is the ORACLE HOME.

NB. In our case, I have already installed Oracle 10g on this system. To check the different $ORACLE_SID’S and to verify if they startup automatically when the server starts up, query oratab in the etc folder

-bash-3.2$cat /etc/oratab

#blah blah blah

harry:/oracle/Oracle10/10201:N

orcl1:/oracle/Oracle10/10201:N

——>So, we have two databases on Oracle10g that are set to “N” it No to automatically startup on server startups.

Back to the OUI, (Step 6 of 11)

Choose the Oracle Base: /oracle/Oracle11

and the Oracle Home: /oracle/Oracle11/11201

Next (Step 7 of 11)

Database Administrator (OSDBA) Group: dba

Database Operator (OSOPER) Group: oinstall

Now Oracle will check if the target environment meets the minimum installation and configuration requirements for the product, should take under a minute.

If any of the prerequisites fail, you can run the FIX & CHECK AGAIN which will execute fixup scripts which can run outside the installer to fix the issues. Note that these scripts need to be run as root user. It will give very clear instructions as follows:

Script: /tmp/CVU_11.2.0.1.0_oracle/runfixup.sh

To execute the fixup scripts:

1. Open a terminal windows

2. Login as “root”

3. Run the scripts

4. Return to this window and chick “OK” to continue.

Next Oracle will start to extract files(Oracle binaries) to Oracle Home directory.

Two parts:

1. Oracle database Installation

  • Prepare
  • Copy files
  • Link binaries
  • Setup files

2. Execute Root Scripts for Oracle Database installation.

This will take while…so be patient.

Next execute configuration scripts

cd /oracle/Oracle11/11201

./root.sh

Enter the full path of the local bin direcotry: [/usr/local/bin]: —————–>press enter

The file “dbhome” already exits in /user/local/bin. Overwite it? (y/n) : y

the file oraenv already exisits overwirte it : y

coraevn : y

—-ALL IS WELL!

 

Categories: HOME

UNIX: Handy Cmds for Oracle Installation

Handy UNIX Commands for ORACLE 10g INSTALLATION

1. df -m
2. groupadd oinstall
3. groupadd dba
4. useradd -G oinstall oracle
5. usermod -g dba oracle
6. id oracle
7. chown oracle:oinstall /data
8. chown oracle:oinstall /oracle

Mount CD’s

1. cat /proc/filesystems —> for iso9660
2. mkdir /media/cdrom
3. mount -t iso9660 /dev/hdc /media/cdrom

or mount -t iso9660 /dev/hdc /media

DISPLAY
1. xhost local:oracle [—> as root user]

Categories: HOME