Sunday 23 December 2012 | | 0 comments

Got a Java hotspot error while launching DBCA ! Solved.


Hi Friends,

The other day while doing an Oracle Database 11.2.0.3 installation on OEL 6.2 , I encountered the below error :


# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  SIGILL (0x4) at pc=0x00000032a5214be0, pid=27556, tid=140458177951488
#
# Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_30-b03 mixed mode)
# Problematic frame:
# C  [ld-linux-x86-64.so.2+0x14be0]
#
# An error report file with more information is saved as hs_err_pid27556.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp

On looking up with MOS found that this is
https://bugzilla.redhat.com/show_bug.cgi?id=752122 

Soln: export LD_BIND_NOW=1 , prior starting with the installation.

QuickInfo about LD_BIND_NOW
Direct the dynamic linker to resolve all references immediately. In that way, you can learn before execution of main() begins that the functions invoked by your process actually are defined.

Thursday 13 December 2012 | | 0 comments

Quick demo of OMF and UMF.


       ###################################
       #         LOGIN as Oracle        #
       ###################################
[oracle@OEL61A admin]$ ps -ef | grep pmon
grid      3176     1  0 Dec12 ?        00:00:18 asm_pmon_+ASM
oracle    8176   677  0 15:19 pts/6    00:00:00 grep pmon
oracle   22351     1  0 Dec12 ?        00:00:17 ora_pmon_demo
[oracle@OEL61A admin]$ . oraenv
 ORACLE_SID = [demo] ? demo
[oracle@OEL61A admin]$ sqlplus '/as sysdba'
SQL*Plus: Release 11.2.0.3.0 Production on Thu Dec 13 15:19:14 2012
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Connected to:
SQL> select name from v$database;
NAME
---------
DEMO
SQL> show parameter db_create_file_dest
NAME                                 TYPE        VALUE
------------------------------------ ----------- -------
db_create_file_dest                  string      +DATA

SQL> select name from v$datafile;
NAME
--------------------------------------------
+DATA/demo/datafile/system.273.801569117
+DATA/demo/datafile/sysaux.274.801569125
+DATA/demo/datafile/undotbs1.275.801569131
+DATA/demo/datafile/users.277.801569135
+DATA/demo/datafile/apps_tbs.278.801569853
+DATA/demo/datafile/indx_tbs.279.801569915

SQL> --Please note the changes to FRA are effective only in the memory
SQL> alter system set db_create_file_dest='+FRA' scope=MEMORY; 
System altered.
SQL> show parameter db_create_file_dest
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_create_file_dest                  string      +FRA
SQL> --No file name is specified for the below :
SQL> create tablespace omf_tes;
Tablespace created.
SQL> select name from v$datafile;
NAME
-------------------------------------------
+DATA/demo/datafile/system.273.801569117
+DATA/demo/datafile/sysaux.274.801569125
+DATA/demo/datafile/undotbs1.275.801569131
+DATA/demo/datafile/users.277.801569135
+DATA/demo/datafile/apps_tbs.278.801569853
+DATA/demo/datafile/indx_tbs.279.801569915
+FRA/demo/datafile/omf_test.283.801933663  <---This is the new file created
       ###################################
       # LOGIN as GRID on another Session#
       ###################################
login as: grid
Access denied
grid@10.184.86.86's password:
[grid ~]$ ps -ef | grep pmon
grid      3176     1  0 Dec12 ?        00:00:18 asm_pmon_+ASM
grid      8456  8429  0 15:22 pts/7    00:00:00 grep pmon
oracle   22351     1  0 Dec12 ?        00:00:17 ora_pmon_demo
[grid ~]$ . oraenv
ORACLE_SID = [+ASM] ? +ASM
The Oracle base remains unchanged with value /u01/app/grid
[grid ~]$ asmcmd
ASMCMD> cd +FRA
ASMCMD> cd demo
ASMCMD> ls
ARCHIVELOG/
CONTROLFILE/
DATAFILE/
ONLINELOG/
ASMCMD> cd DATAFILE
ASMCMD> ls
OMF_TEST.283.801933663 <--- We could able to see the file created in our storage

       ###################################
       #         Back to Oracle Session  #
       ###################################

