Search This Blog

Total Pageviews

Monday, 16 May 2011

How to Install Oracle In silent mode

oracle installation silent mode

First complete Oracle prerequisite system parameter rpm,user group etc.


Your will get rsp file from following location

oracle@apt-amd-02:~/database/response> pwd
/home/oracle/database/response


you will get this file form

oracle@apt-amd-02:~/database/response> ls -ltr
total 268
-rw-r--r-- 1 root root 88279 2008-10-06 09:35 standard.rsp
-rw-r--r-- 1 root root 5743 2008-10-06 09:35 netca.rsp
-rw-r--r-- 1 root root 88298 2008-10-06 09:35 enterprise.rsp
-rw-r--r-- 1 root root 48199 2008-10-06 09:35 dbca.rsp
-rw-r--r-- 1 root root 26205 2008-10-06 09:35 custom.rsp

take the backup of this file enterprise.rsp
oracle@apt-amd-02:~/database/response> cp enterprise.rsp enterprise.rsp.orig

then edit this file enterprise.rsp

and change following value
=====================================
UNIX_GROUP_NAME=oinstall
FROM_LOCATION="/products.xml"
ORACLE_HOME=/home/oracle/product/11.2/DB
ORACLE_BASE=/apps/oracle
ORACLE_HOME_NAME=orcl
n_configurationOption=3
=====================================


n_configurationOption = 1 to create the database
= 2 to configure a ASM
= 3 install the software only



./runInstaller -ignoreSysPrereqs -force -silent -responseFile /enterprise.rsp

- force allows to install into nonempty directory




Starting Oracle Universal Installer...
...............

skipped ....

Installation in progress (Thu May 15 23:54:45 IST 2008)
............................................................... 18% Done.
............................................................... 36% Done.
............................................................... 54% Done.
............................................................... 73% Done.
............ 76% Done.
Install successful

Linking in progress (Thu May 15 23:59:36 IST 2008)
Link successful

Setup in progress (Fri May 16 00:06:30 IST 2008)
.............. 100% Done.
Setup successful

The following configuration scripts
/home/oracle/product/11.2/DB/root.sh

need to be executed as root for configuring the system. If you skip the execution of the configuration tools,the configuration will not be complete and the product wont function properly. In order to get the product to function properly, you will be required to execute the scripts and the configuration tools after exiting the OUI.


Then create database manually .

===========

create database manually

sample to create database manually

init_ora53old.txt file

change your parameter accordingly .


ora53old.__db_cache_size=2231369728
ora53old.__java_pool_size=16777216
ora53old.__large_pool_size=16777216
ora53old.__shared_pool_size=318767104
ora53old.__streams_pool_size=33554432
*.db_name='ora53old'
*.db_domain=''
*.core_dump_dest='/opt/oracle/admin/ora53old/cdump'
*.user_dump_dest='/opt/oracle/admin/ora53old/udump'
*.audit_file_dest='/opt/oracle/admin/ora53old/adump'
*.background_dump_dest='/opt/oracle/admin/ora53old/bdump'
*.compatible='10.2.0.1.0'
*.control_files='/opt/oracle/oradata/ora53old/control01.ctl','/opt/oracle/oradata/ora53old/control02.ctl','/opt/oracle/oradata/ora53old/control03.ctl'
*.db_block_size=8192
*.db_file_multiblock_read_count=16
*.db_recovery_file_dest_size=2147483648
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
*.job_queue_processes=10
*.open_cursors=300
*.pga_aggregate_target=418381824
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=2621440000
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'

-bash-3.00$ cat v
export ORACLE_SID=ora53
export ORACLE_SID=ora53old
export ORACLE_SID=CCCUAT65
-bash-3.00$ ls -lt init*


-bash-3.00$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Thu Nov 26 11:20:13 2009

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

Connected to an idle instance.

SYS AS SYSDBA>startup nomount pfile='/export/home/oracle/init_ora53old.txt' ;

ORACLE instance started.


