Notes on How to Install:
Oracle 8i
The Oracle Enterprise Manager (OEM)
Course Curriculum
NOTE: These installation instructions are for Windows NT Server and Workstation and Windows 2000. If you will need to install on either HP, Sun Solaris or Linux platforms you will need to email Dr. Stapleton:
ALSO: If you already have Oracle 8 on your machine, or have an unsuccessful installation of 8i on your machine, take this link for more information including how to get a "clean machine". Anything you have installed with the Universal Installer you can uninstall.
Other links:
Oracle 8i Configuration Notes - suggest you read this *after* following the directions here
OEM Facts - FYI
Oracle 8 Install Notes - should you want them for some reason
BEFORE the installs - I suggest you drag a shortcut to NT services out on your desktop. NT services are vital to the proper functioning of Oracle and the OEM on NT machines. We will check these often.
Step 1) Oracle 8i install -
1a) Put in the 8i CD in your CD-ROM drive. If you have Autorun take effect then you will see the Universal Installer launch. Otherwise, you can use the NT Explorer to drill down to the contents of the CD. Double click on the setup.exe file to launch the Universal Installer. As you use the installer, always click the Next button once you have completed a step
1b) Choose the Oracle Home Name and Directory for Oracle 8i -
Name: ora81
Path: D:\oracle\ora81 (Note! - throughout I will use drive D in these instructions for the sake of an e.g. Substitute the letter of the drive you will be installing Oracle in)
1c) Choose now the option to install the Enterprise Edition of Oracle 8i. This should be the top choice on your screen. You do not want to choose the Oracle 8i Client or the Oracle Programmer options
1d) Choose "Typical Install"
1e) Either put your documentation on your hard drive or choose to use the CD
1f) Now you are asked to choose the global database name and SID for your sample database that will be installed. Global database name : ORCL, SID: ORCL (Make them the same name - if you already have an ORCL database on your machine, you will need to choose another name)
1g) Click on the "Install" button. This will complete the Oracle 8i installation.
1h) Very important and requiring a bit of precision! Now, in the next step, step 2 below, you will be installing the OEM. Before you do this, you will need to clean up something in the ORCL database that was just created for you by the Universal Installer in the steps above. We are going to use this ORCL database for the OEM Repository. That is, there will be a schema in the ORCL database that is just for managing your "empire" of databases that you will create in this course. This repository schema we will be naming OEM in step 2 below. However the ORCL database needs a little "fixing up" to prepare it for this wondrous task! What you need to do is:
use the NT Explorer (right click on "My Computer" at the top left hand side of your screen and choose Explore from the menu).
Click on the drive you installed Oracle in - D in my e.g. above- and open up the contents.
Then click on the oracle directory and open up the contents.
Now click on the admin directory, the ORCL directory and finally on the pfile folder to expose the file init.ora. This is the "parameter file" that is used to launch the ORCL database when it is started up.
You need to edit this file. Open the file up in Notepad - just double click on it and associate notepad with it.
Now scroll down until you see "processes".
You will see an actual selection for a number of processes and you will see some selections commented out with #.
You want to change the actual value for processes to processes = 200. This happens to be the minimum value for number of processes for any database that will house the OEM repository!
Now save your changes and you are golden to go on to the next step!
1i) Just to make sure things look good, go to your NT Services and see that you have a new collection of services for Oracle. You should have one for the ORCL database. You should also have an agent and a listener service, and some others.
1j) Be sure to reboot your machine now and then go to NT Services and make sure the Agent, Listener and the ORCL database start service are started. New - Also, go out to your D:\oracle\admin subdirectory and look for an Orcl subdirectory. Look at this subdirectory. You should see a pfile subdirectory and in it you should see the file init.ora. Also, you should have a subdirectory D:\oracle\oradata. In it you should find an Orcl subdirectory and in here. In this subdirectory you should see control files and system files and redo log files among other things. Also, you should have a D:\oracle\ora81\DATABASE subdirectory. In here you should find a PWDorcl file that is encrypted.
Step 2) Yes, we are making progress ;-)) Installation of the OEM -
2a) Put in the OEM CD in your CD-ROM drive. If you have Autorun take effect then you will see the Universal Installer launch. Otherwise, you can use the NT Explorer to drill down to the contents of the CD. Double click on the setup.exe file to launch the Universal Installer. As you use the installer, always click the Next button once you have completed a step
2b) Very important!!! New in 8i!! The OEM and 8i must be installed in 2 completely different ORACLE HOME DIRECTORIES. That means that they can't be installed in the same directory. So we will now have to choose a new directory for the OEM install. Type this:
Name: OEM
Path: D:\oracle\OEM
2c) Make the choice to install the Management Server and the Enterprise Manager Client. I will talk more about the Management Server later - it is new in this version and is a bit of a fix to the old OEM. Ask me why in class if I forget to mention it. You will not get what you want if you just install the client, so pick to install the whole enchilada.
2d) Choose the "Typical Install"
2e) Press the "Install" button once presented with it
2f) You will eventually be presented with a screen to pick the Repository for the OEM. Remember, we are going to use the ORCL database. Type in these things -
User name: internal
Password: oracle
Service: <your machine name here>:1521:ORCL (you will find your machine name by right clicking on Network Neighborhood and then looking at properties). E.g., since my machine name is MELODY (how original), I typed in MELODY:1521:ORCL. (The 1521 is the port that we communicate with the ORCL database on using a TCP/IP connection, by the way. More later on networking stuff.)
IF YOU HAVE PROBLEMS HERE AND CANNOT CONNECT TO THE ORCL
DATABASE, THAT MEANS THAT STEP 1 HAD PROBLEMS. IF YOU HAVE THE DATABASE
CONFIGURATION ASSISTANT WORKING, YOU CAN GO TO
Start->Programs->Oracle-Ora81->Database Administration->Database
Configuration Assistant and then choose to delete the ORCL database. This
should also delete your NT Services for that database. If you do not have
the Database Configuration Assistant, you willneed to delete anything created
for the ORCL database. I'll assume your drive you installed on is D for
these instructions. Substitute your relevant drive letter in it's place.
First go to the D:\oracle\Admin
subdirectory and delete the Orcl folder. Next, go to the D:\oracle\Oradata
subdirectory and delete the Orcl folder there, too. Also, go to the
subdirectory D:\oracle\ora81\DATABASE and delete the file initORCL.ora.
Then, use the Universal Installer and choose to uninstall all Oracle products.
As a measure to then insure all Oracle materials have been removed, take the
link off of the instructions on how to install page for "how to obtain a
clean machine". WARNING - Be sure to back up your registry first
before you do these edits! I had a bad experience once were I accidentally
deleted the wrong thing. Once you have followed all those instructions,
all NT servicesfor Oracle will be gone and all other Oracle software residuals.
This is the only way to delete all the NT Services, etc, if you do not have the
Database Configuration Assistant.
Now, reboot your machine and then start with the install instructions from Step
1. Hopefully, you will be successful this time.
2g) Next, once the installation has logged into the ORCL database, you will be prompted for the schema name in ORCL that will house the Repository. Type -
User name (same as schema name): OEM
password: dba
password: dba (The dba password is just a recommendation for now, short and sweet and memorable.)
2g) Now you can click Finish when presented with the option.
2h) Now, go out to NT Services and check that you now have the OracleOEMManagementServer service. This guy is important, too.
Step 3) Getting the networking parameters right in the OEM Subdirectory!!!
This one is a bit tricky and requires some precision as well. Trust me on this one and ask in class to see why we have to do this. It has to do with the way Net 8, Oracle's networking has to work.
3a) In the NT Explorer click away until you get inside this directory: D:\oracle\OEM\Net80\Admin. You will see the files "sqlnet.ora" and "tnsnames.ora". Edit these files in exactly the following fashion -
Delete the entire contents of sqlnet.ora and put this single line in the file -
IFILE=D:\ORACLE\ORA81\NETWORK\ADMIN\SQLNET.ORA
Save the changes to this file and now do this for tnsnames.ora -
Delete the entire contents of tnsnames.ora and put this single line in the file -
IFILE=D:\ORACLE\ORA81\NETWORK\ADMIN\TNSNAMES.ORA
Save the changes to this file.
These changes are telling the Networking component of the OEM that they should use the 8i networking files on your machine to find out about database communications.
Go ahead and reboot your machine at this point.
Step 4) Installing the 8i DBA Course Curriculum including the sample DBA database
4a) Getting the correct directory structure in place:
go to http://www.ecst.csuchico.edu/~melody/courses/8idba and download (ftp over to your machine) the file oraclass.zip.
You will want use the NT Explorer to create a new folder on the same drive that you installed the Oracle 8i software on. (I have been using D as the drive throughout this discussion.) Call this new folder oraclass.
Be sure you have Winzip installed. If you do not then go out to www.download.com and do a search for it. Download and install Winzip. Double click on the zip file oraclass.zip to unzip it. Choose to use Winzip Classic for the unzipping process. When in the interface for Winzip Classic choose to extract it to the oraclass subdirectory you created above. This will create an NT directory structure. It contains these subdirectories:
Demo
Labs
Solns
You need to create some more directories under the oraclass directory. In the NT Explorer click on the oraclass directory once. Click on File, then New, then Folder. Create a new directory called Bdump.
Do the process above over again to create a new directory called Data as a subdirectory under oraclass
Do the process above over again to create a new directory called Udump as a subdirectory under oraclass
Now click on Data once and then create the subdirectories Disk1, Disk2, etc., up to Disk 8 as subdirectories under Data. Here is what you should now have as the subdirectory structure under oraclass:
Bdump
Data (Data has subdirectories Disk 1, Disk 2, Disk3, Disk4, Disk5, Disk 6, Disk7, Disk 8)
Demo
Labs
Solns
Udump
The oraclass directory, besides these subdirectories listed above also contains these very important files:
run80.bat
credb.sql
credb1.sql
initDBA.ora
NOTE: The directory structure up above is CRUCIAL for you to replicate on your machine. The course scripts, including the creation of the sample DBA database depend on this structure. Ideally, a machine should have many disk drives for Oracle peak performance. We are going to "simulate" a fairly good Oracle install by "faking out" that we have 8 disk drives. We will learn just what should go on each disk drive.
The Demo, Labs and Solns directories are chock full with what you will need to do your lab exercises. The scripts you will need to demonstrate certain phenomena are in the Demo subdirectory. The scripts you will need to do your lab exercises are in the Labs subdirectory. And, you may have guessed by now, if you are having trouble coming up with how to solve the lab exercises, the Solns subdirectory actually has all the solution scripts that solve the problems posed in the labs. I recommend for the sake of a good learning experience that you only resort to looking at the solution scripts after you have tried diligently to figure things out on your own. ;-)). Obviously, you will get from the course what you put into it. NOTE: These scripts are probably all written for the Unix environment. In general, be sure you always look at a script before you run it!!!! You may need to make some minor modifications from time to time for the NT environment or for your directory configuration on your machine.
NOW - Important edits to make to the 4 files- run80.bat, credb.sql, credb1.sql, initDBA.ora. These 4 files will create the all important sample database, DBA, that will be used throughout the course. All the labs, demos, and solutions go hand in hand with this database and its structure. It is basically a poorly designed database from the Oracle Flexible Architecture (OFA) standpoint and we are going to spend the semester learning from it and "fixing it".
Essentially, all the edits you will have to do these 4 files are with regard to what drive you installed Oracle on. If you installed it on the D drive then you are good to go since that is what all these files reflect. If, however, you installed on C, E, F, G, or some other drive letter - you will need to edit each and every one of these 4 files. CAREFUL!! run80.bat is an MS-DOS executable!! To edit it, right click on it and then click edit. There are 2 places in that file that you will need to adjust the drive letter. initDBA.ora is just a text file. Open it with Notepad. I suggest a search and replace. For e.g. Find D:\ and Replace with, say, G:\. credb.sql and credb1.sql are both SQL script files. They can be opened safely in Notepad and edited, similarly to initDBA.ora.
4b) NOW, the moment of truth! (And the one easy to mess up if your edits weren't thorough in 4a, above! ;-)))
You want to go ahead and run the run80.bat file. You can do this a number of ways. One way is to hit Start, then run and Browse to find it. Then click OK.
TROUBLE SHOOTING: Now, trouble shooting this puppy is the fun part! Watch it race on by in the DOS window. If it is successful it will take a long time to run. If it is unsuccessful, it will take a long time to run. ;-)) I mean a really long time to run! run80 calls credb and credb calls credb1. credb and credb1 both will create log files in your oraclass directory, so if you start seeing a bunch of ORA errors flashing by, then you might just close the DOS window and go out to your log file for credb in the oraclass directory (on the Unix install the credb.log is placed in the LABS directory, for NT install it is placed in oraclass) and see what it has to say. There is an ORA error that is really not an "error" conceptually should you see it. That is the one that says "can't drop something that doesn't exist". All the scripts are written to first drop something for safety's sake and then they create it, so this is not really an "error". Other errors like "database not open" or ?? are really errors.
Since I am not too proud to admit it, I bombed these scripts a couple of times on my many installs. ALWAYS, it was because I forgot to change a drive letter on ONE LINE of one of those 4 files! If this happens to you, don't fret much, we can recover. Depending on how far you went into the scripts before the bomb.
GENERAL TROUBLESHOOTING: If run80 ran successfully you will have NT services. Check to see if this is true. If not, there is something wrong. You need to use the Database Configuration Assitant to delete the DBA database, also delete whatever password file was created in D:\Oracle\Ora81\DATABASE\ called PWDdba.ORA. You then need to start over again running run80. Now if your services are there, perhaps credb.sql had an error. Check out the createdb.log first. If database creation failed because of a bad drive letter on one of the lines in the files, then you will see that right away. Go through those files with a fine tooth comb and find the bad drive letter and fix the files.
One of the students installing had this error show up in createdb.log
SVRMGR> connect INTERNAL/oracle as sysdba
Connected.
SVRMGR> shutdown immediate
ORA-01034: ORACLE not available
SVRMGR> startup nomount pfile=F:\oraclass\initDBA.ora
ORACLE instance started.
Total System Global Area 6307788 bytes
Fixed Size 65484 bytes
Variable Size 5300224 bytes
Database Buffers 409600 bytes
Redo Buffers 532480 bytes
SVRMGR> CREATE DATABASE DBA
2> LOGFILE
3> GROUP 1 ('F:\oraclass\DATA\DISK3\redo0101.log',
4> 'F:\oraclass\DATA\DISK4\redo0102.log') size 2M,
5> GROUP 2 ('F:\oraclass\DATA\DISK3\redo0201.log',
6> 'F:\oraclass\DATA\DISK4\redo0202.log') size 2M
7> MAXLOGFILES 32
8> MAXLOGMEMBERS 3
9> MAXLOGHISTORY 1
10> DATAFILE 'F:\oraclass\DATA\DISK1\system01.dbf' SIZE 50M REUSE AUTOEXTEND ON
11> MAXDATAFILES 254
12> MAXINSTANCES 1
13> CHARACTER SET WE8ISO8859P1
14> NATIONAL CHARACTER SET WE8ISO8859P1;
CREATE DATABASE DBA
*
ORA-01501: CREATE DATABASE failed
ORA-01991: invalid password file 'F:\Oracle\Ora81\DATABASE\PWDdba.ORA'
This error occurred for this student because he had trouble with the first run of run80 and he ran it again, but he did not delete the password file that was created in the first run of run80 before he went to run it the second time! You need to delete this file since the Oracle software expects it *NOT* to be there already since it wants to create it. Thus the error!
You will also want to check if any files, e.g. a control file or rbs or redo, have been created on any of the Disk1,...., Disk 4 subdirectories. If any files have been created on any of these "disks", simply delete them all. If you do not delete them all you will get another error when run80 calls credb.sql.
Also, check out createdb1.log. If there are errors then either the data dictionary was not created or the DBA database did not load properly. You will need to undo and rerun the appropriate scripts. I'm happy to assist with individual problems.
Now, hopefully, you are at the stage where you have fixed the 4 files and you have cleaned up what was done the last time you ran them. Run run80 again now. Good luck! We can do more trouble shooting via email or in class if need be.
Be sure to reboot your machine once you can see after much time that the scripts have completed.
5) Some Oracle Networking stuff!! This can be tricky.....
We are going to make sure our new DBA database has what is called a "listener". A listener is a component that "listens" at a port or ports for attempts to contact a specific database or databases. We already have a listener from the ORCL database install. We are going to add to its capabilities the ability to listen for the DBA database as well. We are also going to assign what's called a "Service Name" to the DBA database.
5a) fix the LISTENER. From Start, Programs, Oracle-Ora81, Network Administration, click on the Net8 Assistant.
Double click on the Listeners folder to reveal a listener called "LISTENER". Double click on it. A window will open up on the right. Click the drop down box that currently says "Listener Locations" to reveal other menu choices. Choose "Database Services". Now push the button "Add Database". A new folder for a new database will appear. Type in "DBA" in for Global Database Name, and type in "DBA" for the SID. Click in the upper left hand corner on the File menu option and click on Save Network Configuration.
5b) Give DBA a Service Name. Now
Double click on Net Service Names. Now hit the green "+" sign on the left. This is to add a service name. Add the DBA service name. The wizard will step you through this. Choose a TCP/IP connection. Type in your machine name obtained by right clicking on "Network Neighborhood" and "Properties". Type in DBA for the Service Name. Test the connection.
Now you are all ready for the OEM to discover both your ORCL database and your DBA database!
6) Getting prepared to launch the OEM!
It is very important now that you check your NT services and if they are all not already started, they need to be started in this order. I.e., if 2 are not started, start those 2 in this relative order, etc.
First, Start The Ora81TNS Listener Service if not already started
Second, Start the Database that houses the OEM Repository, in our case the ORCL Database Service if not started
Third, Start the Ora81 Intelligent Agent Service if not started
Fourth, Start the OEMManagementServer Service if not started.
If you have problems here, it is probably because of Net80 issues. We can trouble shoot via email, phone calls, class time.
7) Launching the OEM!!! The grand finale to this exercise....
7a) From the Start Menu go to Programs, Oracle-OEM, Oracle Enterprise Management, Enterprise Manager Console
7b) You will be asked to login. Always remember - the login name for the OEM console is sysman, the initial password is oem_temp.
login: sysman
password: oem_temp
You will be asked to change the password immediately. I suggest using dba as the password for now since it its easy to remember.
7c) the Console launches. We will be talking about this in detail in class. For now go to the drop down menu under Navigator and click on Discover Nodes. Type in your machine name from Network Neighborhood. You should see info on the ORCL and DBA databases show up.
Now you are set to fully enjoy the course!!
By the way, I suggest you create shortcuts to NT Services, Svrmgrl (do a find on the drive that you installed Oracle on and then create a shortcut by right clicking on the file name and choosing shortcut), Sqlplus (under Oracle-Ora81), Sqlplus Worksheet (under OEM), All 3 networking tools, the OEM Config. Asst., the Database Config. Asst., and the OEM console. You may find other useful OEM tools that you want as shortcuts through the course of the semester. I suggest this only because it drives me batty to have to use that darn start menu and go 4 levels deep to get these tools! :-((
ACKNOWLEDGEMENT: Many thanks to my graduate student, Khalid Albarrak for his many hours he spent mastering the Oracle installation procedure and Curriculum Install and all his wonderful help for my Oracle students! May you always walk in happiness and prosperity!