Friday, August 13, 2010

PROJECT

PROJECT
1. Create a folder ( C:\database ), in the database folder create folders data, log, flash, backup
2(a). Create a transaction processing database named PROJECT, run a script mcctb.sql while creating the database. Try to add your own scripts
2(b). During the creation of the database, kindly answer the following questions:
i. Difference among custom, data warehouse, general purpose and transactional databases
j. The purposes of the following users: sys, sysman, system, dbsnmp
k. The differences among the various storage mechanism: file system, automatic storage management (ASM) and raw devices
l. What is Oracle-Managed Files

3. (Write a script to) answer the following questions:
a. What is the oracle base, oracle home
b. What is the instance name, database name and global database name
c. What is the flash recovery area
d. What is the name and location of the alert log
e. What are the names and locations of all datafiles, temporary files, online redo log files and control files.
f. What is the name and location of parameter file
4. Look into the mcctb.sql script and log in as the user specified in the script
5. Always look into the alert log at each stage
6. Make sure you have both pfile and spfile. If only one exist, create the other one. Note: Make sure you can create pfile from spfile and vice versa.
7. Shutdown immediate
8. Remove all the parameter files from their location
9. Startup nomount and note the error
10. Bring back the spfile and startup nomount
11. What is Total System Global Area ?
12. Briefly describe the components of the SGA based on what is on your screen.
13. Determine the status of the database.
14. What goes into startup nomount ….. ?
15. To check the content of the parameter file, issue show parameter
16. Example to check the value of db_name, type show parameter db_name. This means that, to check the value of a particular parameter issue show parameter parameter_name
17. The locations of the control files can be located in the parameter file, so find these locations.
18. Alternatively, issue the following statements: select name from v$controlfile; and select name from v$datafile;. What did you observed?
19. Remove the locations control files from their locations
20. Let us move into the mount state, alter database mount and note down the error.
21. Bring back all the control files to their respective locations and mount the database
22. Determine the status of the database.
23. After mounting the database, issue the statements: select name from v$controlfile; and select name from v$datafile;.
24. What going into mounting a database
25. Open the database, alter database open;.
26. Determine the status of the database.
27. The name format of the password file is PWDsid.ora, it is in the same locations as with the parameter file. Find the one for this database
28. All those with sysdba and sysoper roles can be found in the password file.
29. Let us check those with sysdba and sysoper roles: select * from v$pwfile_users;
30. grant sysdba to mcctb
31. issue the query : select * from v$pwfile_users;
32. grant sysoper to mcctb
33. issue the query : select * from v$pwfile_users;
34. Shutdown immediate
35. Move the password file from its location
36. startup the database
37. issue the query : select * from v$pwfile_users;
38. How can you recreate the password file
39. What is your observation about password file
40. Summarize differences among shutdown normal, transactional, immediate and abort with examples
41. When do we use startup force
42. Create an sqlplus shortcut on the desktop to log into user account mcctb
43. Open a fresh command prompt, set oracle_sid=project
44. Issue: emctl status dbconsole, to check the status of the enterprise manager (EM)
45. If the controller is down, issue : emctl start dbconsole
46. Copy the URL onto internet explorer address bar
47. Log in into the Enterprise Manager
48. List all data dictionary and dynamic performance views which has something to do with control files, datafiles, tablespace, online and archive redo log files
49. Check the default permanent and temporary tablespaces and also the default undo tablespace
50. Use the enterprise manager to create one permanent , temporary and undo tablespaces
51. Make the above the default permanent, temporary and undo tablespaces
52. Change the locations of all the datafiles to c:\database\data, the alert log to c:\database\log and flash recovery area to c:\database\flash
53. Using the Enterprise Manager, go onto the Maintenance tab, click on the Schedule Backup, fill in the Host Credentials using the user and password of the Operating System, click on Schedule Oracle-Suggested Backup, check Disk, click next, next. Read with patience to the final stage and submit



content of script mcctb.sql in notepad

create user mcctb identified by mcctb;
grant dba to mcctb;