CREATE DATABASE "ora53old"
MAXINSTANCES 8
MAXLOGHISTORY 1
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
DATAFILE '/opt/oracle/oradata/ora53old/system01.dbf' SIZE 300M REUSE
AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE '/opt/oracle/oradata/ora53old/sysaux01.dbf' SIZE 120M
REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
SMALLFILE DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE
'/opt/oracle/oradata/ora53old/temp01.dbf' SIZE 20M REUSE AUTOEXTEND ON
NEXT 640K MAXSIZE UNLIMITED
SMALLFILE UNDO TABLESPACE "UNDOTBS1" DATAFILE
'/opt/oracle/oradata/ora53old/undotbs01.dbf' SIZE 200M REUSE AUTOEXTEND
ON NEXT 5120K MAXSIZE UNLIMITED
CHARACTER SET WE8ISO8859P1
NATIONAL CHARACTER SET AL16UTF16
LOGFILE GROUP 1 ('/opt/oracle/oradata/ora53old/redo01.log') SIZE 51200K,
GROUP 2 ('/opt/oracle/oradata/ora53old/redo02.log') SIZE 51200K,
GROUP 3 ('/opt/oracle/oradata/ora53old/redo03.log') SIZE 51200K
USER SYS IDENTIFIED BY "sys" USER SYSTEM IDENTIFIED BY "sys";


spool instance name.log

SQL> @?/rdbms/admin/catalog.sql
SQL> @?/rdbms/admin/catproc.sql
@?/rdbms/admin/utlrp

for jvm

$ORACLE_HOME/javavm/install/initjvm.sql

for xml


$ORACLE_HOME/xdk/admin/initxml.sql for xml


#

====


#

inter Media

Verify that Oracle JVM is installed and is valid.

You can verify that Oracle JVM is correctly installed by running
SQL*Plus, connecting as SYSDBA, and issuing the following query:

SQL> select version, status from dba_registry where comp_id='JAVAVM';



Ensure that the version is correct and the status is VALID.







SQL> connect SYS/password as SYSDBA
SQL> spool text_install.txt
SQL> @?/ctx/admin/catctx.sql CTXSYS SYSAUX TEMP NOLOCK

Where:
CTXSYS - is the ctxsys user password
SYSAUX - is the default tablespace for ctxsys
TEMP - is the temporary tablespace for ctxsys
LOCK|NOLOCK - ctxsys user account will be locked or not


connect CTXSYS/ctxsys



------------------- cut here ------------------------------
connect SYS/password as SYSDBA

set pages 1000
col object_name format a40
col object_type format a20
col comp_name format a30
column library_name format a8
column file_spec format a60 wrap
spool text_install_verification.log

-- check on setup
select comp_name, status, substr(version,1,10) as version from
dba_registry where comp_id = 'CONTEXT';
select * from ctxsys.ctx_version;
select substr(ctxsys.dri_version,1,10) VER_CODE from dual;

select count(*) from dba_objects where owner='CTXSYS';

-- Get a summary count
select object_type, count(*) from dba_objects where owner='CTXSYS' group
by object_type;

-- Any invalid objects
select object_name, object_type, status from dba_objects where
owner='CTXSYS' and status != 'VALID' order by object_name;

spool off
------------------- cut here ------------------------------


/opt/oracle/oradata/ora53old/

Create tablespace DM_CCCUAT2_DOCBASE datafile
'/opt/oracle/oradata/ora53old/dm_cccuat2_docbase01.dbf' size 4g
autoextend on next 100M maxsize unlimited extent management local
segment space management auto;


Create tablespace DM_CCCUAT2_DOCBASE datafile
'/opt/oracle/oradata/ora53old/dm_cccuat2_docbase01.dbf' size 4g
autoextend on next 100M maxsize unlimited extent management local
segment space management auto;

Create tablespace DM_CCCUAT2_index datafile
'/opt/oracle/oradata/ora53old/dm_cccuat2_index' size 3g
autoextend on next 100M maxsize unlimited extent management local
segment space management auto;
;

SYS AS SYSDBA>create user cccuat2 identifed by cccuat2 ;
create user cccuat2 identifed by cccuat2
*
ERROR at line 1:
ORA-00922: missing or invalid option


SYS AS SYSDBA>create user cccuat2 identified by cccuat2 ;

User created.

SYS AS SYSDBA>alter user cccuat2 default tablespace DM_CCCUAT2_DOCBASE ;

User altered.

SYS AS SYSDBA>grant connect,resource to cccuat2;

Grant succeeded.

create directory expdp_dir as '/opt/oracle/'

