In sweet memories of my ever loving brother "kutty thambi " ARUN KUMAR

Saturday, July 31, 2010

Dropping wrongly added DATAFILE to Tablespace in 10gR2

Today in OTN forum, question regarding drop wrongly added datafile to a tablespace, here i documented it.
dropped datafile can't be removed from database

Question asked by gspersi answered by Tim Boles
I have a new dba on my team that mistakenly added a datafile to a tablespace in the wrong directory. When attempting to remove it he offlined it and then tried to drop it. It would not drop. He deleted the file from the file system. I am in archivelog mode and tried to recover datafile but no success.

Oracle 10.2.0.4 on solaris 10 Any ideas?

Solution:

To re-create a datafile for recovery:

Create a new, empty datafile to replace a damaged datafile that has no corresponding backup. For example, assume that the datafile ?/oradata/trgt/users01.dbf has been damaged, and no backup is available. The following statement re-creates the original datafile (same size) on disk2:

ALTER DATABASE CREATE DATAFILE '/oradata/trgt/users01.dbf' AS
'/disk2/users01.dbf';
This statement creates an empty file that is the same size as the lost file. The database looks at information in the control file and the data dictionary to obtain size information. The old datafile is renamed as the new datafile.

Perform media recovery on the empty datafile. For example, enter:

RECOVER DATAFILE '/disk2/users01.dbf'
All archived logs written after the original datafile was created must be applied to the new, empty version of the lost datafile during recovery.

SQL> alter tablespace users add datafile '/u01/users02.dbf' size 5m;
---wrongly added datafile
Tablespace altered.

SQL> alter database datafile  '/u01/users02.dbf' offline;
 ---NEW DBA Tried to remove
Database altered.


SQL> ! rm -rf /u01/users02.dbf 

SQL> col file_name format a45
SQL> col status format a10
SQL> select file_name,status , online_status from dba_data_files;
--SENIOR DBA FOUND DATAFILE MISSING
FILE_NAME                                     STATUS     ONLINE_
--------------------------------------------- ---------- -------
/u01/app/oracle/oradata/cdbs/users01.dbf      AVAILABLE  ONLINE
/u01/app/oracle/oradata/cdbs/sysaux01.dbf     AVAILABLE  ONLINE
/u01/app/oracle/oradata/cdbs/undotbs01.dbf    AVAILABLE  ONLINE
/u01/app/oracle/oradata/cdbs/system01.dbf     AVAILABLE  SYSTEM
/u01/users02.dbf                              AVAILABLE  RECOVER

SQL> alter system switch logfile;

System altered.

SQL> alter database create datafile '/u01/users02.dbf';
--CREATE NEW DATAFILE IN THE SAME NAME
Database altered.

SQL> select file_name,status , online_status from dba_data_files;

FILE_NAME                                     STATUS     ONLINE_
--------------------------------------------- ---------- -------
/u01/app/oracle/oradata/cdbs/users01.dbf      AVAILABLE  ONLINE
/u01/app/oracle/oradata/cdbs/sysaux01.dbf     AVAILABLE  ONLINE
/u01/app/oracle/oradata/cdbs/undotbs01.dbf    AVAILABLE  ONLINE
/u01/app/oracle/oradata/cdbs/system01.dbf     AVAILABLE  SYSTEM
/u01/users02.dbf                              AVAILABLE  RECOVER

SQL> recover datafile '/u01/users02.dbf';
Media recovery complete.
SQL> select file_name,status , online_status from dba_data_files;

FILE_NAME                                     STATUS     ONLINE_
--------------------------------------------- ---------- -------
/u01/app/oracle/oradata/cdbs/users01.dbf      AVAILABLE  ONLINE
/u01/app/oracle/oradata/cdbs/sysaux01.dbf     AVAILABLE  ONLINE
/u01/app/oracle/oradata/cdbs/undotbs01.dbf    AVAILABLE  ONLINE
/u01/app/oracle/oradata/cdbs/system01.dbf     AVAILABLE  SYSTEM
/u01/users02.dbf                              AVAILABLE  OFFLINE

SQL> alter database datafile '/u01/users02.dbf' online;

Database altered.

SQL> alter tablespace users drop datafile '/u01/users02.dbf';
--Drop empty datafile From Tablespace (10gR2 NEW FEATURE)
Tablespace altered.

SQL> select file_name,status , online_status from dba_data_files;

FILE_NAME                                     STATUS     ONLINE_
--------------------------------------------- ---------- -------
/u01/app/oracle/oradata/cdbs/users01.dbf      AVAILABLE  ONLINE
/u01/app/oracle/oradata/cdbs/sysaux01.dbf     AVAILABLE  ONLINE
/u01/app/oracle/oradata/cdbs/undotbs01.dbf    AVAILABLE  ONLINE
/u01/app/oracle/oradata/cdbs/system01.dbf     AVAILABLE  SYSTEM

SQL>


you can drop empty datafiles by
alter tablespace drop datafile 'datafile_name'
command if it is 10gR2.

Drop Empty Datafiles
Imagine that you just added a datafile to the wrong directory or tablespace—a fairly common error. All is not lost; the datafile doesn't contain any data yet, so you can easily drop it, right?

Unfortunately, you can't. Prior to Oracle Database 10g Release 2, your only clean option for removing a datafile is to drop the entire tablespace and then rebuild it without that particular file. If the tablespace contains data, you have to go through the time-consuming and laborious process of storing the data on a separate location and reinstating it. In addition to its inconvenience, this process makes the tablespace unavailable.

Thankfully, in Oracle Database 10g Release 2 the process has been simplified: You can just drop the datafile. For example, the following command will remove the indicated datafile from the tablespace as well as from the server.
alter tablespace test  drop datafile '/disk1/oradata/datafile/test02.dbf';

There are a couple restrictions, however: The datafile must be empty to be dropped. You can't drop the last datafile in a tablespace; the tablespace itself must be dropped. And the tablespace must be online and in read-write status.

reference:
http://forums.oracle.com/forums/message.jspa?messageID=4468071#4468071
http://www.oracle.com/technology/pub/articles/10gdba/nanda_10gr2dba_part2.html

Thursday, July 29, 2010

Recover a Dropped or Deleted Table Using RMAN Backup

this is not incomplete point in time recovery.

From 10g Onwards you can recover the dropped table from recyclebin, suppose the table is not available in recycle bin also flashback database in not enabled.

But you are having a recent RMAN backup containing that table.

you can recover the table by

1. create a duplicate database from production database using until log sequence

RMAN> RUN
2> {
3> SET UNTIL SEQUENCE 11 THREAD 1;
4> DUPLICATE TARGET DATABASE TO "clone" NOFILENAMECHECK;
5> }

2. export the users table from clone(duplicate) database.

[oracle@rac2 clone]$ exp rajesh/rajesh file=/u01/app/oracle/test_rcv.dmp tables=test rows=y

3. import the users table to the production database.
[oracle@rac1 ~]$ imp rajesh/rajesh file=/u01/app/oracle/test_rcv.dmp fromuser=rajesh touser=rajesh tables=test

Example:

1. creating a table and insert some rows , take rman backup and then drop the database.
switch logfiles for more change.



SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/app/oracle/product/10.2.0/db_1/dbs/arch
Oldest online log sequence 1
Next log sequence to archive 3
Current log sequence 3

SQL> create user rajesh identified by rajesh;

User created.

SQL> grant connect,resource to rajesh;

Grant succeeded.

SQL> conn rajesh/rajesh;
Connected.
SQL> create table test ( id number);

Table created.

SQL> insert into test values (100);

1 row created.

SQL> /

1 row created.

SQL> /

1 row created.

SQL> /

1 row created.

SQL> commit;

Commit complete.

SQL> set time on;
19:11:52 SQL> conn sys/oracle as sysdba;
Connected.
19:12:03 SQL> alter system switch logfile;

System altered.

19:12:13 SQL> /

System altered.

19:12:17 SQL>

[oracle@rac1 ~]$ . oraenv
ORACLE_SID = [oracle] ? cdbs
[oracle@rac1 ~]$ rman target /

Recovery Manager: Release 10.2.0.1.0 - Production on Wed Jul 28 19:13:01 2010

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

connected to target database: CDBS (DBID=3126697048)

RMAN> backup full database format '/u01/app/oracle/backup/%d_%U.bckp' plus archivelog format '/u01/app/oracle/backup/%d_%U.bckp';


Starting backup at 28-JUL-10
current log archived
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=136 devtype=DISK
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=3 recid=1 stamp=725569933
input archive log thread=1 sequence=4 recid=2 stamp=725569937
input archive log thread=1 sequence=5 recid=3 stamp=725570192
channel ORA_DISK_1: starting piece 1 at 28-JUL-10
channel ORA_DISK_1: finished piece 1 at 28-JUL-10
piece handle=/u01/app/oracle/backup/CDBS_01ljuklc_1_1.bckp tag=TAG20100728T191651 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 28-JUL-10

Starting backup at 28-JUL-10
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/u01/app/oracle/oradata/cdbs/system01.dbf
input datafile fno=00003 name=/u01/app/oracle/oradata/cdbs/sysaux01.dbf
input datafile fno=00002 name=/u01/app/oracle/oradata/cdbs/undotbs01.dbf
input datafile fno=00004 name=/u01/app/oracle/oradata/cdbs/users01.dbf
channel ORA_DISK_1: starting piece 1 at 28-JUL-10
channel ORA_DISK_1: finished piece 1 at 28-JUL-10
piece handle=/u01/app/oracle/backup/CDBS_02ljuklm_1_1.bckp tag=TAG20100728T191707 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:57
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 28-JUL-10
channel ORA_DISK_1: finished piece 1 at 28-JUL-10
piece handle=/u01/app/oracle/backup/CDBS_03ljukpb_1_1.bckp tag=TAG20100728T191707 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:05
Finished backup at 28-JUL-10

Starting backup at 28-JUL-10
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=6 recid=4 stamp=725570353
channel ORA_DISK_1: starting piece 1 at 28-JUL-10
channel ORA_DISK_1: finished piece 1 at 28-JUL-10
piece handle=/u01/app/oracle/backup/CDBS_04ljukpk_1_1.bckp tag=TAG20100728T191914 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 28-JUL-10

RMAN> configure channel device type disk format '/u01/app/oracle/backup/%U';

using target database control file instead of recovery catalog
old RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/u01/app/oracle/backup/%U';
new RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/u01/app/oracle/backup/%U';
new RMAN configuration parameters are successfully stored

RMAN> backup archivelog all;

Starting backup at 28-JUL-10
current log archived
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=138 devtype=DISK
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=3 recid=1 stamp=725569933
input archive log thread=1 sequence=4 recid=2 stamp=725569937
input archive log thread=1 sequence=5 recid=3 stamp=725570192
input archive log thread=1 sequence=6 recid=4 stamp=725570353
input archive log thread=1 sequence=7 recid=5 stamp=725570642
input archive log thread=1 sequence=8 recid=6 stamp=725570810
channel ORA_DISK_1: starting piece 1 at 28-JUL-10
channel ORA_DISK_1: finished piece 1 at 28-JUL-10
piece handle=/u01/app/oracle/backup/05ljul85_1_1 tag=TAG20100728T192658 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 28-JUL-10


19:28:01 SQL> create table sample ( id number);

Table created.

19:28:22 SQL> insert into sample values(100);

1 row created.

19:28:34 SQL> /

1 row created.

19:28:35 SQL> /

1 row created.

19:28:36 SQL> commit;

Commit complete.

19:28:38 SQL> select * from test;

ID
----------
100
100
100
100


19:29:30 SQL> drop table test;

Table dropped.

19:30:13 SQL> conn sys/oracle as sysdba;
Connected.
19:33:47 SQL> alter system switch logfile;

System altered.

19:33:53 SQL> /

System altered.



19:33:54 SQL>

19:48:46 SQL> create pfile from spfile;

File created.

19:51:27 SQL>


2. create a duplicate database in test server



create a required password file, init file,
dump file and database files directories for clone database.
configure listener.ora and tnsnames.ora files properly.

