Convert Single Instance Database to RAC Database (Manual Method)


There are many ways to convert a single database to RAC. Using database template, rconfig or the manual method. This post shows the steps for manual method of converting a single instance database to RAC (tested for both 11.2.0.4 and 12.1.0.2). The single database is running out of a non-rac oracle home. Backup of this would be restored using a rac enabled oracle home and then converted to a RAC database.
The database is called “asanga” and will retain the same name when converted to RAC.
1. Create a pfile of the single instance database. The pfile entries are shown below
more pfile.ora
*.audit_file_dest=’/opt/app/oracle/admin/asanga/adump’
*.audit_trail=’NONE’
*.compatible=’11.2.0.4.0′
*.db_block_size=8192
*.db_create_file_dest=’+DATA’
*.db_domain=”
*.db_name=’ASANGA’
*.db_recovery_file_dest_size=5218762752
*.db_recovery_file_dest=’+FLASH’
*.diagnostic_dest=’/opt/app/oracle’
*.dispatchers='(PROTOCOL=TCP) (SERVICE=asangaXDB)’
*.open_cursors=300
*.pga_aggregate_target=524288000
*.processes=3000
*.remote_login_passwordfile=’EXCLUSIVE’
*.sessions=4524
*.sga_target=2147483648
*.undo_tablespace=’UNDOTBS1′

Continue reading

Advertisements

How To Change Oracle Installation Owner


Applies to:
Oracle Database 10g
Oracle Database 11g
Oracle Enterprise Manager 11gR1 and Cloud Control 12c

OS: Linux x86, Linux x86_64, Solaris (Tested). (It should work on all UNIX based systems)

Note: Before to proceed you need to stop all the services running on the Oracle Home (databases, listeners, oms, agent)

1. If you don’t have the user that will be the new owner of the ORACLE_HOME created, create one. I’ll use oraoem.

2. With all the services stopped, change the ORACLE_HOME’s owner:

chown -R oraoem $ORACLE_HOME/

Continue reading

How To Resize the Online Redo Logfiles


Single Instance:
1. First see the size of the current logs:
> sqlplus /nolog
SQL> connect / as sysdba
SQL> select group#, bytes, status from v$log;
GROUP# BYTES STATUS
———- ———- —————-
1 1048576 INACTIVE
2 1048576 CURRENT
3 1048576 INACTIVE
Logs are 1MB from above, let’s size them to 10MB.
2. Retrieve all the log member names for the groups:
SQL> select group#, member from v$logfile;
GROUP# MEMBER
————— —————————————-
1 /usr/oracle/dbs/log1PROD.dbf
2 /usr/oracle/dbs/log2PROD.dbf
3 /usr/oracle/dbs/log3PROD.dbf
3. Let’s create 3 new log groups and name them groups 4, 5, and 6, each 10MB in size:
SQL> alter database add logfile group 4 ‘/usr/oracle/dbs/log4PROD.dbf’ size 10M;
SQL> alter database add logfile group 5 ‘/usr/oracle/dbs/log5PROD.dbf’ size 10M;
SQL> alter database add logfile group 6 ‘/usr/oracle/dbs/log6PROD.dbf’ size 10M;
4. Now run a query to view the v$log status:

Continue reading

ORA-01194: file 1 needs more recovery to be consistent


ORA-01194: file 1 needs more recovery to be consistent

Method 1:

1) Start the database in mount state

SQL> startup mount;

2) Recover the database.

SQL> recover database;

If you come across below error

ORA-00283: recovery session canceled due to errors

ORA-01610: recovery using the BACKUP CONTROLFILE option must be done

ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below

ORA-01194: file 1 needs more recovery to be consistent

ORA-01110: data file 1: ‘D:\ORACLE\PRODUCT\10.2.0\ORADATA\DBTEST\SYSTEM01.DBF’

then, do the following

1)

SQL> recover database using backup controlfile until cancel;

ORA-00279: change 766152 generated at 03/16/2013 12:12:04 needed for thread 1

ORA-00289: suggestion :

/u01/app/oracle/flash_recovery_area/DUPDB/archivelog/2013_03_16/o1_mf_1_14_%u_.arc

ORA-00280: change 766152 for thread 1 is in sequence #14

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2013_03_14/o1_mf_1_10_8n43no4v_.arc

ORA-00310: archived log contains sequence 10; sequence 14 required

ORA-00334: archived log:

‘/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2013_03_14/o1_mf_1_10_8n43no4v_.arc’

ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below

ORA-01195: online backup of file 1 needs more recovery to be consistent

ORA-01110: data file 1:

‘/u01/app/oracle/oradata/DUPDB/datafile/o1_mf_system_7qm3ck4o_.dbf’

2)

Continue reading