Hello All,
Below is my solution to our second homework assignment for CS151B, Oracle Database Admin with Abbas. I wrote my solution to the problem in Ruby, my favorite scripting language.
The assignment was pretty chill, but gave me an opportunity to sharpen my Oracle-Ruby skills. Also, I spent a lot of quality time learning how to log into the database as the sysdba (the administrative account which is the ‘super user’ of the database).
What we needed to do was this: write a small app that would describe the documented parameters in an Oracle database. Documented parameters are things like how much memory is allotted to the database and such. There are about 300 of these and they are stored in a file called init.ora (which also called a pfile … which is a raw form of the commonly used, spfile). And for extra credit we could extend our application to tell us info about the undocumented parameters in an Oracle database (and there’s like thousands of these). Undocumented parameters are crazy things and I really have no clue what they do (although, I did do all of the extra credit).
Our script has four functions (which you access by passing various arguments to it):
(1) no arguments :: display all documented params for Oracle
(2) -n :: number of documented params
(3) /regex/ :: match a regular expression with a documented param ( for ex: all parameters that start with the letter “s” would be this regular expression: ^s )
(4) /regex/ -n :: number of documented params matching a regular expression
For extra credit you can pass all four of the above arguments to functions that tell you info about the undocumented params in an Oracle database.
Enjoy!