grant read,write on directory expdp_dir to system,cccuat2


CCCUAT2_pump.dmp


impdp cccuat2/cccuat2 DIRECTORY=expdp_dir DUMPFILE=CCCUAT2_pump.dmp SCHEMAS=cccuat2 TABLE_EXISTS_ACTION=REPLACE

impdp " '/ as sysdba'" DIRECTORY=expdp_dir DUMPFILE=CCCUAT2_pump.dmp SCHEMAS=cccuat2 TABLE_EXISTS_ACTION=REPLACE LOGFILE=ora53old.log





tested on 19c !!!
dbca -silent -createDatabase -responseFile NO_VALUE -gdbName 'orclcd' -templateName General_Purpose.dbc -characterSet AL32UTF8 -datafileDestination '+DATA' -sid 'orclcd' -redoLogFileSize 50 -systemPassword OraPasswd1 -sysPassword OraPasswd1 -enableArchive true -createAsContainerDatabase true -pdbName ORCLPBB -numberOfPDBs 1 -useLocalUndoForPDBs true -pdbAdminPassword OraPasswd1 -recoveryAreaDestination '+DATA' -sampleSchema false -databaseType MULTIPURPOSE -nationalCharacterSet AL16UTF16 -databaseConfigType SINGLE automaticMemoryManagement=false -initParams SGA_TARGET='5000M' PGA_AGGREGATE_TARGET='200M'

Sunday, 15 May 2011

Oracle Flashback full / oracle hanged due archive log dest full

ORA-00257: archiver error. Connect internal only, until freed.
ORA-19809: limit exceeded for recovery files
ARC1: Error 19809 Creating archive log file to

or

this error

oracle@apt-amd-02:/opt/app/oracle/product/11.2/network/admin> sqlplus system/sys@//apt-amd-02.aptus.co.uk:1521/orcl.aptus.co.uk

SQL*Plus: Release 11.2.0.1.0 Production on Sun May 15 05:18:37 2011

Copyright (c) 1982, 2009, Oracle. All rights reserved.

ERROR:
ORA-00257: archiver error. Connect internal only, until freed.


Enter user-name: oracle@apt-amd-02:/opt/app/oracle/product/11.2/network/admin> sqlplus system/sys@apt-amd-02.aptus.co.uk:1521/orcl.aptus.co.uk

SQL*Plus: Release 11.2.0.1.0 Production on Sun May 15 05:18:59 2011

Copyright (c) 1982, 2009, Oracle. All rights reserved.

ERROR:
ORA-00257: archiver error. Connect internal only, until freed.




SQL> select group#,status archived from v$log;

GROUP# ARCHIVED
---------- ----------------
1 INACTIVE
2 INACTIVE
3 CURRENT

SQL> alter system switch logfile; <<<<---- will also hang


oracle@apt-amd-02:~> adrci

ADRCI: Release 11.2.0.1.0 - Production on Sun May 15 05:29:12 2011

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

ADR base = "/opt/app/oracle"
adrci> show error
DIA-48415: Syntax error found in string [show error] at column [10]

adrci> show alert

Choose the alert log from the following homes to view:

1: diag/tnslsnr/apt-amd-02/listener
2: diag/tnslsnr/apt-amd-02/listenernew
3: diag/rdbms/orcl/orcl
Q: to quit

Please select option: 3





************************************************************************
Errors in file /opt/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_arc0_23558.trc:
ORA-19809: limit exceeded for recovery files
ORA-19804: cannot reclaim 46065152 bytes disk space from 4070572032 limit
ARC0: Error 19809 Creating archive log file to '/opt/app/oracle/flash_recovery_area/ORCL/archivelog/2011_05_15/o1_mf_1_422_%u_.arc'
2011-05-15 05:29:44.667000 +00:00
Errors in file /opt/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_arc1_23560.trc:
ORA-19815: WARNING: db_recovery_file_dest_size of 4070572032 bytes is 100.00% used, and has 0 remaining bytes available.
************************************************************************
You have following choices to free up space from recovery area:
1. Consider changing RMAN RETENTION POLICY. If you are using Data Guard,
then consider changing RMAN ARCHIVELOG DELETION POLICY.
2. Back up files to tertiary device such as tape using RMAN
BACKUP RECOVERY AREA command.
3. Add disk space and increase db_recovery_file_dest_size parameter to
reflect the new space.
4. Delete unnecessary files using RMAN DELETE command. If an operating
system command was used to delete files, then use RMAN CROSSCHECK and
DELETE EXPIRED commands.
************************************************************************
Errors in file /opt/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_arc1_23560.trc:
ORA-19809: limit exceeded for recovery files
ORA-19804: cannot reclaim 46065152 bytes disk space from 4070572032 limit
ARC1: Error 19809 Creating archive log file to '/opt/app/oracle/flash_recovery_area/ORCL/archivelog/2011_05_15/o1_mf_1_422_%u_.arc'