[oracle@rac1 dbs]$ scp initcdbs.ora oracle@rac2:/u01/app/oracle/product/10.2.0/db_1/dbs/
initcdbs.ora 100% 892 0.9KB/s 00:00
[oracle@rac1 dbs]$ scp orapwcdbs oracle@rac2:/u01/app/oracle/product/10.2.0/db_1/dbs/
orapwcdbs 100% 1536 1.5KB/s 00:00
[oracle@rac1 dbs]$

tnsnames.ora file on both machines
CDBS =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip.localdomain)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = cdbs)
)
)
CLONE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip.localdomain)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = clone)
)
)


[oracle@rac2 ~]$ . oraenv
ORACLE_SID = [clone] ?
[oracle@rac2 ~]$ sqlplus '/as sysdba'

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jul 29 14:29:43 2010

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

Connected to an idle instance.

SQL> startup nomount
ORACLE instance started.

Total System Global Area 444596224 bytes
Fixed Size 1219904 bytes
Variable Size 130024128 bytes
Database Buffers 310378496 bytes
Redo Buffers 2973696 bytes
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
[oracle@rac2 ~]$ . oraenv
ORACLE_SID = [clone] ?
[oracle@rac2 ~]$ rman target=sys/oracle@cdbs auxiliary=/

Recovery Manager: Release 10.2.0.1.0 - Production on Thu Jul 29 14:30:26 2010

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

connected to target database: CDBS (DBID=3126697048)
connected to auxiliary database: CLONE (not mounted)

RMAN> RUN
2> {
3> SET UNTIL SEQUENCE 11 THREAD 1;
4> DUPLICATE TARGET DATABASE TO "clone" NOFILENAMECHECK;
5> }

executing command: SET until clause
using target database control file instead of recovery catalog

Starting Duplicate Db at 29-JUL-10
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=153 devtype=DISK

contents of Memory Script:
{
set until scn 487077;
set newname for datafile 1 to
"/u01/app/oracle/oradata/clone/system01.dbf";
set newname for datafile 2 to
"/u01/app/oracle/oradata/clone/undotbs01.dbf";
set newname for datafile 3 to
"/u01/app/oracle/oradata/clone/sysaux01.dbf";
set newname for datafile 4 to
"/u01/app/oracle/oradata/clone/users01.dbf";
restore
check readonly
clone database
;
}
executing Memory Script

executing command: SET until clause

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 29-JUL-10
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backupset restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/app/oracle/oradata/clone/system01.dbf
restoring datafile 00002 to /u01/app/oracle/oradata/clone/undotbs01.dbf
restoring datafile 00003 to /u01/app/oracle/oradata/clone/sysaux01.dbf
restoring datafile 00004 to /u01/app/oracle/oradata/clone/users01.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/backup/CDBS_02ljuklm_1_1.bckp
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/u01/app/oracle/backup/CDBS_02ljuklm_1_1.bckp tag=TAG20100728T191707
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:38
Finished restore at 29-JUL-10
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "CLONE" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 ( '/u01/app/oracle/oradata/clone/redo01.log' ) SIZE 50 M REUSE,
GROUP 2 ( '/u01/app/oracle/oradata/clone/redo02.log' ) SIZE 50 M REUSE,
GROUP 3 ( '/u01/app/oracle/oradata/clone/redo03.log' ) SIZE 50 M REUSE
DATAFILE
'/u01/app/oracle/oradata/clone/system01.dbf'
CHARACTER SET WE8ISO8859P1


contents of Memory Script:
{
switch clone datafile all;
}
executing Memory Script

released channel: ORA_AUX_DISK_1
datafile 2 switched to datafile copy
input datafile copy recid=1 stamp=725639677 filename=/u01/app/oracle/oradata/clone/undotbs01.dbf
datafile 3 switched to datafile copy
input datafile copy recid=2 stamp=725639677 filename=/u01/app/oracle/oradata/clone/sysaux01.dbf
datafile 4 switched to datafile copy
input datafile copy recid=3 stamp=725639678 filename=/u01/app/oracle/oradata/clone/users01.dbf

contents of Memory Script:
{
set until scn 487077;
recover
clone database
delete archivelog
;
}
executing Memory Script

executing command: SET until clause

Starting recover at 29-JUL-10
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=153 devtype=DISK

starting media recovery

channel ORA_AUX_DISK_1: starting archive log restore to default destination
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=6
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=7
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=8
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=9
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=10
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/backup/07ljv2pt_1_1
ORA-19870: error reading backup piece /u01/app/oracle/backup/07ljv2pt_1_1
ORA-19505: failed to identify file "/u01/app/oracle/backup/07ljv2pt_1_1"
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
channel ORA_AUX_DISK_1: starting archive log restore to default destination
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=6
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=7
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=8
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=9
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=10
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/backup/06ljul8o_1_1
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/u01/app/oracle/backup/06ljul8o_1_1 tag=TAG20100728T192719
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:06
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_6_725548321.dbf thread=1 sequence=6
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_6_725548321.dbf recid=2 stamp=725639705
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_7_725548321.dbf thread=1 sequence=7
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_7_725548321.dbf recid=5 stamp=725639705
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_8_725548321.dbf thread=1 sequence=8
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_8_725548321.dbf recid=1 stamp=725639705
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_9_725548321.dbf thread=1 sequence=9
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_9_725548321.dbf recid=4 stamp=725639705
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_10_725548321.dbf thread=1 sequence=10
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_10_725548321.dbf recid=3 stamp=725639705
media recovery complete, elapsed time: 00:00:07
Finished recover at 29-JUL-10

contents of Memory Script:
{
shutdown clone;
startup clone nomount ;
}
executing Memory Script

database dismounted
Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area 444596224 bytes

Fixed Size 1219904 bytes
Variable Size 130024128 bytes
Database Buffers 310378496 bytes
Redo Buffers 2973696 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "CLONE" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 ( '/u01/app/oracle/oradata/clone/redo01.log' ) SIZE 50 M REUSE,
GROUP 2 ( '/u01/app/oracle/oradata/clone/redo02.log' ) SIZE 50 M REUSE,
GROUP 3 ( '/u01/app/oracle/oradata/clone/redo03.log' ) SIZE 50 M REUSE
DATAFILE
'/u01/app/oracle/oradata/clone/system01.dbf'
CHARACTER SET WE8ISO8859P1


contents of Memory Script:
{
set newname for tempfile 1 to
"/u01/app/oracle/oradata/clone/temp01.dbf";
switch clone tempfile all;
catalog clone datafilecopy "/u01/app/oracle/oradata/clone/undotbs01.dbf";
catalog clone datafilecopy "/u01/app/oracle/oradata/clone/sysaux01.dbf";
catalog clone datafilecopy "/u01/app/oracle/oradata/clone/users01.dbf";
switch clone datafile all;
}
executing Memory Script

executing command: SET NEWNAME

renamed temporary file 1 to /u01/app/oracle/oradata/clone/temp01.dbf in control file

cataloged datafile copy
datafile copy filename=/u01/app/oracle/oradata/clone/undotbs01.dbf recid=1 stamp=725639761

cataloged datafile copy
datafile copy filename=/u01/app/oracle/oradata/clone/sysaux01.dbf recid=2 stamp=725639762

cataloged datafile copy
datafile copy filename=/u01/app/oracle/oradata/clone/users01.dbf recid=3 stamp=725639763

datafile 2 switched to datafile copy
input datafile copy recid=1 stamp=725639761 filename=/u01/app/oracle/oradata/clone/undotbs01.dbf
datafile 3 switched to datafile copy
input datafile copy recid=2 stamp=725639762 filename=/u01/app/oracle/oradata/clone/sysaux01.dbf
datafile 4 switched to datafile copy
input datafile copy recid=3 stamp=725639763 filename=/u01/app/oracle/oradata/clone/users01.dbf

contents of Memory Script:
{
Alter clone database open resetlogs;
}
executing Memory Script

database opened
Finished Duplicate Db at 29-JUL-10

RMAN>


3. export the table from test database


[oracle@rac2 clone]$ . oraenv
ORACLE_SID = [oracle] ? clone
[oracle@rac2 clone]$ exp rajesh/rajesh file=/u01/app/oracle/test_rcv.dmp tables=test rows=y

Export: Release 10.2.0.1.0 - Production on Thu Jul 29 15:07:22 2010

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


Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses WE8ISO8859P1 character set (possible charset conversion)

About to export specified tables via Conventional Path ...
. . exporting table TEST 4 rows exported
Export terminated successfully without warnings.


[oracle@rac2 oracle]$ ls
admin backup oradata oraInventory product test_rcv.dmp
[oracle@rac2 oracle]$ scp test_rcv.dmp oracle@rac1:/u01/app/oracle/
test_rcv.dmp 100% 16KB 16.0KB/s 00:00
[oracle@rac2 oracle]$


4. Import the table into the production database and verify the table.


[oracle@rac1 ~]$ imp rajesh/rajesh file=/u01/app/oracle/test_rcv.dmp fromuser=rajesh touser=rajesh tables=test

Import: Release 10.2.0.1.0 - Production on Thu Jul 29 15:11:54 2010

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


Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options

Export file created by EXPORT:V10.02.01 via conventional path
import done in US7ASCII character set and AL16UTF16 NCHAR character set
import server uses WE8ISO8859P1 character set (possible charset conversion)
. importing RAJESH's objects into RAJESH
. . importing table "TEST" 4 rows imported
Import terminated successfully without warnings.
[oracle@rac1 ~]$

SQL> conn rajesh/rajesh;
Connected.
SQL> select * from tab;

TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
SAMPLE TABLE
TEST TABLE

SQL> select * from test;

ID
----------
100
100
100
100

SQL>

table is recovered.


DONE !

hope, this helps you.

Database Duplication Fails due to insufficient backup archive logs

RMAN-03002: failure of Duplicate Db command at 07/29/2010 13:13:33
RMAN-03015: error occurred in stored script Memory Script
RMAN-20506: no backup of archivelog found
RMAN-06053: unable to perform media recovery because of missing log
RMAN-06025: no backup of log thread 1 seq 16 lowscn 500574 found to restore
RMAN-06025: no backup of log thread 1 seq 15 lowscn 500571 found to restore
RMAN-06025: no backup of log thread 1 seq 14 lowscn 500569 found to restore
RMAN-06025: no backup of log thread 1 seq 13 lowscn 487274 found to restore
RMAN-06025: no backup of log thread 1 seq 12 lowscn 487272 found to restore
RMAN-06025: no backup of log thread 1 seq 11 lowscn 487077 found to restore

Reason for this problem:
the backup is not sufficient to complete the duplicate command, its an old backup.
more log files are needed to complete.

solution :

if there is no more backup available, use until clause in RMAN script.
eg:

RMAN> RUN
2> {
3> SET UNTIL SEQUENCE 11 THREAD 1;--recovers upto available log sequence 11 but not including log 11.
4> DUPLICATE TARGET DATABASE TO "clone" NOFILENAMECHECK;
5> }

sample example:


[oracle@rac2 ~]$ . oraenv
ORACLE_SID = [oracle] ? clone
[oracle@rac2 ~]$ sqlplus '/as sysdba'

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jul 29 12:54:45 2010

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

Connected to an idle instance.

SQL> startup nomount
ORACLE instance started.

Total System Global Area 444596224 bytes
Fixed Size 1219904 bytes
Variable Size 130024128 bytes
Database Buffers 310378496 bytes
Redo Buffers 2973696 bytes
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
[oracle@rac2 ~]$ . oraenv
ORACLE_SID = [clone] ? clone
[oracle@rac2 ~]$ rman target=sys/oracle@cdbs auxiliary=/

Recovery Manager: Release 10.2.0.1.0 - Production on Thu Jul 29 12:55:56 2010

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

connected to target database: CDBS (DBID=3126697048)
connected to auxiliary database: CLONE (not mounted)

RMAN> DUPLICATE TARGET DATABASE TO "clone" nofilenamecheck;

Starting Duplicate Db at 29-JUL-10
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=153 devtype=DISK

contents of Memory Script:
{
set until scn 500597;
set newname for datafile 1 to
"/u01/app/oracle/oradata/clone/system01.dbf";
set newname for datafile 2 to
"/u01/app/oracle/oradata/clone/undotbs01.dbf";
set newname for datafile 3 to
"/u01/app/oracle/oradata/clone/sysaux01.dbf";
set newname for datafile 4 to
"/u01/app/oracle/oradata/clone/users01.dbf";
restore
check readonly
clone database
;
}
executing Memory Script