SQL> drop tablespace omf_test;
Tablespace dropped.

       ###################################
       #       Back GRID  Session         #
       ###################################
ASMCMD> pwd
+FRA/demo/DATAFILE
ASMCMD> ls                 <--- The File is auto matically deleted
ASMCMD-8002: entry 'DATAFILE' does not exist in directory '+FRA/demo/'
ASMCMD>
       ###################################
       #      Back to Oracle Session     #
       #      DEMO of USER MANAGED FILES #
       ###################################

SQL> --This time we are specifying a file on LOCAL Storage.
SQL> create tablespace omf_test datafile '/u01/app/oracle/admin/demo/datafile/omf_test.dbf' size 100k;
Tablespace created.

SQL> select name from v$datafile ;
NAME
-------------------------------------------------
+DATA/demo/datafile/system.273.801569117
+DATA/demo/datafile/sysaux.274.801569125
+DATA/demo/datafile/undotbs1.275.801569131
+DATA/demo/datafile/users.277.801569135
+DATA/demo/datafile/apps_tbs.278.801569853
+DATA/demo/datafile/indx_tbs.279.801569915
/u01/app/oracle/admin/demo/datafile/omf_test.dbf   

SQL> drop tablespace omf_test;
Tablespace dropped.

#File on OS even after deleting on the Unix File System
[oracle ~ datafile]$ ls -lt
total 112
-rw-r----- 1 oracle asmadmin 114688 Dec 13 15:36 omf_test.dbf

| | 0 comments

Finding the DBA,OPER and ASM Group of existing database.

cat $ORACLE_HOME/rdbms/lib/config.c
/*  SS_DBA_GRP defines the UNIX group ID for sqldba adminstrative access.  */
/*  Refer to the Installation and User's Guide for further information.  */
/* IMPORTANT: this file needs to be in sync with
              rdbms/src/server/osds/config.c, specifically regarding the
              number of elements in the ss_dba_grp array.

 */
 
#define SS_DBA_GRP "oinstall"
#define SS_OPER_GRP "dba"
#define SS_ASM_GRP ""

char *ss_dba_grp[] = {SS_DBA_GRP, SS_OPER_GRP, SS_ASM_GRP};

| | 0 comments

What is Maximum Data file Size Limitation In an Oracle Database?


Oracle Database Reference 10g Release 2 (10.2)
http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/limits002.htm#i287915


Friday 16 November 2012 | | 0 comments

Steps to migrate 11g R2 database from non-asm storage to asm storage



Login to ASMCMD as grid user
+DATA is are target for storing the files :
ASMCMD> pwd
+DATA/IRT
ASMCMD> cd IRT
ASMCMD> ls -lt
ASMCMD> mkdir TEMPFILE PARAMETERFILE ONLINELOG DATAFILE CONROLFILE BACKUPSET
ASMCMD> ls -lt
Type  Redund  Striped  Time             Sys  Name
                                        N    TEMPFILE/
                                        N    PARAMETERFILE/
                                        N    ONLINELOG/
                                        N    DATAFILE/
                                        N    CONROLFILE/
                                        N    BACKUPSET/
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Change the Database to SPFILE instead of Pfile and set parameters:
bash-4.1$ pwd
/scratch/app/oracle/product/11.2.0/db_1/dbs
sqlplus '/as sysdba'
SQL> create spfile from pfile='/scratch/app/oracle/product/11.2.0/db_1/dbs/initIRT.ora';
File created.
SQL> !ls -tlr
total 40532
-rw-r--r-- 1 orausr oinstall      452 Nov 16 12:05 initIRT.ora
-rw-r----- 1 orausr asmadmin     1536 Nov 16 12:52 spfileIRT.ora
SQL> shutdown immediate
SQL> startup;
SQL> alter database disable block change tracking ;  --Applies only if BCT is on
SQL> --Configuring the FRA
SQL> alter system set db_recovery_file_dest_size = 1024M;
SQL> alter system set db_recovery_file_dest = '+FRA';
SQL> alter system set control_files = '+DATA/IRT/controlfile/control_irt.dbf' scope=spfile;
SQL> shutdown immediate;
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Moving the files to ASM storage.