Review your backup retention policy and if required change the RMAN RETENTION POLICY

RMAN>CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;


- If RMAN is not part of backup strategy and archivelogs are going to FRA then manual intervention required for deletion of archivelogs. Periodically purse old archivelogs


RMAN>Delete archivelog all completed before 'SYSDATE-7';

Do you really want to delete the above objects (enter YES or NO)? yes

archived log file name=/opt/app/oracle/flash_recovery_area/ORCL/archivelog/2011_05_07/o1_mf_1_374_6wco5np6_.arc RECID=135 STAMP=750554681
Deleted 42 objects


run again now ever thing ok

RMAN> Delete archivelog all completed before 'SYSDATE-7';

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=52 device type=DISK

RMAN> exit


SQL> alter system switch logfile; ---- now this will work


System altered.

Oracle LISTENER NO need for listener.ora

Oracle connect without listener file

oracle@apt-amd-02:~> sql / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Sun May 15 05:56:12 2011

Copyright (c) 1982, 2009, Oracle. All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> show parameter name

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert string
db_name string orcl
db_unique_name string orcl
global_names boolean FALSE
instance_name string orcl <<<<<----
lock_name_space string
log_file_name_convert string
service_names string orcl.aptus.co.uk <<<<-----

instance_name,service_names should set properly .


oracle@apt-amd-02:/opt/app/oracle/product/11.2/network/admin> lsnrctl stop

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 15-MAY-2011 05:58:47

Copyright (c) 1991, 2009, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=apt-amd-02.aptus.co.uk)(PORT=1521)))
The command completed successfully
oracle@apt-amd-02:/opt/app/oracle/product/11.2/network/admin> mv listener.ora listener.ora20110515-1

moved the file . so no listener file now

oracle@apt-amd-02:/opt/app/oracle/product/11.2/network/admin> ls -ltr listener.ora
ls: cannot access listener.ora: No such file or directory

oracle@apt-amd-02:/opt/app/oracle/product/11.2/network/admin> lsnrctl start


oracle@apt-amd-02:/opt/app/oracle/product/11.2/network/admin> lsnrctl stat

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 15-MAY-2011 06:10:07

Copyright (c) 1991, 2009, Oracle. All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 15-MAY-2011 06:00:11
Uptime 0 days 0 hr. 9 min. 55 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File /opt/app/oracle/diag/tnslsnr/apt-amd-02/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=apt-amd-02.aptus.co.uk)(PORT=1521)))
Services Summary...
Service "orcl.aptus.co.uk" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB.aptus.co.uk" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully



********************************************************************************

In this case PMON(process monitor ) process automatically register the service to SERVICE_NAMES and INSTANCE_NAME ,if these parameter set properly in init.ora file

*********************************************************************************
sqlplus [user]/[password]@//[database_host]:[port]/[service_name]

Enter user-name: oracle@apt-amd-02:/opt/app/oracle/product/11.2/network/admin> sqlplus scott/tiger@apt-amd-02.aptus.co.uk:1521/orcl.aptus.co.uk

SQL*Plus: Release 11.2.0.1.0 Production on Sun May 15 06:03:41 2011

Copyright (c) 1982, 2009, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

oracle@apt-amd-02:/opt/app/oracle/product/11.2/network/admin> sqlplus scott/tiger@anuj

SQL*Plus: Release 11.2.0.1.0 Production on Sun May 15 06:04:46 2011

Copyright (c) 1982, 2009, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>



sqlplus [user]/[password]@//[database_host]:[port]/[service_name]


sqlplus scott/tiger@apt-amd-02.aptus.co.uk:1521/orcl.aptus.co.uk



