Lab 3 – Oracle – Managing Redo Logfiles/control Files

1. Increase the log filesize to 150m

2. Add 2 members in each group

3. drop one member in each group

4. Make sure the group number should be 1,2 & 3

5. Change the location of the control file

6. Add 2 additional controlfiles and the DB should run usin spfile.

7. Create parameter from spfile.

8. Start the DB using Pfile

9. Remove the pfile and make sure you have the spfile. Shutdown the DB and start the DB using pfile(cp the spfile to pfile using styrings command in linux)

10. Reset all and start the DB using SPFILE.

11. Convert the database to archive log mode

12. Change the destination of the archivelogfile under /DATA/ARCHIVELOG

13. Switch the logfile 5 times and make sure yopu see the archivelogs in th above folder.

14. Write a shell script to change the logmode of the DB to archive log / no archive log

$./ arch
– This should change the mode to archivelog

$./ noarch
– This should change the mode to noarchivelog

$./ getmode
– This should print like “THE DATABASE IS IN ARCHIVELOG MODE”

15. Write a shell script to print the following

DBANAME : dbname
LOGMODE : (archive/noarchive)
CONTROLFILE : (Location of controlfile)
LOGFILE : (Location of LOGFILES with size and status)
DB Started with : SPFILE (location)

ex: ./ gopi

CONTROLFILE :’/u01/app/oracle/oradata/gopi/control01.ctl’, ‘/home/oracle/u02/oradata/gopi/control02.ctl’
LOGFILE : /u01/app/oracle/oradata/gopi/redo01.log Size: 150M
/u01/app/oracle/oradata/gopi/redo02.log Size: 150M
/u01/app/oracle/oradata/gopi/redo03.log Size: 150M
DB Started with : $ORACLE_HOME/dbs/spfilegopi.ora


SQL> show parameter control_files
SQL> select group#,members,bytes/1024/1024 “Size in MB” ,status from v$log;
SQL> select group#,type,member from v$logfile;
SQL> select * from v$CONTROLFILE;
SQL> archive log list
SQL> show parameter spfile