executing command: SET until clause

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 29-JUL-10
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backupset restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/app/oracle/oradata/clone/system01.dbf
restoring datafile 00002 to /u01/app/oracle/oradata/clone/undotbs01.dbf
restoring datafile 00003 to /u01/app/oracle/oradata/clone/sysaux01.dbf
restoring datafile 00004 to /u01/app/oracle/oradata/clone/users01.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/backup/CDBS_02ljuklm_1_1.bckp
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/u01/app/oracle/backup/CDBS_02ljuklm_1_1.bckp tag=TAG20100728T191707
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:47
Finished restore at 29-JUL-10
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "CLONE" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 ( '/u01/app/oracle/oradata/clone/redo01.log' ) SIZE 50 M REUSE,
GROUP 2 ( '/u01/app/oracle/oradata/clone/redo02.log' ) SIZE 50 M REUSE,
GROUP 3 ( '/u01/app/oracle/oradata/clone/redo03.log' ) SIZE 50 M REUSE
DATAFILE
'/u01/app/oracle/oradata/clone/system01.dbf'
CHARACTER SET WE8ISO8859P1


contents of Memory Script:
{
switch clone datafile all;
}
executing Memory Script

released channel: ORA_AUX_DISK_1
datafile 2 switched to datafile copy
input datafile copy recid=1 stamp=725634775 filename=/u01/app/oracle/oradata/clone/undotbs01.dbf
datafile 3 switched to datafile copy
input datafile copy recid=2 stamp=725634776 filename=/u01/app/oracle/oradata/clone/sysaux01.dbf
datafile 4 switched to datafile copy
input datafile copy recid=3 stamp=725634776 filename=/u01/app/oracle/oradata/clone/users01.dbf

contents of Memory Script:
{
set until scn 500597;
recover
clone database
delete archivelog
;
}
executing Memory Script

executing command: SET until clause

Starting recover at 29-JUL-10
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=153 devtype=DISK

starting media recovery

channel ORA_AUX_DISK_1: starting archive log restore to default destination
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=6
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=7
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=8
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=9
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=10
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=11
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=12
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=13
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=14
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=15
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=16
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/backup/07ljv2pt_1_1
ORA-19870: error reading backup piece /u01/app/oracle/backup/07ljv2pt_1_1
ORA-19505: failed to identify file "/u01/app/oracle/backup/07ljv2pt_1_1"
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 07/29/2010 13:13:33
RMAN-03015: error occurred in stored script Memory Script
RMAN-20506: no backup of archivelog found
RMAN-06053: unable to perform media recovery because of missing log
RMAN-06025: no backup of log thread 1 seq 16 lowscn 500574 found to restore
RMAN-06025: no backup of log thread 1 seq 15 lowscn 500571 found to restore
RMAN-06025: no backup of log thread 1 seq 14 lowscn 500569 found to restore
RMAN-06025: no backup of log thread 1 seq 13 lowscn 487274 found to restore
RMAN-06025: no backup of log thread 1 seq 12 lowscn 487272 found to restore
RMAN-06025: no backup of log thread 1 seq 11 lowscn 487077 found to restore

RMAN>

SQL> shut abort
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
[oracle@rac2 ~]$ . oraenv
ORACLE_SID = [clone] ?
[oracle@rac2 ~]$ sqlplus '/as sysdba'

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jul 29 14:29:43 2010

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

Connected to an idle instance.

SQL> startup nomount
ORACLE instance started.

Total System Global Area 444596224 bytes
Fixed Size 1219904 bytes
Variable Size 130024128 bytes
Database Buffers 310378496 bytes
Redo Buffers 2973696 bytes
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
[oracle@rac2 ~]$ . oraenv
ORACLE_SID = [clone] ?
[oracle@rac2 ~]$ rman target=sys/oracle@cdbs auxiliary=/

Recovery Manager: Release 10.2.0.1.0 - Production on Thu Jul 29 14:30:26 2010

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

connected to target database: CDBS (DBID=3126697048)
connected to auxiliary database: CLONE (not mounted)

RMAN> RUN
2> {
3> SET UNTIL SEQUENCE 11 THREAD 1;
4> DUPLICATE TARGET DATABASE TO "clone" NOFILENAMECHECK;
5> }

executing command: SET until clause
using target database control file instead of recovery catalog

Starting Duplicate Db at 29-JUL-10
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=153 devtype=DISK

contents of Memory Script:
{
set until scn 487077;
set newname for datafile 1 to
"/u01/app/oracle/oradata/clone/system01.dbf";
set newname for datafile 2 to
"/u01/app/oracle/oradata/clone/undotbs01.dbf";
set newname for datafile 3 to
"/u01/app/oracle/oradata/clone/sysaux01.dbf";
set newname for datafile 4 to
"/u01/app/oracle/oradata/clone/users01.dbf";
restore
check readonly
clone database
;
}
executing Memory Script

executing command: SET until clause

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 29-JUL-10
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backupset restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/app/oracle/oradata/clone/system01.dbf
restoring datafile 00002 to /u01/app/oracle/oradata/clone/undotbs01.dbf
restoring datafile 00003 to /u01/app/oracle/oradata/clone/sysaux01.dbf
restoring datafile 00004 to /u01/app/oracle/oradata/clone/users01.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/backup/CDBS_02ljuklm_1_1.bckp
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/u01/app/oracle/backup/CDBS_02ljuklm_1_1.bckp tag=TAG20100728T191707
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:38
Finished restore at 29-JUL-10
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "CLONE" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 ( '/u01/app/oracle/oradata/clone/redo01.log' ) SIZE 50 M REUSE,
GROUP 2 ( '/u01/app/oracle/oradata/clone/redo02.log' ) SIZE 50 M REUSE,
GROUP 3 ( '/u01/app/oracle/oradata/clone/redo03.log' ) SIZE 50 M REUSE
DATAFILE
'/u01/app/oracle/oradata/clone/system01.dbf'
CHARACTER SET WE8ISO8859P1


contents of Memory Script:
{
switch clone datafile all;
}
executing Memory Script

released channel: ORA_AUX_DISK_1
datafile 2 switched to datafile copy
input datafile copy recid=1 stamp=725639677 filename=/u01/app/oracle/oradata/clone/undotbs01.dbf
datafile 3 switched to datafile copy
input datafile copy recid=2 stamp=725639677 filename=/u01/app/oracle/oradata/clone/sysaux01.dbf
datafile 4 switched to datafile copy
input datafile copy recid=3 stamp=725639678 filename=/u01/app/oracle/oradata/clone/users01.dbf

contents of Memory Script:
{
set until scn 487077;
recover
clone database
delete archivelog
;
}
executing Memory Script

executing command: SET until clause

Starting recover at 29-JUL-10
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=153 devtype=DISK

starting media recovery

channel ORA_AUX_DISK_1: starting archive log restore to default destination
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=6
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=7
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=8
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=9
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=10
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/backup/07ljv2pt_1_1
ORA-19870: error reading backup piece /u01/app/oracle/backup/07ljv2pt_1_1
ORA-19505: failed to identify file "/u01/app/oracle/backup/07ljv2pt_1_1"
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
channel ORA_AUX_DISK_1: starting archive log restore to default destination
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=6
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=7
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=8
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=9
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=10
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/backup/06ljul8o_1_1
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/u01/app/oracle/backup/06ljul8o_1_1 tag=TAG20100728T192719
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:06
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_6_725548321.dbf thread=1 sequence=6
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_6_725548321.dbf recid=2 stamp=725639705
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_7_725548321.dbf thread=1 sequence=7
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_7_725548321.dbf recid=5 stamp=725639705
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_8_725548321.dbf thread=1 sequence=8
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_8_725548321.dbf recid=1 stamp=725639705
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_9_725548321.dbf thread=1 sequence=9
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_9_725548321.dbf recid=4 stamp=725639705
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_10_725548321.dbf thread=1 sequence=10
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_10_725548321.dbf recid=3 stamp=725639705
media recovery complete, elapsed time: 00:00:07
Finished recover at 29-JUL-10

contents of Memory Script:
{
shutdown clone;
startup clone nomount ;
}
executing Memory Script

database dismounted
Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area 444596224 bytes

Fixed Size 1219904 bytes
Variable Size 130024128 bytes
Database Buffers 310378496 bytes
Redo Buffers 2973696 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "CLONE" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 ( '/u01/app/oracle/oradata/clone/redo01.log' ) SIZE 50 M REUSE,
GROUP 2 ( '/u01/app/oracle/oradata/clone/redo02.log' ) SIZE 50 M REUSE,
GROUP 3 ( '/u01/app/oracle/oradata/clone/redo03.log' ) SIZE 50 M REUSE
DATAFILE
'/u01/app/oracle/oradata/clone/system01.dbf'
CHARACTER SET WE8ISO8859P1


contents of Memory Script:
{
set newname for tempfile 1 to
"/u01/app/oracle/oradata/clone/temp01.dbf";
switch clone tempfile all;
catalog clone datafilecopy "/u01/app/oracle/oradata/clone/undotbs01.dbf";
catalog clone datafilecopy "/u01/app/oracle/oradata/clone/sysaux01.dbf";
catalog clone datafilecopy "/u01/app/oracle/oradata/clone/users01.dbf";
switch clone datafile all;
}
executing Memory Script

executing command: SET NEWNAME

renamed temporary file 1 to /u01/app/oracle/oradata/clone/temp01.dbf in control file

cataloged datafile copy
datafile copy filename=/u01/app/oracle/oradata/clone/undotbs01.dbf recid=1 stamp=725639761

cataloged datafile copy
datafile copy filename=/u01/app/oracle/oradata/clone/sysaux01.dbf recid=2 stamp=725639762

cataloged datafile copy
datafile copy filename=/u01/app/oracle/oradata/clone/users01.dbf recid=3 stamp=725639763

datafile 2 switched to datafile copy
input datafile copy recid=1 stamp=725639761 filename=/u01/app/oracle/oradata/clone/undotbs01.dbf
datafile 3 switched to datafile copy
input datafile copy recid=2 stamp=725639762 filename=/u01/app/oracle/oradata/clone/sysaux01.dbf
datafile 4 switched to datafile copy
input datafile copy recid=3 stamp=725639763 filename=/u01/app/oracle/oradata/clone/users01.dbf

contents of Memory Script:
{
Alter clone database open resetlogs;
}
executing Memory Script

database opened
Finished Duplicate Db at 29-JUL-10

RMAN>

setting listener password

In Oracle 10g and above, the listener is secured by default, and only user who started the listener can run the commands.

In order to set password on listener, follow the steps:

1) LSNRCTL> set current_listener
2) LSNRCTL> change_password
Old password:
New password: yourpassword
Reenter new password: yourpassword
3) LSNRCTL> save_config
4) LSNRCTL> status

STATUS output will now show:
Security ON: Password or Local OS Authentication

Example:



[oracle@rac1 ~]$ lsnrctl

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 29-JUL-2010 12:44:18

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

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> change_password
Old password:
New password:
Reenter new password:
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
LSNRCTL> start
Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac1.localdomain)(PORT=1521)))

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 29-JUL-2010 12:44:59
Uptime 0 days 0 hr. 0 min. 1 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac1.localdomain)(PORT=1521)))
The listener supports no services
The command completed successfully
LSNRCTL> set current_listener LISTENER
Current Listener is LISTENER
LSNRCTL> change_password
Old password:
New password:
Reenter new password:
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
Password changed for LISTENER
The command completed successfully
LSNRCTL> save_config
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
Saved LISTENER configuration parameters.
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Old Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.bak
The command completed successfully
LSNRCTL> status
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 29-JUL-2010 12:44:59
Uptime 0 days 0 hr. 0 min. 50 sec
Trace Level off
Security ON: Password or Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac1.localdomain)(PORT=1521)))
Services Summary...
Service "cdbs" has 1 instance(s).
Instance "cdbs", status READY, has 1 handler(s) for this service...
Service "cdbsXDB" has 1 instance(s).
Instance "cdbs", status READY, has 1 handler(s) for this service...
Service "cdbs_XPT" has 1 instance(s).
Instance "cdbs", status READY, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL>


As the another user, enter the password to administer the listener:

1) LSNRCTL> set password
Password: yourpassword
2) LSNRCTL> stop

answered by fahad mirza in OTN forum

Wednesday, July 28, 2010

RMAN-03002: failure of Duplicate Db command RMAN-03015: error occurred in stored script Memory Script RMAN-06053: RMAN-06025

Problem:

RMAN-03002: failure of Duplicate Db command at 07/28/2010 23:11:44
RMAN-03015: error occurred in stored script Memory Script
RMAN-06053: unable to perform media recovery because of missing log
RMAN-06025: no backup of log thread 1 seq 12 lowscn 487272 found to restore
RMAN-06025: no backup of log thread 1 seq 11 lowscn 487077 found to restore


cause:
RMAN unable to start archive log restore to default destination

solution:
with duplicate command add nofilenamecheck
DUPLICATE TARGET DATABASE TO "clone" NOFILENAMECHECK;

example:
RMAN> DUPLICATE TARGET DATABASE TO "clone";



Starting Duplicate Db at 28-JUL-10
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=153 devtype=DISK

contents of Memory Script:
{
set until scn 487274;
set newname for datafile 1 to
"/u01/app/oracle/oradata/clone/system01.dbf";
set newname for datafile 2 to
"/u01/app/oracle/oradata/clone/undotbs01.dbf";
set newname for datafile 3 to
"/u01/app/oracle/oradata/clone/sysaux01.dbf";
set newname for datafile 4 to
"/u01/app/oracle/oradata/clone/users01.dbf";
restore
check readonly
clone database
;
}
executing Memory Script

executing command: SET until clause

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 28-JUL-10
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backupset restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/app/oracle/oradata/clone/system01.dbf
restoring datafile 00002 to /u01/app/oracle/oradata/clone/undotbs01.dbf
restoring datafile 00003 to /u01/app/oracle/oradata/clone/sysaux01.dbf
restoring datafile 00004 to /u01/app/oracle/oradata/clone/users01.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/backup/CDBS_02ljuklm_1_1.bckp
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/u01/app/oracle/backup/CDBS_02ljuklm_1_1.bckp tag=TAG20100728T191707
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:48
Finished restore at 28-JUL-10
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "CLONE" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 ( '/u01/app/oracle/oradata/clone/redo01.log' ) SIZE 50 M REUSE,
GROUP 2 ( '/u01/app/oracle/oradata/clone/redo02.log' ) SIZE 50 M REUSE,
GROUP 3 ( '/u01/app/oracle/oradata/clone/redo03.log' ) SIZE 50 M REUSE
DATAFILE
'/u01/app/oracle/oradata/clone/system01.dbf'
CHARACTER SET WE8ISO8859P1


contents of Memory Script:
{
switch clone datafile all;
}
executing Memory Script

released channel: ORA_AUX_DISK_1
datafile 2 switched to datafile copy
input datafile copy recid=1 stamp=725584280 filename=/u01/app/oracle/oradata/clone/undotbs01.dbf
datafile 3 switched to datafile copy
input datafile copy recid=2 stamp=725584281 filename=/u01/app/oracle/oradata/clone/sysaux01.dbf
datafile 4 switched to datafile copy
input datafile copy recid=3 stamp=725584281 filename=/u01/app/oracle/oradata/clone/users01.dbf

contents of Memory Script:
{
set until scn 487274;
recover
clone database
delete archivelog
;
}
executing Memory Script

executing command: SET until clause

Starting recover at 28-JUL-10
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=153 devtype=DISK

starting media recovery

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 07/28/2010 23:11:44
RMAN-03015: error occurred in stored script Memory Script
RMAN-06053: unable to perform media recovery because of missing log
RMAN-06025: no backup of log thread 1 seq 12 lowscn 487272 found to restore
RMAN-06025: no backup of log thread 1 seq 11 lowscn 487077 found to restore



SOLUTION:

ADD NOFILENAMECHECK WITH DUPLICATE COMMAND

Example: DUPLICATE TARGET DATABASE TO "clone" NOFILENAMECHECK;


[oracle@rac2 clone]$ . oraenv
ORACLE_SID = [clone] ?
[oracle@rac2 clone]$ sqlplus '/as sysdba'

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jul 28 23:16:23 2010

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

Connected to an idle instance.

SQL> startup nomount
ORACLE instance started.

Total System Global Area 444596224 bytes
Fixed Size 1219904 bytes
Variable Size 130024128 bytes
Database Buffers 310378496 bytes
Redo Buffers 2973696 bytes
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options



[oracle@rac2 clone]$ . oraenv
ORACLE_SID = [clone] ?
[oracle@rac2 clone]$ rman target=sys/oracle@cdbs auxiliary=/

Recovery Manager: Release 10.2.0.1.0 - Production on Wed Jul 28 23:20:00 2010

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

connected to target database: CDBS (DBID=3126697048)
connected to auxiliary database: CLONE (not mounted)

RMAN> DUPLICATE TARGET DATABASE TO "clone" NOFILENAMECHECK;

Starting Duplicate Db at 28-JUL-10
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=153 devtype=DISK

contents of Memory Script:
{
set until scn 500597;
set newname for datafile 1 to
"/u01/app/oracle/oradata/clone/system01.dbf";
set newname for datafile 2 to
"/u01/app/oracle/oradata/clone/undotbs01.dbf";
set newname for datafile 3 to
"/u01/app/oracle/oradata/clone/sysaux01.dbf";
set newname for datafile 4 to
"/u01/app/oracle/oradata/clone/users01.dbf";
restore
check readonly
clone database
;
}
executing Memory Script

executing command: SET until clause

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 28-JUL-10
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backupset restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/app/oracle/oradata/clone/system01.dbf
restoring datafile 00002 to /u01/app/oracle/oradata/clone/undotbs01.dbf
restoring datafile 00003 to /u01/app/oracle/oradata/clone/sysaux01.dbf
restoring datafile 00004 to /u01/app/oracle/oradata/clone/users01.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/backup/CDBS_02ljuklm_1_1.bckp
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/u01/app/oracle/backup/CDBS_02ljuklm_1_1.bckp tag=TAG20100728T191707
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:08
Finished restore at 28-JUL-10
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "CLONE" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 ( '/u01/app/oracle/oradata/clone/redo01.log' ) SIZE 50 M REUSE,
GROUP 2 ( '/u01/app/oracle/oradata/clone/redo02.log' ) SIZE 50 M REUSE,
GROUP 3 ( '/u01/app/oracle/oradata/clone/redo03.log' ) SIZE 50 M REUSE
DATAFILE
'/u01/app/oracle/oradata/clone/system01.dbf'
CHARACTER SET WE8ISO8859P1


contents of Memory Script:
{
switch clone datafile all;
}
executing Memory Script

released channel: ORA_AUX_DISK_1
datafile 2 switched to datafile copy
input datafile copy recid=1 stamp=725584943 filename=/u01/app/oracle/oradata/clone/undotbs01.dbf
datafile 3 switched to datafile copy
input datafile copy recid=2 stamp=725584943 filename=/u01/app/oracle/oradata/clone/sysaux01.dbf
datafile 4 switched to datafile copy
input datafile copy recid=3 stamp=725584944 filename=/u01/app/oracle/oradata/clone/users01.dbf

contents of Memory Script:
{
set until scn 500597;
recover
clone database
delete archivelog
;
}
executing Memory Script

executing command: SET until clause

Starting recover at 28-JUL-10
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=153 devtype=DISK

starting media recovery

channel ORA_AUX_DISK_1: starting archive log restore to default destination
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=6
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=7
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=8
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=9
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=10
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=11
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=12
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=13
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=14
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=15
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=16
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/backup/07ljv2pt_1_1
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/u01/app/oracle/backup/07ljv2pt_1_1 tag=TAG20100728T231809
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:20
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_6_725548321.dbf thread=1 sequence=6
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_6_725548321.dbf recid=3 stamp=725584964
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_7_725548321.dbf thread=1 sequence=7
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_7_725548321.dbf recid=5 stamp=725584964
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_8_725548321.dbf thread=1 sequence=8
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_8_725548321.dbf recid=1 stamp=725584963
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_9_725548321.dbf thread=1 sequence=9
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_9_725548321.dbf recid=9 stamp=725584964
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_10_725548321.dbf thread=1 sequence=10
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_10_725548321.dbf recid=6 stamp=725584964
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_11_725548321.dbf thread=1 sequence=11
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_11_725548321.dbf recid=2 stamp=725584964
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_12_725548321.dbf thread=1 sequence=12
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_12_725548321.dbf recid=10 stamp=725584964
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_13_725548321.dbf thread=1 sequence=13
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_13_725548321.dbf recid=11 stamp=725584970
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_14_725548321.dbf thread=1 sequence=14
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_14_725548321.dbf recid=7 stamp=725584964
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_15_725548321.dbf thread=1 sequence=15
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_15_725548321.dbf recid=8 stamp=725584964
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_16_725548321.dbf thread=1 sequence=16
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_16_725548321.dbf recid=4 stamp=725584964
media recovery complete, elapsed time: 00:00:49
Finished recover at 28-JUL-10

contents of Memory Script:
{
shutdown clone;
startup clone nomount ;
}
executing Memory Script

^Adatabase dismounted
Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area 444596224 bytes

Fixed Size 1219904 bytes
Variable Size 130024128 bytes
Database Buffers 310378496 bytes
Redo Buffers 2973696 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "CLONE" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 ( '/u01/app/oracle/oradata/clone/redo01.log' ) SIZE 50 M REUSE,
GROUP 2 ( '/u01/app/oracle/oradata/clone/redo02.log' ) SIZE 50 M REUSE,
GROUP 3 ( '/u01/app/oracle/oradata/clone/redo03.log' ) SIZE 50 M REUSE
DATAFILE
'/u01/app/oracle/oradata/clone/system01.dbf'
CHARACTER SET WE8ISO8859P1


contents of Memory Script:
{
set newname for tempfile 1 to
"/u01/app/oracle/oradata/clone/temp01.dbf";
switch clone tempfile all;
catalog clone datafilecopy "/u01/app/oracle/oradata/clone/undotbs01.dbf";
catalog clone datafilecopy "/u01/app/oracle/oradata/clone/sysaux01.dbf";
catalog clone datafilecopy "/u01/app/oracle/oradata/clone/users01.dbf";
switch clone datafile all;
}
executing Memory Script

executing command: SET NEWNAME

renamed temporary file 1 to /u01/app/oracle/oradata/clone/temp01.dbf in control file

cataloged datafile copy
datafile copy filename=/u01/app/oracle/oradata/clone/undotbs01.dbf recid=1 stamp=725585099

cataloged datafile copy
datafile copy filename=/u01/app/oracle/oradata/clone/sysaux01.dbf recid=2 stamp=725585101

cataloged datafile copy
datafile copy filename=/u01/app/oracle/oradata/clone/users01.dbf recid=3 stamp=725585102

datafile 2 switched to datafile copy
input datafile copy recid=1 stamp=725585099 filename=/u01/app/oracle/oradata/clone/undotbs01.dbf
datafile 3 switched to datafile copy
input datafile copy recid=2 stamp=725585101 filename=/u01/app/oracle/oradata/clone/sysaux01.dbf
datafile 4 switched to datafile copy
input datafile copy recid=3 stamp=725585102 filename=/u01/app/oracle/oradata/clone/users01.dbf

contents of Memory Script:
{
Alter clone database open resetlogs;
}
executing Memory Script

database opened
Finished Duplicate Db at 28-JUL-10



hope, this may helps you.

Tuesday, July 27, 2010

Converting Single instance to RAC instance Database Using DBCA

There are different ways to convert a single instance database to RAC.
1) Manual Method
3) Using DBCA
In this post we will see step by step method to convert a single instance database to RAC Using DBCA(Database Configuration Assitant).

In this example, I already configured two node oracle asm, clusterware homes. also i already  converted the file system from non-asm to asm 
For converting filesystem to ASM click the link above.

follow steps for creating a template to convert a single instance to rac instance.

[oracle@rac1 ~]$ dbca &
 
Screen Name Response
Welcome Screen Select Single Instance database.
Operations Select Manage Templates.
Template management operation Select From an existing database(structure as well as data).
Choose the database Select Database instance: testing
Specify the name and description example: testing and description testing_database_convert_from_single_to_rac_instance_database
specify whether you want to convert
all database
 related file locations to OFA,
