Monday, April 27, 2009

Oracle installtion and DB creation- issues & solutions

Oracle installation issues and solutions

Do the following steps in remote system:

START THE XFS PROCESS:

sudo /sbin/service xfs restart
Shutting down X Font Server
Starting X Font Server

START THE VNCSERVER

vncserver

You will require a password to access your desktops.
Password:
Verify:
Would you like to enter a view-only password (y/n)? y
Password:
Verify:
xauth: creating new authority file /home/oracle/.Xauthority

New 'X' desktop is x.x.x.x:2


LOGIN INTO VNC CLIENT FROM YOUR LOCAL SYSTEM to connect remote DB system:

open shell command prompt:

export DISPLAY=:1.0
xhost +

access control disabled, clients can connect from any host

Now screens will be shown on local pc

Two scripts that needs to be run while installing oracle software:

1.
sudo /xxx/xx/oracle/oraInventory/orainstRoot.sh
Changing permissions of /xxx/xx/oracle/oraInventory to 770.
Changing groupname of /xxx/xx/oracle/oraInventory to oinstall.
The execution of the script is complete

2.

sudo /xxx/xx/oracle/product/10.2.0/db_1/root.sh
Running Oracle10 root.sh script...

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /xxx/xx/oracle/product/10.2.0/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.


Solutions for collector errors :
Error message:

Exception String: Error in invoking target 'collector' of makefile '/xxx/xx/oracle/product/10.2.0/db_1/sysman/lib/ins_emdb.mk'

Install the following RPM's to solve the issue or latest version of those.

glibc-devel-2.7-2.i386
glibc-headers-2.7-2.x86_64
glibc-common-2.7-2.x86_64
glibc-2.7-2.i686
glibc-2.7-2.x86_64
glibc-devel-2.7-2.x86_64

Make file errors:

Install following RPM's or latest version of those

gcc-3.3.3-43
gcc-c++-3.3.3-43
libaio-devel-0.3.98-18
openmotif-libs-2.2.2-519.1


Installation errors ( make file etc):
Sometimes while installing oracle 10g on latest linux/suse systems we face installation errors in between stating that the required packages does not existed which results makefile etc errors but in reality we can see newer version rpms/packages got installed on OS. we have latest packages on Linux system but oracle requires older package for software getting installed. For this if we try to install old package on that system it will deny saying that the newer version exists on OS. So as a workaround we can create a soft link i.e. link the old package to new one by below command.
ln -s newversion oldversion

newverions: already existed one
oldversion: which oracle need to continue

and click retry button..........

ORACLE INSTALLATION QUICK FIX on Suse-11

While installing oracle 10.2 on Suse-11 there are couple of issues bound to happen.
When we run installer it fails giving error

Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2
Failed <<<<
As it seems clearly that Suse9 is in the list but not Suse 11, the workaround for this is modifying the file
/etc/SuSE-release with below version.
SUSE Linux Enterprise Server 9 (i586)
VERSION = 9
and now execute ./runinstaller and it works fine.
Before we run oracle setup make sure that the below packages are installed with given version for oracle 10.2 DB.

openmotif
openmotif-libs
gcc
gcc-c++
libstdc
libaio-devel
glibc-devel-
libstdc++-devel
openmotif-libs
sysstat
XFree86-libs-
expat-
XFree86 xf86tools cabextract libpng libjpeg XFree86-Mesa
binutils-2.15.90.0.1.1-32.5
glibc-2.3.3-98.28
gnome-libs-1.4.1.7-671.1
libstdc++-3.3.3-43.24
libstdc++-devel-3.3.3-43.24
make-3.80-184.1
pdksh-5.2.14-780.1
xscreensaver-4.16-2.6

we did solve this problem a couple of times and if anyone have any other better solution than this, please share it with us...

Creation of Oracle 10g database manually:


We often required to create oracle database manually or at least for learning purpose. I have created oracle 10g database manually by following the below method on RHEL 4 and thought to post it here...


1. Set oracle sid

export ORACLE_SID=mydb

2. Creation of init.ora file for new database

vi $ORACLE_HOME/dbs/initmydb.ora

control_files = (/u02/oracle/oradata/mydb/control01.ctl,/u02/oracle/oradata/mydb/control02.ctl)
undo_management = AUTO
undo_tablespace = UNDOTBS1
db_name = mydb
db_block_size = 8192
sga_max_size = 573741824
sga_target = 573741824

3. Creation of password file

$ORACLE_HOME/bin/orapwd file=$ORACLE_HOME/dbs/orapwmydb password=xxxx entries=5 force=y

ensure there is password file has no extension and no upper case letters

4. start instance

sqlplus / as sysdba
startup nomount

5. Run the create db statement

