Thursday, November 5, 2009

Why Java

In B.Sc(Computer Science), the university had decided that all Computer Science students would do Pascal as an entry level programming language. In this course, students only covered programming basics; primitive data types and flow control, and I/O. It was upon the students to learn stuff like database programming by themselves. However, concepts like Analysis of Algorithms and Data Structures was well covered in second year of study. However, these important concepts were demonstrated using Pascal. Even though we didn't know then, but it was a good thing that we used Pascal rather than a language like Visual Basic.

Also, an introductory Software Engineering course was taught in second semester of second year. This introduced some Software Development methologies like Waterfall Model and RUP. I guess Agile methodology had not gained much ground by then.

Object Oriented Analysis using UML was introduced in third with Object Oriented Development in 4th year. We used Java to demonstrate Object Oriented concepts like Polymorhism, Inheritance, and Method Overriding and Overloading.

Tracking back alittle bit. When I went for Industrial Attachment back in third year, I was put in a Software Development environment. My responsibility was developing websites and afew software. During this period, we used PHP scripting language with MySQL database. The rationale behind this was the fact that several hosting companies were able to host websites done in PHP as opposed to othe technologies like Java. So, circumstances forced me to learn PHP, and I found it easy to use and very powerful.

However, from my own research I realized was not as mature as Java. In addition, its security was not as well developed as Java's. I also learned that adoption of PHP was majorly in the websites arena. But I didn't know of any company that had used PHP to implemet an enterprise-wide business solution. But I have to admit that the language is improving rapidly and may soon find more use in Business Applications. But for now, I doubt I think is still the de-facto leader in this arena given the number of companies supporting the technology, the standard process(JCP) that every specification of the language is subjected to.

All I ever wanted to do was be a part of a team that develops Critical systems that supports real businesses. And from my research, I found out that Java had curved itself a niche in this area and, it is likely to stay that way for sometime to come. I'm , by nature not a Microsoft person. I appreciate good technology but so far Im not conviced that Microsoft's is a good technology except for their Office suite.

These are some of the reasons I chose to start my professional career with Java.

Programming languages evolve very fast and new ones also being invented at a very fast pace. So, Java is just my first professional language. After coming up to speed with major Java technologies, the I'll have to learn other languages. Next in line will be Python. But for now, its Java until I know how the nuts and bots are fitted together.

Monday, November 17, 2008

Oracle Instance Management

1. Database Startup and Shutdown
  • Database Control - A tool for managing one database even though the database can be clustered.
  • If there are several databases then each database must have its own instance of the database control.
  • All communications to DB Control id thru HTTPS.
  • DB Control Configuration done at DB creation time - hostname and TCP port
  • Start DB Control - emctl utility: emctl start dbconsole, emctl stop dbconsole, emctl status dbconsole. ORACLE_HOME, PATH and ORACLE_SID must be set for these cmds to run - for configuration settings.
  • emctl status dbconcole will give the port on which the DB control is listening.
  • Logon window will show only if the listener is running.
Starting the Listener
  • Requests to listener uses Oracle Net
  • To start DB Listener: With the lsnrctl utility, using DB control, or as a service(Windows)
  • lsnrctl start [listener], lsnrctl stop [listener]
Starting SQL*Plus
  • sqlplus /nolog then sqlplus /as sysdba sqlplus /as sysoper, etc.
Database Startup and Shutdown
  • A DB is mounted and opened or dismounted and closed.
  • Through SQL*PLUS: startup, shutdown or through DB Control.
  • Alert log will give details of such operations - bcoz are critical operations.
  • Can also be carried out by privileged users.
Connecting with Approprite Privilege
  • Ordinary cannot start DB because they are authenticated against the Data Dictionary and DD cannot be read unless the DB is opened.
  • Login thru Operatins System or external password file.
  • DD Authentication: connect username/password. Anyone connecting this way cannot issue startup or shutdown.
  • Password file or OS Authentication: Passwd File Auth - connect user/pass as sysdba, connect user/pass as sysoper, OS Auth - connect /as sysdba, connect /as sysoper.
SYSOPER and SYSDBA
  • Special privilege with special capabilities
  • Enabled only when an external auth means is used - Passwd file or OS.
  • SYSOPER cannot CREATE DATABASE nor do incomplete recovery nor create SYSOPER and SYSDBA users.
  • Both SYSOPER and SYDBA can: STARTUP, SHUTDOWN, ALTER DATABASE MOUNT|OPEN|CLOSE|DISMOUNT, ALTER [DATABASE|TABLESPACE] [BEGIN|END] BACKUP RECOVER
  • show user cmd show the logged on user.
  • SYSDBA logs you on as SYS user, SYSOPER logs you on as PUBLIC - a notional user with administration privileges.

Saturday, November 1, 2008

My first encounter with challenging questions

I was not able to answer the following questions after satisfactory study of the relevant topics and materials:
Qn.1. Is it necessary to have a database listener created before creating a database?
I had an idea but I wasn't able to pick the best options from the choices given. As I came to learn, the answer was: It depends on whether Database Control option is selected in the DBCA.

Qn.2. Several actions are necessary to create a database. Place these in the correct order:
1) Create the data dictionary views
2) Create the parameter file
3) Create the password file
4) Issue the CREATE DATABASE command
5) Issue the STARTUP command

In my view, the sequence would be 2,3,1,4,5. In choosing I didn't think of Data Dictionary as having to act on underlying database(it must have been created) to make the database usable.
But as I came to learn the correct order is 2,3,5,4,1, the reason being that a parameter and a password file must be created first before anything else as what it to follow will be dependent on the two files, for instance tablespaces, block_size, and the like. You then have to startuo the database instance using the STARTUP command. It is only then you can issue the CREATE DATABASE command. At this point the database has been created but it's NOT usable at all. To make the database usable, you have create the data dictionary views. I thought I was sure of the sequence at first, but on studying the answe I was able to understand it.

Qn.3. What files are created by the CREATE DATABASE command? (Choose all the correct answers).
Apart from control files, I was not sure about any other files created by this command. But as I came to learn, the Control file, the Online Redo log files, the SYSAUX table space datafile and the SYSTEM tablespace datafile are all created by this command.

Qn.4. What will happen if you do not run the CATALOG.SQL and CATPROC.SQL scripts after creating a database?
I didn't have a clue on what might happen as I didn't know the role of the two Scripts. As I came to learn, it won't be possible to query the data dictionary views. The database will functuon just fine but without the data dictionary views and PL/SQL packages created by these scripts it will be unusable.

Qn.5. At what point doo you choose or change the database character set?
This was another challenging question but I'm glad I now know the answer and hope to be able to apply it to new situations. The answer, as I came to learn is: At database creation time, whether or not you are using a template, and after database creation time using SQL*PLUS.

Friday, October 31, 2008

My Passion with Oracle

This post, and several to follow is meant to record the tribulations and triumphs that I go through to get Oracle up and running. The aim is not only to get Oracle up and running, but also to do performance tuning, implement RAC, experiment with Streaming, among other things. In other words, this blog will record everything I do from now up to the time I do and pass my Oracle Certified Professional and Oracle Certified Master exams. My purpose of recording this activity is to make available a record of how one may go througha alot of trouble to make Oracle work efficiently, and to prove this by passing Oracle's toughest exams; OCP and OCM. It is not just the trouble but also, the fun of doing it; the satisfied ego, mountains climbed that were otherwise thought to be impossible to climb.