June 19, 2013

Cant install package elfutils-libelf-devel-*

Oracle 11g Installation on Oracle Linux 5.9


While installing oracle 11g it may show dependency error at rpm "
elfutils-libelf-devel-* "

rpm -Uvh elfutils-libelf-devel-*

In that case please install both package using following command :
 
rpm -ivh elfutils-libelf-devel-0.137-3.el5.x86_64.rpm elfutils-libelf-devel-static-0.137-3.el5.x86_64.rpm

June 14, 2013

ORA-01262 , ORA-01261

SQL> startup pfile=/u01/app/oracle/product/11.2.0/db_1/dbs/initDB11G.ora

ORA-01261: Parameter db_recovery_file_dest destination string cannot be translated
ORA-01262: Stat failed on a file destination directory
Linux-x86_64 Error: 2: No such file or directory




ORA-01262:

Stat failed on a file destination directory
Cause: Unable to get information about an Oracle managed files destination directory.
Action: Check the permissions on the directory or use a different directory name.


If this error rises when startup database using pfile please verify whether all the path or directory specified in init.ora is exist or not. 

Manually creating Oracle 11g Database





Step 1:Specify an Instance Identifier (SID)
export ORACLE_SID=db11g

Step 2:Ensure That the Required Environment Variables Are Set
$PATH
$ORACLE_HOME
$ORACLE_BASE
   
Step 3:Choose a Database Administrator Authentication Method
  •         With a password file
  •         With operating system authentication
orapwd file=$ORACLE_HOME/dbs/orapwdb11g password=sys

Step 4:Create the Initialization Parameter File
Sample init.ora file will be available in $ORACLE_HOME/dbs. Edit init.ora if needed. 

db_name='db11g'
memory_target=1G
processes = 150
audit_file_dest='$ORACLE_BASE/admin/orcl/adump'
audit_trail ='none'
db_block_size=8192
db_domain=''
db_recovery_file_dest='$ORACLE_BASE/flash_recovery_area'
db_recovery_file_dest_size=2G
diagnostic_dest='$ORACLE_BASE'
dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)'
open_cursors=300
remote_login_passwordfile='EXCLUSIVE'
undo_tablespace='UNDOTBS1'
# You may want to ensure that control files are created on separate physical
# devices
control_files = (ora_control1, ora_control2)
compatible ='11.2.0'


For convenience, store your initialization parameter file in the Oracle Database default location, using the default file name. Then when you start your database, it will not be necessary to specify the PFILE clause of the STARTUP command, because Oracle Database automatically looks in the default location for the initialization parameter file.

*Default location will be $ORACLE_HOME/dbs
*Default name will be initORACLE_SID.ora

Step 6:Connect to the Instance

sqlplus /nolog

SQL> conn / as sysdba
Connected to an idle instance.

Step 7:Create a Server Parameter File

SQL> create spfile from pfile;
File created.

Step 8: Start the Instance
startup nomount

Step 9: Issue the CREATE DATABASE Statement
 CREATE DATABASE db11g
 USER SYS IDENTIFIED BY sys
 USER SYSTEM IDENTIFIED BY sys
 LOGFILE GROUP 1 ('/u01/app/oracle/oradata/db11g/redo01a.log') SIZE 100M BLOCKSIZE 512,
                  GROUP 2 ('/u01/app/oracle/oradata/db11g/redo02a.log') SIZE 100M BLOCKSIZE 512,
                  GROUP 3 ('/u01/app/oracle/oradata/db11g/redo03a.log') SIZE 100M BLOCKSIZE 512
 MAXLOGFILES 5
 MAXLOGMEMBERS 5
 MAXLOGHISTORY 1
 MAXDATAFILES 100
 CHARACTER SET US7ASCII
 NATIONAL CHARACTER SET AL16UTF16
 EXTENT MANAGEMENT LOCAL
 DATAFILE '/u01/app/oracle/oradata/db11g/system01.dbf' SIZE 325M REUSE
 SYSAUX DATAFILE '/u01/app/oracle/oradata/db11g/sysaux01.dbf' SIZE 325M REUSE
 DEFAULT TABLESPACE users
 DATAFILE '/u01/app/oracle/oradata/db11g/users01.dbf'
 SIZE 500M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
 DEFAULT TEMPORARY TABLESPACE temp
 TEMPFILE '/u01/app/oracle/oradata/db11g/temp01.dbf'
 SIZE 20M REUSE
 UNDO TABLESPACE undotbs1
 DATAFILE '/u01/app/oracle/oradata/db11g/undotbs01.dbf'
 SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;


Step 10: Run Scripts to Build Data Dictionary Views

@?/rdbms/admin/catalog.sql
@?/rdbms/admin/catproc.sql
@?/sqlplus/admin/pupbld.sql    -- connect as system to execute this script

'?' will automatically locate $ORACLE_HOME.


More Reference: Oracle 11gR2 Documentation