create database mydb
logfile group 1 ('/u02/oracle/oradata/mydb/redo1.log') size 100M,
group 2 ('/u02/oracle/oradata/mydb/redo2.log') size 100M,
group 3 ('/u02/oracle/oradata/mydb/redo3.log') size 100M
character set utf8
national character set utf8
datafile '/u02/oracle/oradata/mydb/system.dbf' size 500M autoextend on next 10M maxsize 1G extent management local
sysaux datafile '/u02/oracle/oradata/mydb/sysaux.dbf' size 100M autoextend on next 10M maxsize 1G
undo tablespace undotbs1 datafile '/u02/oracle/oradata/mydb/undotbs1.dbf' size 100M
default temporary tablespace temp tempfile '/u02/oracle/oradata/mydb/temp01.dbf' size 100M;


6. Create SPFILE from PFILE

create spfile='/opt/app/oracle/product/10.1.0/dbs/spfilemydb.ora' from PFILE='/opt/app/oracle/product/10.1.0/dbs/initmydb.ora'
Shutdown immediate;
startup;
show parameter spfile

-- ensure the spfile is used now..

7. Run Catalog scripts to Build Data Dictionary

@?/rdbms/admin/catalog.sql 
-- Creats the data dictionary and grants the access to public.
@?/rdbms/admin/catproc.sql 
-- Runs the all required scripts for PL/SQL .

catproc and catalog can be re-run anytime and there will not be any issues unless one run wrong version of the scripts.

8. Change sys,systems passwords with alter user statement.
  alter system set remote_login_passwordfile=EXCLUSIVE scope=spfile;
Shutdown immediate;
@?/sqlplus/admin/pupbld.sql
-- only as system user

example:
conn system
password: xxxx
SQL> show user
must be system
execute @?/sqlplus/admin/pupbld.sql

Check whether table PRODUCT_USER_PROFILE is already existed and if this table exists, then one should not run the pupbld.sql script. If the table does not exist, then run the script as SYSTEM.


9. Change listener,tnsnames.ora, sqlnet.ora as required.
10. Create additional tablespaces and users
11. Backup database.
12. Make entry in /etc/oratab/ with new db info
13. Create directories for dump (trace file directories) , flash recovery area (db_recovery_file_dest) and DB_CREATE_FILE_DEST etc which are required for basic db functioning and alter those relevant parameters using alter system set ''=''

These are the minimum steps to create a database and make it up and running instantly.


How to configure OEM manually in oracle 10g database:

Ensure that the job_queue_processes at least more than 1 or 1 to complete OEM installation manually
if not do the follow
show parameter job_queue_processes
alter system set job_queue_processes=2 scope=spfile;
show parameter job_queue_processes
emca -repos create

STARTED EMCA at Fri Jan 08 09:26:26 CET 2010
Enter the following information about the database to be configured
Listener port number: 1160
Database SID: mydb
Service name: mydb
Email address for notification: xxxx@xxxxxxx.com
Email gateway for notification: xxx.xxxx.com
Password for dbsnmp:
Password for sysman:
Password for sys:

-----------------------------------------------------------------
....

-----------------------------------------------------------------


Any issues or Troubleshoot :
go to the folder
/u02/app/oracle/product/10.1.0/<>_test/sysman/config
the file to check is emoms.properties

How to solve Io Exception: The network adapter could not establish the connection in oracle manual OEM installation
check $ORACLE_HOME/hostname_sid/sysman/emd/targets.xml file to ensure correct "oracle_database", "Port", "LsnrName", ListenerOraDir and "OracleHome" etc are set correctly.

Also check $ORACLE_HOME/hostname_sid/sysman/config/emoms.properties file parameter values are set correctly...

ensure there are no errors in $ORACLE_HOME/hostname_sid/sysman/config/log/emoms.trc file... and restart db console...

Personally i got error i.e. Io Exception: The network adapter could not establish the connection and able to solve this by ensuring correct values are set in said configuration files...



How to Start, stop, status of OEM control in oracle 10g database
emctl start dbconsole
emctl stop dbconsole
emctl status dbconsole

how to install jaccelerator ncomp in oracle 10g:
One can check whether jaccelerator is installed or not using following query:

select dbms_java.full_ncomp_enabled from dual;
It show the following output if it not installed

select dbms_java.full_ncomp_enabled from dual
*
ERROR at line 1:
ORA-29558: JAccelerator (NCOMP) not installed. Refer to Install Guide for instructions.
ORA-06512: at "SYS.DBMS_JAVA", line 236

if it is installed then the following output can be seen

 SQL> select dbms_java.full_ncomp_enabled from dual;

FULL_NCOMP_ENABLED
----------------------------------------------------
OK

How to install jaccelerator and configure:

.,.... comming soon....


IF anyone have any other better solution than this, please share ... thankx

No comments:

Post a Comment