or You want to main the file
locations in the template.
Select Maintain the file locations.  and click FINISH.
The following operations
will be performed:
create a clone template from
the source database.
click ok
Do you want to perform
another operation
Click No to EXIT


Templates for existing single instance database has been created.

Go to $ORACLE_HOME/assistants/dbca/templates and check generated backup of single instance.

[oracle@rac1 templates]$ pwd
/u01/app/oracle/product/10.2.0/db_1/assistants/dbca/templates
[oracle@rac1 templates]$ ls -ltr
total 213584
-rw-r-----  1 oracle oinstall    12050 May 16  2005 New_Database.dbt
-rw-r-----  1 oracle oinstall     5728 Jun 30  2005 Data_Warehouse.dbc
-rw-r-----  1 oracle oinstall     5665 Jun 30  2005 Transaction_Processing.dbc
-rw-r-----  1 oracle oinstall     5608 Jun 30  2005 General_Purpose.dbc
-rwxr-xr-x  1 oracle oinstall  7061504 Jul  2  2005 Seed_Database.ctl
-rwxr-xr-x  1 oracle oinstall 93569024 Jul  2  2005 Seed_Database.dfb
-rwxr-xr-x  1 oracle oinstall   991232 Jul  2  2005 example.dmp
-rwxr-xr-x  1 oracle oinstall 13017088 Jul  2  2005 example01.dfb
-rw-r-----  1 oracle oinstall 96714752 Jul 27 13:47 testing.dfb
-rw-r-----  1 oracle oinstall  7061504 Jul 27 13:47 testing.ctl
-rw-r-----  1 oracle oinstall     5349 Jul 27 13:49 testing.dbc

Copy the pre-configured database image from rac1 machine $ORACLE_HOME/assistants/ dbca/ templates/ testing.dbf & testing.dbc    to  host rac2 environment  $ORACLE_HOME/assistants/dbca/templates/ folder

[oracle@rac1 templates]$ scp testing.dfb oracle@rac2:/u01/app/oracle/product/10.2.0/db_1/assistants/dbca/templates/
testing.dfb                                   100%   92MB   2.5MB/s   00:37
[oracle@rac1 templates]$ scp testing.dbc oracle@rac2:/u01/app/oracle/product/10.2.0/db_1/assistants/dbca/templates/
testing.dbc                                   100% 5349     5.2KB/s   00:00
[oracle@rac1 templates]$ scp testing.ctl oracle@rac2:/u01/app/oracle/product/10.2.0/db_1/assistants/dbca/templates/
testing.ctl                                   100% 6896KB   2.2MB/s   00:03
[oracle@rac2 templates]$ pwd
/u01/app/oracle/product/10.2.0/db_1/assistants/dbca/templates
[oracle@rac2 templates]$ ls -ltr
-rw-r-----  1 oracle oinstall 96714752 Jul 27 14:24 testing.dfb
-rw-r-----  1 oracle oinstall     5349 Jul 27 14:26 testing.dbc
-rw-r-----  1 oracle oinstall  7061504 Jul 27 14:26 testing.ctl
Start the dbca to convert the single instance to rac single database.
[oracle@rac2 templates]$ dbca &

Screen Name Response
Welcome to the Database
configuration assitant
Select Oracle Real Application Database
Select the operation select : create a database
Select the nodes on which you
want to create the cluster
database
Select select all.
Select a template from the
following list to create
the database:
Select the template: testing(template name created by you)
  
Select the
Global database name
and SID:
  Type name as you want, eg: raj.
Each oracle database may be managed
centrally using the Oracle Enterprise
Manager Grid Control or locally using
the Enterprise Manager Database Control.
Choose the management option that you
would like to use to manage this
database.

   Select:  configure the database with enterprise manager
   
For security reasons, you must specify
password for the following user
accounts in the new database.
select: Use the same password for ALL accounts password: yourpassword confirm password: yourpassword
Select the Listeners
Select:Register this database with all listeners
Select the storage mechanism
Select: Automatic Storage Management(ASM)
select the disk groups to be used as
storage for the database.

Select the disk group names: eg: DATA
Specify locations for the database
files to be created.

Select:  use Oracle-Managed Files
Choose the recovery options
uncheck all
Custom Scripts
Select: No scripts to run
Oracle Database Services Details
Click: Next
Initialization Parameters
Click: Next
Database storage
Click: Next
creation options
click: Finish

[oracle@rac2 templates]$ vi /etc/oratab
edit the oratab file for instances raj as raj1 and raj2 on both nodes
[oracle@rac2 templates]$ . oraenv
ORACLE_SID = [oracle] ? raj2
[oracle@rac2 templates]$ sqlplus '/as sysdba'

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jul 27 19:37:27 2010

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options

SQL> select instance_name from gv$instance;

INSTANCE_NAME
----------------
raj2
raj1

hope, this helps you.

related documents:
http://oracleinstance.blogspot.com/2009/12/convert-single-instance-to-rac-instance.html (rconfig method)
http://oracleinstance.blogspot.com/2009/12/migrate-from-database-file-system-to.html
http://oracleinstance.blogspot.com/2009/12/convert-rac-instance-to-single-instance.html

Friday, July 23, 2010

ORA-15302, 0RA-15177 in ASMCMD 10gR2


ORA-15032: not all alterations performed
ORA-15177: cannot operate on system aliases (DBD ERROR: OCIStmtExecute)

remove command gives error in ASMCMD , while tried to remove the database file folder.
Solution:

I have searched in metalink and forum, i found the solution in OTN forum, i documented it for future reference,

hope, it will be helpful to all.

from metalink:
bug 6110998
metalink note 444812.1
No fix as of yet.

from OTN forum:

normally, if we give rm command we have to get message like below, but in some cases,

ASMCMD> rm *
You may delete multiple files and/or directories.
Are you sure? (y/n) y
ASMCMD>

ASMCMD> rm RACDB
ORA-15032: not all alterations performed
ORA-15177: cannot operate on system aliases (DBD ERROR: OCIStmtExecute)


ASMCMD> rm -rf RACDB
ORA-15032: not all alterations performed
ORA-15177: cannot operate on system aliases (DBD ERROR: OCIStmtExecute)
ASMCMD> ls
DEMO/
JAY/
RACDB/

to overcome this bug,

The issue seems to be that the max size of an alias is 48, but the actual length can be more, so you need to delete the file, by file number + file incarnation.

Query this and find the files not removed by rm command:
SELECT 'alter diskgroup bk_group drop file ' --change as needed
|| '''+bk_group.' --change as needed
|| a.file_number
|| '.'
|| file_incarnation
|| ''';'
FROM v$asm_alias a, v$asm_file b
WHERE a.group_number = b.group_number
AND a.file_number = b.file_number
AND b.type = 'BACKUPSET'
AND a.name like 'backupname%' --change as needed
AND a.group_number = 3 --change as needed
ORDER by a.name
/

hope, this will helps you

from the web page:http://forums.oracle.com/forums/thread.jspa?messageID=4339641

Thursday, July 22, 2010

silent mode oracle 10gR2 installation in Linux

Normally we installed oracle using OUI in GUI mode and creating a database while installing oracle or later. here i installed oracle in silent mode by using response file.

The response file can be created by running the Oracle universal installer (OUI) and records the steps and stages in the response file.

the following command creates the response file.
./runInstaller -record -destinationFile /home/oracle/script.rsp
and continue the installation as normal installation.

note: for silent mode installation you must have the response file, if once response file is created you can use it for future installation with same configurations or altering the parameters.

sample response file script.rsp, created by the previous command is in end of the documentation.

A silent installation is initiated using the following command.
[oracle@testserver ~]$ cd database/
[oracle@testserver database]$ ./runInstaller -silent -responseFile /home/oracle/script.rsp

Starting Oracle Universal Installer...

Checking installer requirements...

Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2
Passed


All installer requirements met.

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2010-07-22_11-00-48PM. Please wait ...
Oracle Universal Installer, Version 10.2.0.1.0 Production
Copyright (C) 1999, 2005, Oracle. All rights reserved.

You can find a log of this install session at:
/u01/app/oracle/oraInventory/logs/installActions2010-07-22_11-00-48PM.log
................................................... 100% Done.


Loading Product Information
............................................... 100% Done.


Analyzing dependencies
........................Starting execution of Prerequisites...
Total No of checks: 11

Performing check for CertifiedVersions
Checking operating system requirements ...
Expected result: One of redhat-3,redhat-4,SuSE-9,asianux-1,asianux-2
Actual Result: redhat-4
Check complete. The overall result of this check is: Passed


Check complete: Passed
=======================================================================
Performing check for Packages
Checking operating system package requirements ...
Checking for make-3.79; found make-1:3.80-6.EL4. Passed
Checking for binutils-2.14; found binutils-2.15.92.0.2-21. Passed
Checking for gcc-3.2; found gcc-3.4.6-3.1. Passed
Checking for libaio-0.3.96; found libaio-0.3.105-2. Passed
Check complete. The overall result of this check is: Passed


Check complete: Passed
=======================================================================
Performing check for Kernel
Checking kernel parameters
Checking for semmsl=250; found semmsl=250. Passed
Checking for semmns=32000; found semmns=32000. Passed
Checking for semopm=100; found semopm=100. Passed
Checking for semmni=128; found semmni=128. Passed
Checking for shmmax=536870912; found shmmax=2147483648. Passed
Checking for shmmni=4096; found shmmni=4096. Passed
Checking for shmall=2097152; found shmall=2097152. Passed
Checking for file-max=65536; found file-max=65536. Passed
Checking for VERSION=2.6.9; found VERSION=2.6.9-42.0.0.0.1.ELhugemem. Passed
Checking for ip_local_port_range=1024 - 65000; found ip_local_port_range=1024 - 65000. Passed
Checking for rmem_default=262144; found rmem_default=262144. Passed
Checking for rmem_max=262144; found rmem_max=262144. Passed
Checking for wmem_default=262144; found wmem_default=262144. Passed
Checking for wmem_max=262144; found wmem_max=262144. Passed
Check complete. The overall result of this check is: Passed


Check complete: Passed
=======================================================================
Performing check for GLIBC
Checking Recommended glibc version
Expected result: ATLEAST=2.3.2-95.27
Actual Result: 2.3.4-2.25
Check complete. The overall result of this check is: Passed


Check complete: Passed
=======================================================================
Performing check for TotalMemory
Checking physical memory requirements ...
Expected result: 922MB
Actual Result: 1516MB
Check complete. The overall result of this check is: Passed


Check complete: Passed
=======================================================================
Performing check for SwapSpace
Checking available swap space requirements ...
Expected result: 2274MB
Actual Result: 3098MB
Check complete. The overall result of this check is: Passed


Check complete: Passed
=======================================================================
Performing check for DetectIfDHCPAssignedIP
Checking Network Configuration requirements ...
Check complete. The overall result of this check is: Passed


Check complete: Passed
=======================================================================
Performing check for OracleBase
Validating ORACLE_BASE location (if set) ...
Check complete. The overall result of this check is: Passed


Check complete: Passed
=======================================================================
Performing check for OracleHomeSpace
Checking Oracle Home path for spaces...
Check complete. The overall result of this check is: Passed


Check complete: Passed
=======================================================================
Performing check for DetectAnyInvalidASMHome
Checking for proper system clean-up....
Check complete. The overall result of this check is: Passed


Check complete: Passed
=======================================================================
Performing check for CompatibilityChecks
Checking for Oracle Home incompatibilities ....
Actual Result: NEW_HOME
Check complete. The overall result of this check is: Passed


Check complete: Passed
=======================================================================
PrereqChecks complete

.......................................... 100% Done.