RMAN> startup nomount;
Oracle instance started
Total System Global Area    1068937216 bytes
Fixed Size                     2235208 bytes
Variable Size                620758200 bytes
Database Buffers             440401920 bytes
Redo Buffers                   5541888 bytes

rman target /

Recovery Manager: Release 11.2.0.3.0 - Production on Fri Nov 16 12:55:26 2012
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
connected to target database: IRT (not mounted)

RMAN> restore controlfile from '/scratch/app/oracle/oradata/IRT/controlfiles/control1.ctl';
RMAN> alter database mount;
RMAN> backup as copy database format '+DATA';

Starting backup at 16-NOV-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=5 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=/scratch/app/oracle/oradata/IRT/datafiles/system01.dbf
output file name=+DATA/irt/datafile/system.278.799505801 tag=TAG20121116T125640 RECID=1 STAMP=799505802
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=/scratch/app/oracle/oradata/IRT/datafiles/sysaux01.dbf
output file name=+DATA/irt/datafile/sysaux.279.799505803 tag=TAG20121116T125640 RECID=2 STAMP=799505804
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=/scratch/app/oracle/oradata/IRT/datafiles/users01.dbf
output file name=+DATA/irt/datafile/users.280.799505805 tag=TAG20121116T125640 RECID=3 STAMP=799505805
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=/scratch/app/oracle/oradata/IRT/datafiles/undotbs01.dbf
output file name=+DATA/irt/datafile/undotbs1.281.799505805 tag=TAG20121116T125640 RECID=4 STAMP=799505806
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting datafile copy
copying current control file
output file name=+DATA/irt/controlfile/backup.282.799505807 tag=TAG20121116T125640 RECID=5 STAMP=799505807
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 16-NOV-12
channel ORA_DISK_1: finished piece 1 at 16-NOV-12
piece handle=+DATA/irt/backupset/2012_11_16/nnsnf0_tag20121116t125640_0.283.799505809 tag=TAG20121116T125640 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 16-NOV-12

RMAN> switch database to copy;
datafile 1 switched to datafile copy "+DATA/irt/datafile/system.278.799505801"
datafile 2 switched to datafile copy "+DATA/irt/datafile/sysaux.279.799505803"
datafile 3 switched to datafile copy "+DATA/irt/datafile/undotbs1.281.799505805"
datafile 4 switched to datafile copy "+DATA/irt/datafile/users.280.799505805"

RMAN> exit

sqlplus '/as sysdba'
SQL> alter database open;
SQL> select file_name from dba_data_files;
FILE_NAME
--------------------------------------------------------------------------------
+DATA/irt/datafile/system.278.799505801
+DATA/irt/datafile/sysaux.279.799505803
+DATA/irt/datafile/undotbs1.281.799505805
+DATA/irt/datafile/users.280.799505805

SQL> select name from v$controlfile;
NAME
--------------------------------------------------------------------------------
+DATA/control_irt.dbf

SQL> select member,group# from v$logfile;
MEMBER                                                                     GROUP#
---------------------------------------------------------------------- ----------
/scratch/app/oracle/oradata/IRT/onlinelogfiles/redo01.log                       1
/scratch/app/oracle/oradata/IRT/onlinelogfiles/redo02.log                       2
/scratch/app/oracle/oradata/IRT/onlinelogfiles/redo03.log                       3

SQL> select file_name from dba_temp_files;
FILE_NAME
------------------------------------------------------
/scratch/app/oracle/oradata/IRT/tempfiles/temp01.dbf

SQL> select tablespace_name from dba_temp_files;
TABLESPACE_NAME
------------------------------
TEMPTS1

SQL>  alter tablespace TEMPTS1 add tempfile size 100m;
Tablespace altered.

