Lab 10 – Oracle – Datapump Questions and Lab

1. Add 2 members in each group

2. drop one member in each group

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

4. Change the location of the control file

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

6. Create parameter from spfile.

7. Start the DB using Pfile

8. 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)

9. Reset all and start the DB using SPFILE.

10. Convert the database to archive log mode

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

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

13. 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”

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

Related Views/Commands

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