-----------------------------------------------------------------------------
Summary
Global Settings
Source: /home/oracle/database/stage/products.xml
Oracle Home: /u01/app/oracle/product/10.2.0/db_1 (OraDb10g_home1)
Installation Type: Enterprise Edition
Product Languages
English
Space Requirements
/u01/ Required 1.93GB : Available 11.23GB
/tmp/ Required 108MB (only as temporary space) : Available 2.70GB
New Installations (107 products)
Oracle Database 10g 10.2.0.1.0
Enterprise Edition Options 10.2.0.1.0
Oracle Partitioning 10.2.0.1.0
Oracle Spatial 10.2.0.1.0
Oracle OLAP 10.2.0.1.0
Oracle Enterprise Manager Console DB 10.2.0.1.0
Oracle Net Services 10.2.0.1.0
Oracle Database 10g 10.2.0.1.0
Oracle Net Listener 10.2.0.1.0
HAS Files for DB 10.2.0.1.0
Oracle Internet Directory Client 10.2.0.1.0
Oracle Call Interface (OCI) 10.2.0.1.0
Oracle Programmer 10.2.0.1.0
Oracle interMedia 10.2.0.1.0
Enterprise Manager Agent Core 10.2.0.1.0
Oracle JVM 10.2.0.1.0
Database Configuration and Upgrade Assistants 10.2.0.1.0
Oracle interMedia Locator 10.2.0.1.0
Oracle XML Development Kit 10.2.0.1.0
Oracle Text 10.2.0.1.0
Oracle Database Utilities 10.2.0.1.0
Generic Connectivity Common Files 10.2.0.1.0
Oracle Advanced Security 10.2.0.1.0
Enterprise Manager Repository Core 10.2.0.1.0
PL/SQL 10.2.0.1.0
Oracle Net 10.2.0.1.0
Assistant Common Files 10.2.0.1.0
Enterprise Manager plugin Common Files 10.2.0.1.0 Beta
Buildtools Common Files 10.2.0.1.0
Installation Common Files 10.2.0.1.0
Oracle LDAP administration 10.2.0.1.0
Oracle Java Client 10.2.0.1.0
Precompiler Common Files 10.2.0.1.0
Oracle Recovery Manager 10.2.0.1.0
SQL*Plus 10.2.0.1.0
iSQL*Plus 10.2.0.1.0
Enterprise Manager plugin Common Files 10.2.0.1.0
HAS Common Files 10.2.0.1.0
Oracle Clusterware RDBMS Files 10.2.0.1.0
Oracle Wallet Manager 10.2.0.1.0
Enterprise Manager Minimal Integration 10.2.0.1.0
Oracle Database User Interface 2.2.13.0.0
Secure Socket Layer 10.2.0.1.0
Oracle ODBC Driver 10.2.0.1.0
Required Support Files 10.2.0.1.0
Database SQL Scripts 10.2.0.1.0
OLAP SQL Scripts 10.2.0.1.0
PL/SQL Embedded Gateway 10.2.0.1.0
Oracle Globalization Support 10.2.0.1.0
Character Set Migration Utility 10.2.0.1.0
LDAP Required Support Files 10.2.0.1.0
Oracle Help for the Web 1.1.10.0.0
Oracle JDBC Thin Driver for JDK 1.4 10.2.0.1.0
Oracle JDBC Thin Driver for JDK 1.2 10.2.0.1.0
Oracle interMedia Client Option 10.2.0.1.0
Oracle Notification Service 10.1.0.3.0
Oracle Code Editor 1.2.1.0.0I
Perl Interpreter 5.8.3.0.2
JDBC Common Files 10.2.0.1.0
Oracle Locale Builder 10.2.0.1.0
Oracle Containers for Java 10.2.0.1.0
Database Workspace Manager 10.2.0.1.0
Oracle Core Required Support Files 10.2.0.1.0
Platform Required Support Files 10.2.0.1.0
Oracle interMedia Locator RDBMS Files 10.2.0.1.0
Oracle JDBC/OCI Instant Client 10.2.0.1.0
Oracle interMedia Annotator 10.2.0.1.0
SQLJ Runtime 10.2.0.1.0
Oracle interMedia Java Advanced Imaging 10.2.0.1.0
Oracle Database 10g interMedia Files 10.2.0.1.0
Oracle Data Mining RDBMS Files 10.2.0.1.0
Enterprise Manager Baseline 10.2.0.1.0
Oracle Help For Java 4.2.6.1.0
Oracle UIX 2.1.22.0.0
XML Parser for Java 10.2.0.1.0
Precompiler Required Support Files 10.2.0.1.0
XML Parser for Oracle JVM 10.2.0.1.0
Oracle Message Gateway Common Files 10.2.0.1.0
Oracle Starter Database 10.2.0.1.0
Sample Schema Data 10.2.0.1.0
Parser Generator Required Support Files 10.2.0.1.0
Agent Required Support Files 10.2.0.1.0
Oracle RAC Required Support Files-HAS 10.2.0.1.0
RDBMS Required Support Files 10.2.0.1.0
RDBMS Required Support Files for Instant Client 10.2.0.1.0
XDK Required Support Files 10.2.0.1.0
Oracle OLAP API 10.2.0.1.0
Oracle OLAP RDBMS Files 10.2.0.1.0
DBJAVA Required Support Files 10.2.0.1.0
SQL*Plus Required Support Files 10.2.0.1.0
Oracle JFC Extended Windowing Toolkit 4.2.33.0.0
Oracle Ice Browser 5.2.3.6.0
Oracle Display Fonts 9.0.2.0.0
Oracle Extended Windowing Toolkit 3.4.38.0.0
Enterprise Manager Common Files 10.2.0.1.0
Enterprise Manager Agent DB 10.2.0.1.0
Oracle Net Required Support Files 10.2.0.1.0
Enterprise Manager Repository DB 10.2.0.1.0
SSL Required Support Files for InstantClient 10.2.0.1.0
regexp 2.1.9.0.0
Bali Share 1.1.18.0.0
Oracle Universal Installer 10.2.0.1.0
Oracle One-Off Patch Installer 10.2.0.1.0
Installer SDK Component 10.2.0.1.0
Java Runtime Environment 1.4.2.8.0
Sun JDK 1.4.2.0.8
Sun JDK extensions 10.1.2.0.0
-----------------------------------------------------------------------------


Installation in progress (Thu Jul 22 23:01:34 IST 2010)
............................................................... 11% Done.
............................................................... 23% Done.
............................................................... 35% Done.
............................................................... 47% Done.
........................................... 55% Done.
Install successful

Linking in progress (Thu Jul 22 23:08:35 IST 2010)
. 55% Done.
Link successful

Setup in progress (Thu Jul 22 23:12:01 IST 2010)
.................... 100% Done.
Setup successful

End of install phases.(Thu Jul 22 23:12:19 IST 2010)
Starting to execute configuration assistants
Configuration assistant "Oracle Net Configuration Assistant" succeeded
Configuration assistant "Oracle Database Configuration Assistant" succeeded
Configuration assistant "iSQL*Plus Configuration Assistant" succeeded
WARNING:The following configuration scripts
/u01/app/oracle/product/10.2.0/db_1/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.
The installation of Oracle Database 10g was successful.
Please check '/u01/app/oracle/oraInventory/logs/silentInstall2010-07-22_11-00-48PM.log'
for more details.
[oracle@testserver database]$


run the root.sh as root user after geting the message successful.

hope, this helps you.


sample script.rsp response file


####################################################################
## Copyright (c) 1999, 2004 Oracle. All rights reserved. ##
## ##
## Specify values for the variables listed below to customize ##
## your installation. ##
## ##
## Each variable is associated with a comment. The comment ##
## identifies the variable type. ##
## ##
## Please specify the values in the following format: ##
## ##
## Type Example ##
## String "Sample Value" ##
## Boolean True or False ##
## Number 1000 ##
## StringList {"String value 1","String Value 2"} ##
## ##
## The values that are given as need to be ##
## specified for a silent installation to be successful. ##
## ##
## ##
## This response file is generated by Oracle Software ##
## Packager. ##
####################################################################


RESPONSEFILE_VERSION=2.2.1.0.0

#-------------------------------------------------------------------------------
#Name : UNIX_GROUP_NAME
#Datatype : String
#Description: Unix group to be set for the inventory directory. Valid only in Unix platforms.
#Example: UNIX_GROUP_NAME = "install"
#-------------------------------------------------------------------------------
UNIX_GROUP_NAME="oinstall"

#-------------------------------------------------------------------------------
#Name : FROM_LOCATION
#Datatype : String
#Description: Complete path to the products.xml.
#Example: FROM_LOCATION = "../stage/products.xml"
#-------------------------------------------------------------------------------
FROM_LOCATION="/home/oracle/database/stage/products.xml"

#-------------------------------------------------------------------------------
#Name : FROM_LOCATION_CD_LABEL
#Datatype : String
#Description: This variable should only be used in multi-CD installations. It includes the label of the compact disk where the file "products.xml" exists. The label can be found in the file "disk.label" in the same directory as products.xml.
#Example: FROM_LOCATION_CD_LABEL = "CD Label"
#-------------------------------------------------------------------------------
FROM_LOCATION_CD_LABEL=

#-------------------------------------------------------------------------------
#Name : ORACLE_HOME
#Datatype : String
#Description: Complete path of the Oracle Home.
#Example: ORACLE_HOME = "C:\OHOME1"
#-------------------------------------------------------------------------------
ORACLE_HOME="/u01/app/oracle/product/10.2.0/db_1"

#-------------------------------------------------------------------------------
#Name : ORACLE_HOME_NAME
#Datatype : String
#Description: Oracle Home Name. Used in creating folders and services.
#Example: ORACLE_HOME_NAME = "OHOME1"
#-------------------------------------------------------------------------------
ORACLE_HOME_NAME="OraDb10g_home1"

#-------------------------------------------------------------------------------
#Name : SHOW_WELCOME_PAGE
#Datatype : Boolean
#Description: Set to true if the Welcome page in OUI needs to be shown.
#Example: SHOW_WELCOME_PAGE = false
#-------------------------------------------------------------------------------
SHOW_WELCOME_PAGE=true

#-------------------------------------------------------------------------------
#Name : SHOW_CUSTOM_TREE_PAGE
#Datatype : Boolean
#Description: Set to true if the custom tree page in OUI needs to be shown.
#Use this page to select or de-select dependencies. This page appears only in a custom install type.
#Example: SHOW_CUSTOM_TREE_PAGE = false
#-------------------------------------------------------------------------------
SHOW_CUSTOM_TREE_PAGE=true

#-------------------------------------------------------------------------------
#Name : SHOW_COMPONENT_LOCATIONS_PAGE
#Datatype : Boolean
#Description: Set to true if the component locations page in OUI needs to be shown.
#This page only appears if there are products whose installed directory can be changed.
#If you set this to false you will prevent the user from being able to specify alternate directories.
#Example: SHOW_COMPONENT_LOCATIONS_PAGE = false
#-------------------------------------------------------------------------------
SHOW_COMPONENT_LOCATIONS_PAGE=true

#-------------------------------------------------------------------------------
#Name : SHOW_SUMMARY_PAGE
#Datatype : Boolean
#Description: Set to true if the summary page in OUI needs to be shown.
#The summary page shows the list of components that will be installed in this session.
#Example: SHOW_SUMMARY_PAGE = true
#-------------------------------------------------------------------------------
SHOW_SUMMARY_PAGE=true

#-------------------------------------------------------------------------------
#Name : SHOW_INSTALL_PROGRESS_PAGE
#Datatype : Boolean
#Description: Set to true if the install progress page in OUI needs to be shown.
#This page shows the current status in the installation. The current status includes the product being installed and the file being copied.
#Example: SHOW_INSTALL_PROGRESS_PAGE = true
#-------------------------------------------------------------------------------
SHOW_INSTALL_PROGRESS_PAGE=true

#-------------------------------------------------------------------------------
#Name : SHOW_REQUIRED_CONFIG_TOOL_PAGE
#Datatype : Boolean
#Description: Set to true if the required config assistants page in OUI needs to be shown.
#This page shows the list of required configuration assistants that are part of this installation.
#It shows the status of each assistant, including any failures with detailed information on why it failed.
#Example: SHOW_REQUIRED_CONFIG_TOOL_PAGE = true
#-------------------------------------------------------------------------------
SHOW_REQUIRED_CONFIG_TOOL_PAGE=true

#-------------------------------------------------------------------------------
#Name : SHOW_CONFIG_TOOL_PAGE
#Datatype : Boolean
#Description: Set to true if the config assistants page in OUI needs to be shown.
#This page shows the list of configuration assistants that are part of this installation and are configured to launch automatically.
#It shows the status of each assistant, including any failures with detailed information on why it failed.
#Example: SHOW_CONFIG_TOOL_PAGE = true
#-------------------------------------------------------------------------------
SHOW_CONFIG_TOOL_PAGE=true