SQL> alter database tempfile '/scratch/app/oracle/oradata/IRT/tempfiles/temp01.dbf' drop;
Database altered.

SQL> alter database add logfile group 5 size 100M;
Database altered.

SQL>  alter database add logfile group 6 size 100M;
Database altered.

SQL> alter database add logfile group 7 size 100M;
Database altered.

SQL> select member,group# from v$logfile;
MEMBER                                                                     GROUP#
---------------------------------------------------------------------- ----------
/scratch/app/oracle/oradata/IRT/onlinelogfiles/redo01.log                       1
/scratch/app/oracle/oradata/IRT/onlinelogfiles/redo02.log                       2
/scratch/app/oracle/oradata/IRT/onlinelogfiles/redo03.log                       3
+DATA/irt/onlinelog/group_5.285.799508049                                       5
+DATA/irt/onlinelog/group_6.286.799508059                                       6
+DATA/irt/onlinelog/group_7.287.799508065                                       7

SQL> alter database drop logfile group 1;
Database altered.

SQL> alter database drop logfile group 2;
Database altered.

SQL> alter database drop logfile group 3;
Database altered.

SQL> select member,group# from v$logfile;
MEMBER                                                                     GROUP#
---------------------------------------------------------------------- ----------
+DATA/irt/onlinelog/group_5.285.799508049                                       5
+DATA/irt/onlinelog/group_6.286.799508059                                       6
+DATA/irt/onlinelog/group_7.287.799508065                                       7

SQL> create pfile='/scratch/app/oracle/product/11.2.0/db_1/dbs/initIRT.ora' from spfile;

File created.

SQL> shutdown immediate;

@@@@@@@@@@@@@@@@@@@@@@@@
Login to asmcmd as grid
ASMCMD> pwd
+DATA
ASMCMD> cp control_irt.dbf control_irt01.ctl
copying +DATA/control_irt.dbf -> +DATA/control_irt01.ctl
ASMCMD> cp control_irt01.ctl control_irt02.ctl
copying +DATA/control_irt01.ctl -> +DATA/control_irt02.ctl
ASMCMD> cp control_irt01.ctl control_irt03.ctl
copying +DATA/control_irt01.ctl -> +DATA/control_irt03.ctl
ASMCMD> exit
@@@@@@@@@@@@@@@@@@@@@@@@
Edit the pfile /scratch/app/oracle/product/11.2.0/db_1/dbs/initIRT.ora  for  control_files value:
-bash-4.1$ cat /tmp/init.ora
IRT.__db_cache_size=436207616
IRT.__java_pool_size=4194304
IRT.__large_pool_size=12582912
IRT.__oracle_base='/scratch/app/oracle'#ORACLE_BASE set from environment
IRT.__pga_aggregate_target=432013312
IRT.__sga_target=641728512
IRT.__shared_io_pool_size=0
IRT.__shared_pool_size=176160768
IRT.__streams_pool_size=0
*.control_files='+DATA/control_irt01.ctl','+DATA/control_irt02.ctl','+DATA/control_irt03.ctl'    #This is the value we are interested in
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_name='IRT'
*.fast_start_mttr_target=500
*.job_queue_processes=10
*.memory_max_target=1024M
*.memory_target=1024M
*.open_cursors=300
*.processes=300
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'

Now start the database using this pfile.
SQL> sqlplus '/as sysdba'
SQL> startup nomount pfile='/scratch/app/oracle/product/11.2.0/db_1/dbs/initIRT.ora';
SQL> alter database mount;
SQL> create spfile '+DATA/irt/spfile' from pfile;
SQL> shutdown immediate;
@@@@@@@@@@@@@@@@@@@@@@@@
Now that we have created SPFILE from pfile , edit the pfile in the dbs dir and create a link to the spfile.
-bash-4.1$ pwd
/scratch/app/oracle/product/11.2.0/db_1/dbs
-bash-4.1$ cat initIRT.ora
spfile='+DATA/irt/spfile'
@@@@@@@@@@@@@@@@@@@@@@@@
startup the databae
sqlplus '/as sysdba'
SQL> startup;
@@@@@@@@@@@@@@@@@@@@@@@@
After these control file , online redo logfile and datafiles folder can be removed.

