Another vm for dev, another installation of Oracle Database 11g Release 2 (188.8.131.52.0) Enterprise Edition, 64-bit version for Microsoft Windows (x64). This short description is not intended for production installation, but for local installation for dev purposes. You can download and use the database for dev purposes; excerpt from the “OTN License Agreement”, which you have to accept:
[...] LICENSE RIGHTS: We grant you a nonexclusive, nontransferable limited license to use the programs only for the purpose of developing, testing, prototyping and demonstrating your application, and not for any other purpose. [...]
Summary: Quite easy with the exe-installer, but you need time: about 2-3 hours if you know what you’re doing (download of the GBs and installation), if not longer
At first you should check physical requirements: Hard drive 5.92 GB (+5GB for the installation zips and its extraction), RAM 1 GB minimum or 2 GB minimum for Windows 7 (for further details see the documentation)
Download and unzip
1. At the download page of Oracle Database, download the two parts
- win64_11gR2_database_1of2.zip (about 1,1 GB)
- win64_11gR2_database_2of2.zip (about 0,9 GB)
- Documentation package E11882_01.zip, if you want offline all the db 11gR2 oracle docs in html and pdf version.
- Interactive quick reference db11g-interactivequickref-187977.zip, for which you need a Flash Player. This gives a nice overview of dba views, architecture and background processes.
- Examples package win64_11gR2_examples.zip
- Client package win64_11gR2_client.zip
- there are more downloads, e.g. Oracle Grid Infrastructure (necessary e.g. for Oracle Real Application Clusters (RAC)), or Web Tier Utilities (for HTTP access to the database via the Apache HTTP Server), etc.
- sqldeveloper for sql-Development: sqldeveloper64-3.0.04.34-no-jre.zip
2. Unzip both files at the same directory level: I created C:\Oracle\db_11gR2\, put both zips there, and chose “Extract here” with 7-zip. This will produce one directory of name database.
3. Double-click setup.exe to start the Installer
4. Follow the installation wizard, which will guide you straightforward through the installation.
- Choose the desired installation: I choose database with configuration for a desktop (not server) for a fast setup, and the Enterprise Edition.
- I change the Oracle base directory and accept the other suggestions:
- Oracle Base directory: C:\Oracle
- software directory: C:\Oracle\product\11.2.0\dbhome_1
- directory of db file: C:\Oracle\oradata
- global database name: e.g. orcl.[domain name]
- administrative password for user SYS: for dev purposes you don’t have to follow the guidelines, it’s enough if it’s not empty and no user name.
- You get a summary, which you can save as a file (good to have for later reference…). Check it, and hit “Finish” to begin the installation, which takes about 20-30 min., time to have a cup of coffee
5. After Completion you get a report:
- Log files are under [Oracle base dir]\cfgtoollogs\dbca\orcl
- global database name : orcl.[domain name]
- SID (system id): orcl
- name of server parameter file: [software dir]\database\spfileorcl.ora
- db control URL (Enterprise Manager): https://localhost:1158/em
Database Users / Schemas
6. After installation only the admin-users SYS, SYSTEM, DBSNMP, SYSMAN are not locked. Still in the installer or later (via OEM, sqlplus, or sqldeveloper), you can lock/unlock users and change the default passwords. In my dev environment I changed the one for SYSTEM to the same as for SYS. Later on I also change the password of SYSMAN to the same: Logon via sqlplus or sqldeveloper as a dba user, and issue the command: alter sysman identified by [pwd];
- SYS: You have already changed the default pwd change_on_install for SYS with the Installer. It possesses the DBA role. All of the base tables and views for the database data dictionary are stored in the schema SYS. To maintain the integrity of the data dictionary, tables in the SYS schema should never be modified by any user or database administrator, and no one should create any tables in the schema of user SYS.
- SYSTEM: default pwd is manager. It possesses the DBA role. SYSTEM is used to create additional tables and views that display administrative information, and internal tables and views used by various Oracle Database options and tools. Never use the SYSTEM schema to store tables of interest to non-administrative users.
- SYSMAN: It is used to perform OEM administration tasks.
- DBSNMP: default pwd is the same as its name. The management agent of OEM uses this account to monitor and manage the database.
7. All other users are locked: Sample schema accounts (e.g. SCOTT, HR, OE, PM, SH, IX, BI, etc.); I unlock those, just to already have a few schemas and tables to experiment. There are scripts for resetting those under [software dir]\demo\schema, if you messed them up
8. Internal accounts (individual Oracle Database features or components can have their own schemas); I don’t change anything.
Exploring OEM (Oracle Enterprise Manager)
. Now you can logon to OEM with an admin account https://localhost:1158/em
9. As you notice in the Windows task manager, some Windows Services are created. I’ll explain the three most important, to start up and shut down the db (alternatively you can use the Enterprise Manager):
- OracleService[SID], which is the Oracle database instance.
- Oracle[ORACLE_HOME]TNSListener, which is your listener. The listener is required for clients (e.g. sqlplus, sqldeveloper) to connect to your database.
- OracleDBConsole[SID], which enables clients to connect to Database Control.
In our context SID=orcl and ORACLE_HOME=OraDb11g_home1, i.e., we have the services OracleServiceORCL, OracleOraDb11g_home1TNSListener, OracleDBConsoleorcl. Start or stop all three services through Start->Control Panel->Administrative Tools->Services: start/stop. You can deactivate the other services for dev purposes.