#-------------------------------------------------------------------------------
#Name : SHOW_RELEASE_NOTES
#Datatype : Boolean
#Description: Set to true if the release notes of this installation need to be shown at the end of installation.
#This dialog is launchable from the End of Installation page and shows the list of release notes available for the products just installed.
# This also requires the variable SHOW_END_SESSION_PAGE variable to be set to true.
#Example: SHOW_RELEASE_NOTES = true
#-------------------------------------------------------------------------------
SHOW_RELEASE_NOTES=true

#-------------------------------------------------------------------------------
#Name : SHOW_ROOTSH_CONFIRMATION
#Datatype : Boolean
#Description: Set to true if the Confirmation dialog asking to run the root.sh script in OUI needs to be shown.
#Valid only for Unix platforms.
#Example: SHOW_ROOTSH_CONFIRMATION = true
#-------------------------------------------------------------------------------
SHOW_ROOTSH_CONFIRMATION=true

#-------------------------------------------------------------------------------
#Name : SHOW_END_SESSION_PAGE
#Datatype : Boolean
#Description: Set to true if the end of session page in OUI needs to be shown.
#This page shows if the installation is successful or not.
#Example: SHOW_END_SESSION_PAGE = true
#-------------------------------------------------------------------------------
SHOW_END_SESSION_PAGE=true

#-------------------------------------------------------------------------------
#Name : SHOW_EXIT_CONFIRMATION
#Datatype : Boolean
#Description: Set to true if the confirmation when exiting OUI needs to be shown.
#Example: SHOW_EXIT_CONFIRMATION = true
#-------------------------------------------------------------------------------
SHOW_EXIT_CONFIRMATION=true

#-------------------------------------------------------------------------------
#Name : NEXT_SESSION
#Datatype : Boolean
#Description: Set to true to allow users to go back to the File Locations page for another installation. This flag also needs to be set to true in order to process another response file (see NEXT_SESSION_RESPONSE).
#Example: NEXT_SESSION = true
#-------------------------------------------------------------------------------
NEXT_SESSION=false

#-------------------------------------------------------------------------------
#Name : NEXT_SESSION_ON_FAIL
#Datatype : Boolean
#Description: Set to true to allow users to invoke another session even if current install session has failed. This flag is only relevant if NEXT_SESSION is set to true.
#Example: NEXT_SESSION_ON_FAIL = true
#-------------------------------------------------------------------------------
NEXT_SESSION_ON_FAIL=true

#-------------------------------------------------------------------------------
#Name : NEXT_SESSION_RESPONSE
#Datatype : String
#Description: Set to true to allow users to go back to the File Locations page for another installation. This flag also needs to be set to true in order to process another response file (see NEXT_SESSION_RESPONSE).
#Example: NEXT_SESSION_RESPONSE = "nextinstall.rsp"
#-------------------------------------------------------------------------------
NEXT_SESSION_RESPONSE=

#-------------------------------------------------------------------------------
#Name : DEINSTALL_LIST
#Datatype : StringList
#Description: List of components to be deinstalled during a deinstall session.
#Example: DEINSTALL_LIST = {"oracle.server","10.2.0.1.0"}
#-------------------------------------------------------------------------------
DEINSTALL_LIST={"oracle.server","10.2.0.1.0"}

#-------------------------------------------------------------------------------
#Name : SHOW_DEINSTALL_CONFIRMATION
#Datatype : Boolean
#Description: Set to true if deinstall confimation is needed during a deinstall session.
#Example: SHOW_DEINSTALL_CONFIRMATION = true
#-------------------------------------------------------------------------------
SHOW_DEINSTALL_CONFIRMATION=true

#-------------------------------------------------------------------------------
#Name : SHOW_DEINSTALL_PROGRESS
#Datatype : Boolean
#Description: Set to true if deinstall progress is needed during a deinstall session.
#Example: SHOW_DEINSTALL_PROGRESS = true
#-------------------------------------------------------------------------------
SHOW_DEINSTALL_PROGRESS=true

#-------------------------------------------------------------------------------
#Name : CLUSTER_NODES
#Datatype : StringList
#Description: This variable represents the cluster node names selected by the user for installation.
#Example: CLUSTER_NODES = {"node1","node2"}
#-------------------------------------------------------------------------------
CLUSTER_NODES={}

#-------------------------------------------------------------------------------
#Name : ACCEPT_LICENSE_AGREEMENT
#Datatype : Boolean
#Description: By setting this variable to true, you are accepting the license agreement. This variable is used only for silent installations.
#Example: ACCEPT_LICENSE_AGREEMENT = true
#-------------------------------------------------------------------------------
ACCEPT_LICENSE_AGREEMENT=false

#-------------------------------------------------------------------------------
#Name : TOPLEVEL_COMPONENT
#Datatype : StringList
#Description: The top level component to be installed in the current session.
#Example: TOPLEVEL_COMPONENT = {"oracle.server","10.2.0.1.0"}
#-------------------------------------------------------------------------------
TOPLEVEL_COMPONENT={"oracle.server","10.2.0.1.0"}

#-------------------------------------------------------------------------------
#Name : SHOW_SPLASH_SCREEN
#Datatype : Boolean
#Description: Set to true if the initial splash screen in OUI needs to be shown.
#Example: SHOW_SPLASH_SCREEN = true
#-------------------------------------------------------------------------------
SHOW_SPLASH_SCREEN=true

#-------------------------------------------------------------------------------
#Name : SELECTED_LANGUAGES
#Datatype : StringList
#Description: Languages in which the components will be installed.
#Component : oracle.server
#-------------------------------------------------------------------------------

SELECTED_LANGUAGES={"en"}

#-------------------------------------------------------------------------------
#Name : COMPONENT_LANGUAGES
#Datatype : StringList
#Description: Languages supported by this component.List of supported languages : {"en","fr","ar","bn","pt_BR","bg","fr_CA","ca","hr","cs","da","nl","ar_EG","en_GB","et","fi","de","el","iw","hu","is","in","it","ja","ko","es","lv","lt","ms","es_MX","no","pl","pt","ro","ru","zh_CN","sk","sl","es_ES","sv","th","zh_TW","tr","uk","vi"}
#Component : oracle.server
#-------------------------------------------------------------------------------

COMPONENT_LANGUAGES={"en"}

#-------------------------------------------------------------------------------
#Name : INSTALL_TYPE
#Datatype : String
#Description: Installation type of the component.
#Component : oracle.server
#-------------------------------------------------------------------------------

INSTALL_TYPE="Enterprise Edition"

#-------------------------------------------------------------------------------
#Name : sl_superAdminPasswds
#Datatype : StringList
#Description: List of passwords
#Component : oracle.server
#-------------------------------------------------------------------------------

sl_superAdminPasswds=

#-------------------------------------------------------------------------------
#Name : sl_dlgASMCfgSelectableDisks
#Datatype : StringList
#Description: Disk Groups that can be selected
#Component : oracle.server
#-------------------------------------------------------------------------------

sl_dlgASMCfgSelectableDisks={}

#-------------------------------------------------------------------------------
#Name : s_superAdminSamePasswd
#Datatype : String
#Description: Same Password Field
#Component : oracle.server
#-------------------------------------------------------------------------------

s_superAdminSamePasswd=

#-------------------------------------------------------------------------------
#Name : s_globalDBName
#Datatype : String
#Description: Global Database Name
#Component : oracle.server
#-------------------------------------------------------------------------------

s_globalDBName="orcl"

#-------------------------------------------------------------------------------
#Name : s_dlgASMCfgRedundancyValue
#Datatype : String
#Description: Redundancy Value
#Component : oracle.server
#-------------------------------------------------------------------------------

s_dlgASMCfgRedundancyValue="2 (Norm)"

#-------------------------------------------------------------------------------
#Name : s_dlgASMCfgNewDisksSize
#Datatype : String
#Description: New Disks Size
#Component : oracle.server
#-------------------------------------------------------------------------------

s_dlgASMCfgNewDisksSize="0"

#-------------------------------------------------------------------------------
#Name : s_dlgASMCfgExistingFreeSpace
#Datatype : String
#Description: Existing Freee Space
#Component : oracle.server
#-------------------------------------------------------------------------------

s_dlgASMCfgExistingFreeSpace="0"

#-------------------------------------------------------------------------------
#Name : s_dlgASMCfgDiskGroupName
#Datatype : String
#Description: Disk Group Name
#Component : oracle.server
#-------------------------------------------------------------------------------

s_dlgASMCfgDiskGroupName="DATA"

#-------------------------------------------------------------------------------
#Name : s_dlgASMCfgDiskDiscoveryString
#Datatype : String
#Description: Disk Discovery STring
#Component : oracle.server
#-------------------------------------------------------------------------------

s_dlgASMCfgDiskDiscoveryString=""

#-------------------------------------------------------------------------------
#Name : s_dlgASMCfgAdditionalSpaceNeeded
#Datatype : String
#Description: Additional Space Needed
#Component : oracle.server
#-------------------------------------------------------------------------------

s_dlgASMCfgAdditionalSpaceNeeded=" MB"

#-------------------------------------------------------------------------------
#Name : s_dbSelectedUsesASM
#Datatype : String
#Description: SID selected for upgrade
#Component : oracle.server
#-------------------------------------------------------------------------------

s_dbSelectedUsesASM=""

#-------------------------------------------------------------------------------
#Name : s_dbSIDSelectedForUpgrade
#Datatype : String
#Description: SID selected for upgrade
#Component : oracle.server
#-------------------------------------------------------------------------------

s_dbSIDSelectedForUpgrade=""

#-------------------------------------------------------------------------------
#Name : s_dbRetChar
#Datatype : String
#Description: Return value for database character set.
#Component : oracle.server
#-------------------------------------------------------------------------------

s_dbRetChar="Responsefile entry West European WE8ISO8859P1"

#-------------------------------------------------------------------------------
#Name : s_dbOHSelectedForUpgrade
#Datatype : String
#Description: OH selected for upgrade
#Component : oracle.server
#-------------------------------------------------------------------------------

s_dbOHSelectedForUpgrade=""

#-------------------------------------------------------------------------------
#Name : s_ASMSYSPassword
#Datatype : String
#Description: ASM SYS Password
#Component : oracle.server
#-------------------------------------------------------------------------------

s_ASMSYSPassword=

#-------------------------------------------------------------------------------
#Name : n_performUpgrade
#Datatype : Number
#Description: 1 if user selects to perform upgrade
#Component : oracle.server
#-------------------------------------------------------------------------------

n_performUpgrade=0

#-------------------------------------------------------------------------------
#Name : n_dlgASMCfgRedundancySelected
#Datatype : Number
#Description: Redundancy value selected
#Component : oracle.server
#-------------------------------------------------------------------------------

n_dlgASMCfgRedundancySelected=2

#-------------------------------------------------------------------------------
#Name : n_dbType
#Datatype : Number
#Description: This variable contains the dbType i.e. GP, TP, DW or Advanced
#Component : oracle.server
#-------------------------------------------------------------------------------

n_dbType=1

#-------------------------------------------------------------------------------
#Name : n_dbSelection
#Datatype : Number
#Description: row selected in the spread table of upgradable DB instances
#Component : oracle.server
#-------------------------------------------------------------------------------

n_dbSelection=0

#-------------------------------------------------------------------------------
#Name : b_useSamePassword
#Datatype : Boolean
#Description: Usable only when SHOW_SCHEMA_PASSWORDS_PAGE is set to false.
Set this to true if same password across all the schemas is desired, else false to enter distinguish passwords for each schema.
If set to true, values from s_superAdminSamePasswd and s_superAdminSamePasswdAgain are picked up, else stringlists sl_superAdminPasswds and sl_superAdminPasswdsAgain are used.
#Component : oracle.server
#-------------------------------------------------------------------------------

b_useSamePassword=true