LISTENER with different name, LISTENER default name is "LISTENER"
============================


oracle@apt-amd-02:/opt/app/oracle/product/11.2/network/admin> cat listener.ora20110515
# listener.ora Network Configuration File: /opt/app/oracle/product/11.2/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = apt-amd-02.aptus.co.uk)(PORT = 1521))
)
)

ADR_BASE_LISTENER = /opt/app/oracle

oracle@apt-amd-02:/opt/app/oracle/product/11.2/network/admin> cp listener.ora20110515 listener.ora
oracle@apt-amd-02:/opt/app/oracle/product/11.2/network/admin> lsnrctl start LISTENER1

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 16-MAY-2011 15:14:44

Copyright (c) 1991, 2009, Oracle. All rights reserved.

Starting /opt/app/oracle/product/11.2/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /opt/app/oracle/product/11.2/network/admin/listener.ora
Log messages written to /opt/app/oracle/diag/tnslsnr/apt-amd-02/listener1/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=apt-amd-02.aptus.co.uk)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=apt-amd-02.aptus.co.uk)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER1
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 16-MAY-2011 15:14:47
Uptime 0 days 0 hr. 0 min. 3 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/app/oracle/product/11.2/network/admin/listener.ora
Listener Log File /opt/app/oracle/diag/tnslsnr/apt-amd-02/listener1/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=apt-amd-02.aptus.co.uk)(PORT=1521)))
The listener supports no services
The command completed successfully
oracle@apt-amd-02:/opt/app/oracle/product/11.2/network/admin> ps -ef|grep LIST
oracle 20618 1 0 15:14 ? 00:00:00 /opt/app/oracle/product/11.2/bin/tnslsnr LISTENER1 -inherit
oracle 20629 26430 0 15:14 pts/13 00:00:00 grep LIST

Wednesday, 11 May 2011

11g R2 Companion download

Oracle 11g

Oracle 11R2 full patch set

Oracle 11gr2 download software
11g R2 Companion download

from metalink patch No 10098816

Patch 10098816: 11.2.0.2.0 PATCH SET FOR ORACLE DATABASE SERVER

11g R2 Companion CD

from metalink








or

from OTN/E delivery

https://updates.oracle.com/download/10098816.html


from Oracle E-delivery

















Installation Type Zip File
Oracle Database (includes Oracle Database and Oracle RAC)

unzip all the file into one folder


Note: you must download both zip files to install Oracle Database.
p10098816_112020_Linux-x86-64_1of7.zip

p10098816_112020_Linux-x86-64_2of7.zip

Oracle Grid Infrastructure (includes Oracle ASM, Oracle Clusterware, and Oracle Restart)
p10098816_112020_Linux-x86-64_3of7.zip

Oracle Database Client
p10098816_112020_Linux-x86-64_4of7.zip

Oracle Gateways
p10098816_112020_Linux-x86-64_5of7.zip

Oracle Examples (i.e. 11g R2 Companion ) <<<<<<<<<<<<<<<----
p10098816_112020_Linux-x86-64_6of7.zip

Deinstall
p10098816_112020_Linux-x86-64_7of7.zip

How to extract .cpio.gz files

Oracle .cpio.gz

Oracle cpio file
oracle installation file

apt-amd-02:/home/anujs/Downloads # zcat 10201_companion_linux_x86_64.cpio.gz | cpio -idv

-rw-r--r-- 1 anujs users 736828852 2011-05-11 13:19 10201_companion_linux_x86_64.cpio.gz
drwxrwxr-x 6 94110 42424 4096 2011-05-11 13:28 companion



or


gunzip 10201_companion_linux_x86_64.cpio.gz
cpio -itv < 10201_companion_linux_x86_64.cpio

Thursday, 5 May 2011

oracle Documentation Library

Oracle Doc link
Oracle Document

http://www.oracle.com/pls/db102/homepage

http://www.oracle.com/pls/db112/homepage

Oracle Database release dates

Oracle release dates


Release Release Date
======= ============

Oracle 6 1988
Oracle 7 1992
Oracle 8 1997
Oracle 8i 1998
Oracle 9i 2001
Oracle 10g 2004
Oracle 11g 2007

Oracle DBA

anuj blog Archive