| | 0 comments

Steps to create 11g R2 Database on NON-ASM Storage:


Create the below dir , With full permissions for OINSTALL [775]
-bash-4.1$  pwd
/scratch/app/oracle/oradata/IRT
-bash-4.1$ ls -tlRR
total 32
drwxrwxr-x 2 orausr oinstall 4096 Nov 16 11:46 adump
drwxrwxr-x 2 orausr oinstall 4096 Nov 16 11:46 bdump
drwxrwxr-x 2 orausr oinstall 4096 Nov 16 11:46 cdump
drwxrwxr-x 2 orausr oinstall 4096 Nov 16 11:46 udump
drwxrwxr-x 2 orausr oinstall 4096 Nov 16 11:18 fra
drwxrwxr-x 2 orausr oinstall 4096 Nov 16 11:18 datafiles
drwxrwxr-x 2 orausr oinstall 4096 Nov 16 11:17 onlinelogfiles
drwxrwxr-x 2 orausr oinstall 4096 Nov 16 11:17 controlfiles
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
cat > initIRT.ora
db_name = IRT
db_block_size = 8192
memory_target = 1024M
memory_max_target = 1024M
processes = 300
control_files = (/scratch/app/oracle/oradata/IRT/controlfiles/control1.ctl,/scratch/app/oracle/oradata/IRT/controlfiles/control2.ctl,/scratch/app/oracle/oradata/IRT/controlfiles/control3.ctl)
job_queue_processes = 10
open_cursors = 300
fast_start_mttr_target = 500
undo_management = AUTO
undo_tablespace = UNDOTBS1
remote_login_passwordfile = EXCLUSIVE
CTRL+D
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
set the environment:
export ORACLE_SID=IRT
export ORACLE_BASE=/scratch/app/oracle
export ORACLE_HOME=/scratch/app/oracle/product/11.2.0/db_1
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
SQL> startup nomount;
ORACLE instance started.
SQL> show parameter db_name
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_name                              string      IRT
SQL> CREATE DATABASE IRT
USER SYS IDENTIFIED BY oracle
USER SYSTEM IDENTIFIED BY oracle
LOGFILE
GROUP 1 ('/scratch/app/oracle/oradata/IRT/onlinelogfiles/redo01.log') SIZE 100M,
GROUP 2 ('/scratch/app/oracle/oradata/IRT/onlinelogfiles/redo02.log') SIZE 100M,
GROUP 3 ('/scratch/app/oracle/oradata/IRT/onlinelogfiles/redo03.log') SIZE 100M
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 100
MAXINSTANCES 1
CHARACTER SET AL32UTF8
NATIONAL CHARACTER SET AL16UTF16
DATAFILE '/scratch/app/oracle/oradata/IRT/datafiles/system01.dbf' SIZE 325M REUSE
EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE '/scratch/app/oracle/oradata/IRT/datafiles/sysaux01.dbf' SIZE 325M REUSE
DEFAULT TABLESPACE USERS DATAFILE
'/scratch/app/oracle/oradata/IRT/datafiles/users01.dbf' SIZE 325M REUSE
DEFAULT TEMPORARY TABLESPACE tempts1 TEMPFILE
'/scratch/app/oracle/oradata/IRT/tempfiles/temp01.dbf' SIZE 20M REUSE
UNDO TABLESPACE undotbs1 DATAFILE
'/scratch/app/oracle/oradata/IRT/datafiles/undotbs01.dbf' SIZE 200M REUSE
AUTOEXTEND ON MAXSIZE 300M;
SQL> spool create_dd.lis
SQL> @?/rdbms/admin/catalog.sql
SQL> @?/rdbms/admin/catproc.sql
SQL> connect system/<password>
SQL> @?/sqlplus/admin/pupbld