#-------------------------------------------------------------------------------
#Name : b_useFileSystemForRecovery
#Datatype : Boolean
#Description: Usable only when SHOW_BACKUP_RECOVERY_OPTION_PAGE is set to false and b_enableAutoBackup is set to true.
Set this to true (default) if recovery into file system is desired, else to false for ASM recovery .
#Component : oracle.server
#-------------------------------------------------------------------------------

b_useFileSystemForRecovery=true

#-------------------------------------------------------------------------------
#Name : b_receiveEmailNotification
#Datatype : Boolean
#Description: Usable only when SHOW_DATABASE_MANAGEMENT_PAGE is set to false and b_useDBControl is set to true.
Set this to true if email update is desired, false is the default .
#Component : oracle.server
#-------------------------------------------------------------------------------

b_receiveEmailNotification=false

#-------------------------------------------------------------------------------
#Name : b_loadExampleSchemas
#Datatype : Boolean
#Description: Usable only when SHOW_DATABASE_OPTIONS_PAGE is set to false.
Set this to true if loading example schemas is desired, else false so database won't be created with example schemas. The default is false.
#Component : oracle.server
#-------------------------------------------------------------------------------

b_loadExampleSchemas=false

#-------------------------------------------------------------------------------
#Name : b_enableAutoBackup
#Datatype : Boolean
#Description: Usable only when SHOW_BACKUP_RECOVERY_OPTION_PAGE is set to false.
Set this to true if automatic backup of the database is desired, else false to disable backup.
#Component : oracle.server
#-------------------------------------------------------------------------------

b_enableAutoBackup=false

#-------------------------------------------------------------------------------
#Name : b_dlgASMShowCandidateDisks
#Datatype : Boolean
#Description: set to true if Candidate Disks is selected in ASM dialog
#Component : oracle.server
#-------------------------------------------------------------------------------

b_dlgASMShowCandidateDisks=true

#-------------------------------------------------------------------------------
#Name : b_centrallyManageASMInstance
#Datatype : Boolean
#Description: true if ASM instance needs to be managed by grid control
#Component : oracle.server
#-------------------------------------------------------------------------------

b_centrallyManageASMInstance=true

#-------------------------------------------------------------------------------
#Name : sl_dlgASMDskGrpSelectedGroup
#Datatype : StringList
#Description: Disk Groups that is selected
#Component : oracle.server
#-------------------------------------------------------------------------------

sl_dlgASMDskGrpSelectedGroup={" "," "," "," "}

#-------------------------------------------------------------------------------
#Name : s_dlgRBOUsername
#Datatype : String
#Description: Username
#Component : oracle.server
#-------------------------------------------------------------------------------

s_dlgRBOUsername=""

#-------------------------------------------------------------------------------
#Name : s_dlgEMCentralAgentSelected
#Datatype : String
#Description: Strores the central agent selected
#Component : oracle.server
#-------------------------------------------------------------------------------

s_dlgEMCentralAgentSelected="No Agents Found"

#-------------------------------------------------------------------------------
#Name : b_useDBControl
#Datatype : Boolean
#Description: Usable only when SHOW_DATABASE_MANAGEMENT_PAGE is set to false.
Set this to true if using database control to manage the database is desired, else false so database can be managed by grid control.
#Component : oracle.server
#-------------------------------------------------------------------------------

b_useDBControl=true

#-------------------------------------------------------------------------------
#Name : s_superAdminSamePasswdAgain
#Datatype : String
#Description: Confirmation of password.
#Component : oracle.server
#-------------------------------------------------------------------------------

s_superAdminSamePasswdAgain=

#-------------------------------------------------------------------------------
#Name : s_dlgEMSMTPServer
#Datatype : String
#Description: Stores SMTP Server name
#Component : oracle.server
#-------------------------------------------------------------------------------

s_dlgEMSMTPServer=""

#-------------------------------------------------------------------------------
#Name : s_dlgEMEmailAddress
#Datatype : String
#Description: stores the email address
#Component : oracle.server
#-------------------------------------------------------------------------------

s_dlgEMEmailAddress=""

#-------------------------------------------------------------------------------
#Name : s_dlgRBORecoveryLocation
#Datatype : String
#Description: Recovery area location
#Component : oracle.server
#-------------------------------------------------------------------------------

s_dlgRBORecoveryLocation="/u01/app/oracle/flash_recovery_area/"

#-------------------------------------------------------------------------------
#Name : n_upgradeDB
#Datatype : Number
#Description: 1 if user selects to upgrade DB
#Component : oracle.server
#-------------------------------------------------------------------------------

n_upgradeDB=1

#-------------------------------------------------------------------------------
#Name : n_configurationOption
#Datatype : Number
#Description: This variable contains the configuration option i.e. createDB or configureASM or SoftwareOnly
#Component : oracle.server
#-------------------------------------------------------------------------------

n_configurationOption=1

#-------------------------------------------------------------------------------
#Name : sl_upgradableSIDBInstances
#Datatype : StringList
#Description: This is list of SIDs, OH and whether SID uses ASM or not. contains DB instance details that are displayed in dialog's spread table.
#Component : oracle.server
#-------------------------------------------------------------------------------

sl_upgradableSIDBInstances={}

#-------------------------------------------------------------------------------
#Name : n_upgradeASM
#Datatype : Number
#Description: 1 is user selects to upgrade DB
#Component : oracle.server
#-------------------------------------------------------------------------------

n_upgradeASM=0

#-------------------------------------------------------------------------------
#Name : sl_dlgASMCfgDiskSelections
#Datatype : StringList
#Description: List of Selected Member Disks
#Component : oracle.server
#-------------------------------------------------------------------------------

sl_dlgASMCfgDiskSelections={}

#-------------------------------------------------------------------------------
#Name : s_ASMSYSPasswordAgain
#Datatype : String
#Description: ASM Sys password confirmation
#Component : oracle.server
#-------------------------------------------------------------------------------

s_ASMSYSPasswordAgain=

#-------------------------------------------------------------------------------
#Name : n_dbStorageType
#Datatype : Number
#Description: Usable only when SHOW_DATABASE_FILE_STORAGE_OPTION_PAGE is set to false.
Set this to the following numbers for corresponding database storage type desired:
1 - File System (default)
2 - ASM
3 - Raw Devices
#Component : oracle.server
#-------------------------------------------------------------------------------

n_dbStorageType=1

#-------------------------------------------------------------------------------
#Name : s_rawDeviceMapFileLocation
#Datatype : String
#Description: Text2
#Component : oracle.server
#-------------------------------------------------------------------------------

s_rawDeviceMapFileLocation=""

#-------------------------------------------------------------------------------
#Name : sl_upgradableRACDBInstances
#Datatype : StringList
#Description: contains DB instance details that are displayed in dialog's sprea table.
#Component : oracle.server
#-------------------------------------------------------------------------------

sl_upgradableRACDBInstances={}

#-------------------------------------------------------------------------------
#Name : s_dlgRBOPassword
#Datatype : String
#Description: Password
#Component : oracle.server
#-------------------------------------------------------------------------------

s_dlgRBOPassword=

#-------------------------------------------------------------------------------
#Name : b_stateOfUpgradeDBCheckbox
#Datatype : Boolean
#Description: stores the state of checkbox in UI
#Component : oracle.server
#-------------------------------------------------------------------------------

b_stateOfUpgradeDBCheckbox=false

#-------------------------------------------------------------------------------
#Name : s_dbSid
#Datatype : String
#Description: Value that $ORACLE_SID will be set to.
#Component : oracle.server
#-------------------------------------------------------------------------------

s_dbSid="orcl"

#-------------------------------------------------------------------------------
#Name : b_dbSelectedUsesASM
#Datatype : Boolean
#Description: stores the state of checkbox in UI
#Component : oracle.server
#-------------------------------------------------------------------------------

b_dbSelectedUsesASM=false

#-------------------------------------------------------------------------------
#Name : sl_superAdminPasswdsAgain
#Datatype : StringList
#Description: Confirm Password list.
#Component : oracle.server
#-------------------------------------------------------------------------------

sl_superAdminPasswdsAgain=

#-------------------------------------------------------------------------------
#Name : s_mountPoint
#Datatype : String
#Description: Database file location: directory for datafiles, control files, redo logs.
#Component : oracle.server
#-------------------------------------------------------------------------------

s_mountPoint="/u01/app/oracle/oradata/"

#-------------------------------------------------------------------------------
#Name : b_stateOfUpgradeASMCheckbox
#Datatype : Boolean
#Description: stores the state of checkbox in UI
#Component : oracle.server
#-------------------------------------------------------------------------------

b_stateOfUpgradeASMCheckbox=false

#-------------------------------------------------------------------------------
#Name : OPTIONAL_CONFIG_TOOLS
#Datatype : String
#Description: #The following choices are available. The value should contain only one of these choices.
#The choices are of the form Internal Name : External name. Please use the internal name while specifying the value.List of optional config assistants that need to be launched.
# localconfig, : Cluster Synchronization Service Configuration
# dbma, : Database Upgrade Assistant
#Example: OPTIONAL_CONFIG_TOOLS = {"localconfig"}
#Component : oracle.assistants.server
#-------------------------------------------------------------------------------

oracle.assistants.server:OPTIONAL_CONFIG_TOOLS="{}"

#-------------------------------------------------------------------------------
#Name : OPTIONAL_CONFIG_TOOLS
#Datatype : String
#Description: #The following choices are available. The value should contain only one of these choices.
#The choices are of the form Internal Name : External name. Please use the internal name while specifying the value.List of optional config assistants that need to be launched.
# LocalConfig, : Deinstall Oracle Cluster Synchronization Service
#Example: OPTIONAL_CONFIG_TOOLS = {"LocalConfig"}
#Component : oracle.has.common
#-------------------------------------------------------------------------------

oracle.has.common:OPTIONAL_CONFIG_TOOLS="{}"

#-------------------------------------------------------------------------------
#Name : OPTIONAL_CONFIG_TOOLS
#Datatype : String
#Description: #The following choices are available. The value should contain only one of these choices.
#The choices are of the form Internal Name : External name. Please use the internal name while specifying the value.List of optional config assistants that need to be launched.
# netca_deinst, : Oracle Net Configuration Assistant - Deinstall Script
#Example: OPTIONAL_CONFIG_TOOLS = {"netca_deinst"}
#Component : oracle.network.client
#-------------------------------------------------------------------------------

oracle.network.client:OPTIONAL_CONFIG_TOOLS="{}"

#-------------------------------------------------------------------------------
#Name : OPTIONAL_CONFIG_TOOLS
#Datatype : String
#Description: #The following choices are available. The value should contain only one of these choices.
#The choices are of the form Internal Name : External name. Please use the internal name while specifying the value.List of optional config assistants that need to be launched.
# isqlplus, : iSQL*Plus Configuration Assistant
# removeisqlplusSrvc, : Remove iSQL*Plus Service
#Example: OPTIONAL_CONFIG_TOOLS = {"isqlplus"}
#Component : oracle.sqlplus.isqlplus
#-------------------------------------------------------------------------------

oracle.sqlplus.isqlplus:OPTIONAL_CONFIG_TOOLS="{}"

#-------------------------------------------------------------------------------
#Name : OPTIONAL_CONFIG_TOOLS
#Datatype : String
#Description: #The following choices are available. The value should contain only one of these choices.
#The choices are of the form Internal Name : External name. Please use the internal name while specifying the value.List of optional config assistants that need to be launched.
# launchBrowser, : Launch browser
#Example: OPTIONAL_CONFIG_TOOLS = {"launchBrowser"}
#Component : oracle.sysman.console.db
#-------------------------------------------------------------------------------

oracle.sysman.console.db:OPTIONAL_CONFIG_TOOLS="{}"

#-------------------------------------------------------------------------------
#Name : varSelect
#Datatype : Number
#Description: Return index selected from dialog
#Component : oracle.assistants.server
#-------------------------------------------------------------------------------

varSelect=1

#-------------------------------------------------------------------------------
#Name : s_nameForOPERGrp
#Datatype : String
#Description: oper group
#Component : oracle.rdbms
#-------------------------------------------------------------------------------

s_nameForOPERGrp="dba"

#-------------------------------------------------------------------------------
#Name : s_nameForDBAGrp
#Datatype : String
#Description: dba group
#Component : oracle.rdbms
#-------------------------------------------------------------------------------

s_nameForDBAGrp="dba"

free counters
 
Share/Bookmark