Beruflich Dokumente
Kultur Dokumente
1, DB 11gR2, MS Access
2010, LibreOffice Base, ODBC and JDBC
I had some spare time during Christmas and New Year period and I decided to make a short exercise on: Oracle
Solaris 11.1 (x86) manual installation, Oracle Database 11gR2 manual installation and some experiments with
integration of LibreOffice Base (via JDBC driver) and MS Access 2013 on top of MS Windows 8 (for data
manipulation and database frontend application development). Why such a set of products? Well, Solaris is marketed
as the best Unix for Oracle technologies deployment. Moreover, I have experience with GNU/Linux and AIX5L when
it comes to Oracle DB. Why MS Access 2013 and MS Windows 8? I like MS Access for data manipulation, useful
frontends and database application prototyping since the MS Access 97, so I wondered what comes with the newest
version. Same about MS Windows 8 curiosity. I hope youll find the following material useful for your own purposes.
Lets see what software components are required to start this exercise.
Host side:
Virtualization platform: Oracle VirtualBox 4.2.6
Additional tool: Clone VDI 2.10 (was used to resize the virtual hard drive)
Guest#1 side:
Guest#2 side:
Part 1. Oracle VirtualBox 4.2.6 installation and virtual machine creation for Solaris
11.1 and Oracle DB 11gR2
I doubt that most of us have tons of hardware, especially in the era of virtualization. Today our desktop computers
are strong enough to help us with home made experiments on software installation and configuration. Everything is
much more flexible when we deal with virtual machines, not to mention the fact, that we can heavily reduce the
amount of hardware which we were still using a few years ago. To start the experiment, we need to download and
install VirtualBox 4.2.6 (or higher).
This operation is so straightforward that we will skip the detailed description. I decided to install VirtualBox on my
host machine, which was a typical MS Windows 7 based office desktop. However, with multi-core CPU and enough
RAM.
When VirtualBox was installed, I created a virtual machine aimed for Solaris 11.1 (x86/64-bit) installation. The
specification is as presented on the following screenshots.
Please note, that the virtual hard drive size is 30 GB (dynamically allocated) and more than 25 GB is used (this is the
situation with installed and working Oracle database instance). Previously I allocated only 20 GB of space for virtual
hard drive and it was my fault it was too small and I could not continue with Oracle DB installation in easy manner.
Moreover, the virtual disk drive was fixed size type. Fortunately, nothing critical happened as this issue was a
pleasure to be solved with CloneVDI. This tool helped me a lot with virtual disk drive resize operation from 20 GB to
30 GB in my case.
Of course all the parameters of virtual machine can be much better everything is up to you and your host hardware
capabilities. Now, let's start with Solaris 11.1 (x86/64-bit) installation.
Firstly, we have to download Solaris 11.1 (x86/64-bit) from Oracle Technology Network (all required software
components are presented in part 0 of this series). There are several options available. From the most friendly Live
Media, where we can boot Solaris to the graphical desktop environment (Gnome), try it out on our target machine
and decide if we want to install the system with nice, modern graphical installer, through ready to be used virtual
machines (no fun in our case), to the option we will use in our scenario, so called: Text Install. In my opinion the most
classic way of Solaris installation and it will provide the best experience for us. Lets download this version now.
We assume that the target virtual machine has been already created in VirtualBox with minimal parameters
presented in part 1 article of this series. Then, we can start virtual machine and mount Solaris 11.1 (x86/64-bit) Text
Install CD-ROM image as our virtual CD-ROM in VirtualBox. Soon, the installation process will start. We will now
present screenshots taken from every screen of Solaris 11.1 text installer. All values were specific to my case and
should be modified to fulfill individual requirements.
I can only point out once again, that as I mentioned before in part 1 the virtual disk drive for Solaris 11.1
installation with Oracle DB 11gR2 on top of it should be at least 30 GB. Please note, that at the current stage, the
target virtual disk drive capacity was set by me to 20 GB (we will see this size on dedicated screenshot) of course,
it was even too much for Solaris 11.1, but during the installation of Oracle DB 11gR2 I had to use Clone VDI to
extend its capacity up to 30 GB. So, if someone want to skip the virtual hard drive expansion task with Clone VDI
tool, then its a very good idea to set the appropriate size during virtual machine creation (30 GB or more means no
issues).
After installation is completed, we can reboot (F8 on Installation Complete screen) and we will see GNU GRUB... We
can boot from our hard disk and login to Oracle Solaris 11.1 for the first time (remember to have installation CD-ROM
unmounted).
That's all for now. We finished the very basic installation. Now we will install Gnome - yes, we need graphical desktop
environment to install Oracle Database 11gR2 in a friendly manner, 100% locally.
Now, as we have basic Oracle Solaris 11.1 installed on our virtual machine, we will need to have a graphical desktop
environment installed, too. It's required by the Oracle Universal Installer (OUI) application we will use to install Oracle
Database 11gR2.
We don't want to complicate the things too much at this time, therefore we will launch OUI locally. In typical scenario
one can want to run X server on his local desktop computer, export appropriate display settings from the target
server (on which, usually, an administrator is logging in via SSH2 remotely) and perform the installation via OUI,
including database creation via DBCA (Database Creation Assistant). We will simplify the whole process all in all
we are working with virtual machine and we can launch graphical session there. Although, we have to install Gnome
first. Let's do it.
Login using your user account and then switch to root role (you can skip "uname -a" command, of course):
Now, let's reboot our system (System > Shut down... > Restart) after a short while we should be able to see
GDM (Gnome Display Manager) login:
That's all. We can now begin prerequisites configuration for Oracle Database 11gR2 installation.
Part 4A. Clone VDI helps with Oracle VirtualBox virtual disks resize operations
I created a 20 GB virtual disk drive for Solaris 11.1 and Oracle DB 11gR2. This was really too small and the most
comfortable thing I could do was to use Clone VDI 2.10. This is small, simple and very useful piece of software
really recommended for all Oracle VirtualBox users. Not only we can clone our virtual hard disks, manage their
UUIDs, perform compacting, but also easily resize disks.
To solve my problem I made a backup of my virtual hard drive file (sic!), started Clone VDI, selected my source
virtual hard drive (Solaris11_1_test.vdi) which was 20 GB fixed size, I changed the name of my destination virtual
hard drive file (in this case: Clone of Solaris11_1_test_X.vdi to be honest, not a nice name, but everyone can
decide on his own, which is recommended). I also selected the options to: "Keep old UUID" and "Increase virtual
drive size to 30.00 GB". With such configuration I expected to have a drop-in replacement of my 20 GB source virtual
hard drive. I waited for a couple of minutes
And it was done. So, I replaced my old, 20 GB file with the new, 30 GB one. With some reference to the Solaris
11.1 administrators guide I was able to easily allocate a new space for my root storage pool with ZFS commands
(refer to the "Solaris Internals" for more information).
We have configured our fresh Oracle Solaris 11.1 (x86/64-bit) installation. Now we can start preparations for Oracle
Database 11gR2 binaries installation. Let's check all the prerequisites as presented in the official documentation
and then run the installation process with Oracle Universal Installer (OUI).
The most important documents for us are:
Oracle Database Installation Guide 11g Release 2 (11.2) for Oracle Solaris
Oracle Database Quick Installation Guide 11g Release 2 (11.2) for Oracle Solaris on x86-64 (64-Bit)
First of all, let's check the RAM requirements. According to documentation, a minimum is 1 GB and recommended
amount of RAM is 2 GB or more. We set 2 GB for our virtual machine, so it's good, but anyway use root role:
root@turingsman:~# prtconf | grep "Memory size"
Memory size: 2000 Megabytes
root@turingsman:~#
2000 Megabytes OK.
Now, let's check the swap space. The rule is that for RAM size between 1 GB and 2 GB, the swap size should be
equal to 1.5 times the size of RAM. If there is more than 2 GB RAM and less than 16 GB, then the swap size should
be equal to the RAM size. If there is more than 16 GB of RAM, our swap size shouldn't be bigger than 16 GB.
Now, there is the most important information in official Oracle Database 11gR2 installation guide: no special kernel
parameters, packages, or patches are required at the time of this release for Oracle Solaris 11.
Seems that the whole Oracle Database 11gR2 installation process on Oracle Solaris 11.1 is much easier than when
compared to Oracle Solaris 10 or supported Linux distributions. I strongly recommend to follow the official
documentation. However, as I made some additional modifications using Oracle Solaris projects feature I'll present
them later in this article.
Alright. Enough about parameters, packages or patches (still, as I was experimenting with the whole thing, I made
some more/less rational decisions myself I'll present these modifications later).
We have to check what version of Solaris and what update level were using to be sure we're compliant with the
Oracle requirements:
root@turingsman:~# uname -a
SunOS turingsman 5.11 11.1 i86pc i386 i86pc
root@turingsman:~# uname -r
5.11
root@turingsman:~# cat /etc/release
Oracle Solaris 11.1 X86
Copyright (c) 1983, 2012, Oracle and/or its affiliates. All rights reserved.
Assembled 19 September 2012
Everything is OK.
We assume that there are no other Oracle products installed on this machine. This is the first installation, so we now
have to create some required groups and users:
# groupadd oinstall
# groupadd dba
# useradd -d /export/home/oracle -m -s /bin/bash -g oinstall -G dba oracle
This command creates the oracle user and specifies "oinstall" as the primary group and "dba" as the secondary
group.
Enter the following command to set the password of the oracle user:
root@turingsman:~# passwd -r files oracle
New Password: [type your favorite password]
Re-enter new Password: [re-type your favorite password]
passwd: password successfully changed for oracle
Check the shell limits:
root@turingsman:~# ulimit -t
unlimited
root@turingsman:~# ulimit -f
unlimited
root@turingsman:~# ulimit -d
unlimited
root@turingsman:~# ulimit -s
8192
root@turingsman:~# ulimit -n
1024
root@turingsman:~# ulimit -v
unlimited
root@turingsman:~#
Almost good. Oracle recommends the following minimum values for STACK (-s) = 32768 and NOFILES (-n) = 4096
limits. Tune them with the following commands:
root@turingsman:~# ulimit s 32768
root@turingsman:~# ulimit n 4096
You can check that limits were changed with the previous commands again (ulimit s, ulimit n).
To have these changes permanent, you should define the limits in /etc/system or use Oracle Solaris projects feature.
Now, I've unfortunately made some additional changes with the projects feature of Oracle Solaris. You can follow my
way to stay compliant with the record of this exercise. Perform the following commands:
root@turingsman:~# projadd -U oracle -K "project.max-shm-memory=(priv,6g,deny)"
user.oracle
root@turingsman:~# projmod -sK "project.max-sem-nsems=(priv,512,deny)" user.oracle
root@turingsman:~# projmod -sK "project.max-sem-ids=(priv,128,deny)" user.oracle
root@turingsman:~# projmod -sK "project.max-shm-ids=(priv,128,deny)" user.oracle
root@turingsman:~# projmod -sK "project.max-shm-memory=(priv,6g,deny)" user.oracle
And:
Now, put all the lines presented above into the file in vi editor and save file (hit "Esc" key, then hit "w" and "q" keys to
perform write and quit operation). However, at this stage this can be tricky as all the paths presented in the
".bash_profile" file are to be created by Oracle Universal Installer (OUI). These paths don't exist at this stage of
installation. Please only note, that if we change the paths in OUI we have to edit ".bash_profile" too. Also, our Oracle
Database 11gR2 installation should be planned, so we can assume that the following paths pattern will be copied in
OUI (this is our plan).
Now, we can copy the installation packages and unzip them for oracle user. So, login as oracle (if not logged in
already) and create a directory for installation packages. This can be anywhere we just have to remember that we
will require a few GBs of space for zipped installation packages and unzipped content. For example, this can be done
the following way:
root@turingsman:~# su - oracle
Oracle Corporation SunOS 5.11 11.1 September 2012
-bash-4.1$ pwd
/export/home/oracle
-bash-4.1$ mkdir orainstall
-bash-4.1$ cd orainstall
So, copy the installation packages to "orainstall" directory:
-bash-4.1$ cp /mnt/* orainstall/
Check we have both installation packages:
-bash-4.1$ ls
solaris.x64_11gR2_database_1of2.zip solaris.x64_11gR2_database_2of2.zip
We can now unzip both of them here:
-bash-4.1$ unzip /mnt/solaris.x64_11gR2_database_1of2.zip d
/export/home/oracle/orainst
-bash-4.1$ pwd
/export/home/oracle/orainstall
-bash-4.1$ ls -la
total 9
drwxr-xr-x 3 oracle oinstall 3 Dec 26 01:07 .
drwxr-xr-x 3 oracle oinstall 10 Dec 26 01:07 ..
drwxr-xr-x 8 oracle oinstall 10 Nov 24 2009 database
-bash-4.1$
Before I ran Oracle Universal Installer (OUI) from database directory for good, I did some additional changes in the
operating system. I installed JDK7 (with Add More Software tool available directly from the Gnome desktop). Also, I
installed SUNWmfrun package to avoid possible error about Motif libraries. You can do the same to stay compliant
with our exercise.
Also, some experts say that this is not required to export DISPLAY variable when OUI is executed locally. Well,
seems this statement is not true. I had to export DISPLAY variable to avoid OUI errors during initial prerequisites
check. This can be done with the following command from oracle user (Bash):
-bash-4.1$ DISPLAY=turingsman:0.0; export DISPLAY
That's all for now. We will continue with the Oracle Universal Installer in the part 5 of this series.
We will now install Oracle Database 11gR2 with Oracle Universal Installer, which we have successfully run in the end
of part 4 of this series. After Oracle Database 11gR2 binaries installation we will create and configure a database
instance with the dedicated tool Oracle Database Configuration Assistant (DBCA). Although, usually DBCA is run
in the last stage of OUI installation process, this is not a rule. If the Oracle database environment is configured
properly, we can run DBCA at any given moment to handle database instances in our system. Also, we can run
DBCA separately, if OUI reported some non-critical errors which prevented successful database creation as in our
case here.
Firstly, if OUI started successfully (passed all initial checks in the console mode), but then there was an error
message:
[INS-13001] Environment does not meet minimum requirements
This can mean two things. In fact, our system does not meet minimum requirements and we have to take care of this
issue. Maybe, it is enough to check the whole configuration and prerequisites fulfillment once again? Kernel
parameters? Patches? Is our operating system really supported by this version of Oracle Database 10gR2 (which
version, exactly)? It's possible that we forgot about something important which can still be more or less easily
handled.
However, things can be more enigmatic if we are sure that all the requirements are met or even exceeded. In such
case, the best option is to look for help on free OTN forums or paid My Oracle Support (MOS, previously known as
Metalink). There is a chance to get some help from Oracle experts available on the OTN forums but please note,
that due to the license requirements, it is prohibited to publish the information available via My Oracle Support on-line
service. All in all it's commercial, requires an user account to be created and assigned to the company's CSI number
(valid support contract is necessary).
Finally, to better understand what is going on we can generate the report in response file, by executing the following
command:
./runInstaller executePrereqs silent responseFile <responsefile>.rsp
Also, in some specific cases, when we are not installing a production environment, we can make a decision to go on
with the OUI, even if there was an error reported. Everything depends on type of error. Once again we can do a
little bit more in test environments, but in production environments such approach is not acceptable. We can even
skip the prerequisites checks and invoke OUI with the following command:
./runInstaller ignoreSysPrereqs
Although, prerequisites checking is our friend in most cases.
Once we ran OUI, we will see the following sequence of screens each one for each step of OUI.
The first step in OUI is to configure security updates. As we install in the test environment, we can skip this option.
Then, in the second step, we have to decide what we plan to do with the help of OUI. In our case we have to select:
"Create and configure a database" (this means that after OUI, there will be DBCA launched).
In the third step, let's select "Desktop class" database. This will make our live simpler and is more adequate to the
purpose of our exercise. We're only exploring the basics of standalone Oracle database installation, we don't think
about RAC (Realtime Application Cluster) or grid technologies.
Then, in step four, we have to provide all the required data very carefully. Please note, that if we change paths, we
will have to take care about ".bash_profile" file we created previously (see part 4 of this series). Therefore, let's copy
all the values from the screenshot presented below.
In step five we have to provide additional information path to Oracle Inventory (a place where installation files will
be copied) and oraInventory group name (a group which owns oraInventory directory). Sixth step is Prerequisite
Checks if skipped during launch of OUI, then it will not be performed.
Step seven provides the summary of all options we selected until now. We should refer to them and double-check
before going to the next step. Please note, that source location here is different than presented in part 4 of this
series. However, this is not an important difference everything depends on the fact where we unzipped our Oracle
Database 11gR2 installation disks and from which location we started OUI. So, this can be also different in your
specific case.
We can see that near the end of OUI installation process, DBCA tool is going to be started (database instance
creation).
Unfortunately, in our case DBCA failed to start. The reported reason is lack of seed database instance schema file
Seed_Database.dbf. This is not critical however, should be examined separately, if we cannot provide the required
file on-demand (in fact this error was generated due improper file copying operation between directories we will
cover this issue in more details later).
So, let's continue (OK > Skip). As we can see, Oracle DBCA step was ignored. That's OK. Now, OUI will ask us to
execute two scripts from the presented location. Please note, we have to use root role to execute these scripts under
Solaris 11.1. Also, it's worth to remember that this is the only moment in which Oracle requires us to work with root
role privileges during the whole OUI installation process.
Then, 100% of OUI installation process is completed (please note although, DBCA was skipped).
The last step ninth "The installation of Oracle Database was successful". However, the fun is yet to begin.
We will now continue with the DBCA Database Configuration Assistant in the next, sixth, part of this series. We
have to create general purpose database instance for the next planned exercises.
We will now run DBCA Database Configuration Assistant for our freshly installed Oracle 11gR2. This tool will help
us to create a database for our further explorations. Therefore, we will not go into the details of DBCA too much. Our
plan is to create the general purpose database. Also, we have to run this tool separately, because we skipped DBCA
step during Oracle Universal Installer installation process (see part 5). This was due to the lack of
"Seed_Database.dbf" which in fact can be found on the Oracle Database 11gR2 installation disks and was lost
during copying operation (on OTN forum some people claim that "Seed_Database.dbf" file can be lost during
unzipping operation unfortunately, no other details are provided). So, let's start.
First of all, we have to be sure, that our environment is properly configured especially, when it comes to the paths
etc. Check with the "env" command:
$ env
HZ=
SHELL=/bin/bash
TERM=xterm
LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0/dbhome_1/lib
ORACLE_SID=TURINGSMAN
ORACLE_BASE=/u01/app/oracle
MAIL=/var/mail/oracle
PATH=/usr/bin::/usr/local/bin:/u01/app/oracle/product/11.2.0/dbhome_1/bin
PWD=/export/home/oracle
LANG=en_US.UTF-8
SHLVL=1
HOME=/export/home/oracle
LOGNAME=oracle
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
_=/usr/bin/env
Export DISPLAY variable:
$ export DISPLAY=turingsman:0.0
Then we can execute DBCA with the following command of course, as an oracle user:
$ dbca
DBCA consists of 12 steps. In the first step we have to select: "Create a Database" option (other options are
unavailable, except "Manage Templates", because there is no database yet in our system).
Then we have to select type of our database in the second step: "General Purpose or Transaction Processing".
Please click "Show Details" button to see what database components are required for such type of database.
Step 3. We have to provide Global Database Name and SID (System Identifier) of our database.
Step 4. Leave the default values for "Enterprise Manager settings" and "Automatic Maintenance Tasks".
Step 5. However, this is not recommended especially in production environment (in fact, not allowed for security
reasons!) we can make things easier and set the same passwords for all administrative accounts (SYS, SYSTEM,
DBSNMP, SYSMAN). All in all, we're working in test environment and this is only a kind of reconnaissance. Also,
please note, that all passwords can be changed in the future. For now, we can go with less secure option let's set
the same password for all mentioned accounts.
Step 6. As it was mentioned before we've skipped DBCA step during OUI installation process because
"Seed_Database.dbf" file (database template file) was not found. This issue was reported several times by some
people here and there, including OTN forum. There were many suggestions on what to do, including manual
database creation (in my opinion a good challenge for experienced DBAs) or downloading Oracle Database 11gR2
installation disks once again from OTN. Well, maybe re-downloading is a good idea, if we're sure that our installation
disks became corrupted. The question is then how it was possible to install Oracle database from such installation
media to this moment? In my case, the most reasonable explanation is that after several copying operations
between volumes (including the issue with required disk resize operation etc.) I somehow lost this file. Therefore,
I decided to look into the Oracle installation disk for "Seed_Database.dbf". I found this file under the following
location (check inside disk 2):
D:\Pawel\OraSol\solaris.x64_11gR2_database_2of2.zip\database\stage\Components\oracle.r
dbms.install.seeddb\11.2.0.1.0\1\DataFiles\Expanded\filegroup1
So, I copied this file to the previously mounted /mnt/sf_OraSol directory on my Solaris virtual machine and told DBCA
(via "Browse" button) where it is. This was a good idea. No additional software downloading from DBCA, no hand
made database creation etc.
Step 7. Remember to select a proper database files location in our case: /u01/oradata.
Step 9. Yes, we should add sample schemas this will be very usable in our future exercises (especially, famous
Human Resources schema).
Step 10. Default values only remember to set Unicode for national characters encoding.
Step 11. Database Storage. Default values we will not change anything or add any file. Please only refer to the files
locations to be sure, that everything will be installed in the desired place (control files, data files and redo logs).
Step 12. Select "Crate Database" and click "Finish". "Confirmation" window will be opened just refer to all
presented database details to once again confirm all our decisions and click "OK". The database creation process
will be launched.
We have now created our first database, which includes exemplary schemas. In the next part we will verify that all
basic configuration files are defined correctly and we can easily operate our database with provided tools.
We had a short break after part 6 of this series. Believe it or not, there was a really important reason for me to stop
writing for a while although, this is quite a different story. Now, we're back to finish with our experiments with Oracle
Database 11gR2 on Solaris 11.1. What was really nice, during the last two months I received some emails and
comments with your suggestions and opinions on this series. Therefore, I would like to thank you all for positive
feedback and additional inspiration. Now, we can come back to work.
I hope our virtual machines are ready to be run again. Before we begin with additional experiments, it's good to know
which Oracle Database 11gR2 configuration files should be double-checked. Usually, if something is wrong with
these files, the overall Oracle database installation is not working properly or for example a listener or database
instance cannot be started. Also, we will present some basic administration tools for Oracle.
First of all, let's check listener.ora file. Please login to the oracle user account and execute the following command:
oracle@turingsman:~$ vi
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
TURINGSMAN =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = turingsman)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = TURINGSMAN)
)
)
LISTENER_TURINGSMAN =
(ADDRESS = (PROTOCOL = TCP)(HOST = turingsman)(PORT = 1521))
Also, always remember about .bash_profile file:
oracle@turingsman:~$ vi .bash_profile
Tool
Syntax
Purspos
e
This tool
is aimed
to
manage
Oracle
Databas
e listener
Selected
command
s
Example
(<comma
nd>)
Status
lsnrctl
Start
reload
Reload
Stop
Version
services
Exit
sqlpl sqlplus
us
[[username[/password]
[@service_name] | / [as
{sysdba|sysoper}]] |
/nolog]
process Quit
(in short Help
words:
without
working
listener it
won't be
possible
to
connect
to the
Oracle
database
instance)
This tool help
is
required
to
connect
with the
Oracle
database
from
comman
d line to
execute
SQL
statemen
ts
This tool
helps to
sqlplus
/nolog
help
tnsping
TURINGS
check if
given
Oracle
Net
service is
available
for
connecti
ons. If
connecti
on
succeed
ed,
tnsping
tool will
show
estimate
d time
required
for data
transmis
sion
between
client
and
server
side.
This tool
helps to
discover
the trace
of
MAN 4
trcrout
e
TURINGS
MAN
connecti
on
between
client
and
server
Let's have a short trip through the tools presented above. Imagine we have just logged in to our database server and
we want to start all the Oracle Database 11gR2 components by hand. Be sure we are using oracle account for
example:
pwawrzyn@turingsman:~$ su - oracle
Password:
Oracle Corporation SunOS 5.11 11.1 September 2012
-bash-4.1$
Then, run sqlplus:
-bash-4.1$ sqlplus /nolog
When sqlplus is started, execute the commands presented below (your commands are marked bold):
SQL*Plus: Release 11.2.0.1.0 Production on Sun Mar 10 20:02:10 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=turingsman)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Solaris Error: 146: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=extproc)))
TNS-12541: TNS:no listener
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=turingsman)(PORT=1521)))
STATUS of the LISTENER
-----------------------Alias
LISTENER
Version
Start Date
10-MAR-2013 20:22:12
Uptime
Trace Level
off
Security
SNMP
OFF
Now, let's try tnsping we're working on local machine, so it's not a best example, but anyway:
-bash-4.1$ tnsping TURINGSMAN 4
TNS Ping Utility for Solaris: Version 11.2.0.1.0 - Production on 10-MAR-2013 20:23:03
Copyright (c) 1997, 2009, Oracle. All rights reserved.
Used parameter files:
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = turingsman)
(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = TURINGSMAN)))
OK (20 msec)
OK (0 msec)
OK (0 msec)
OK (0 msec)
And finally, trcroute with the same remark like for tnsping we're on local machine:
-bash-4.1$ trcroute TURINGSMAN
Trace Route Utility for Solaris: Version 11.2.0.1.0 - Production on 10-MAR-2013
20:24:42
Copyright (c) 1995, 2009, Oracle. All rights reserved.
Route of TrcRoute:
-----------------Node: Client Time and address of entry into node:
------------------------------------------------------------10-MAR-2013 20:24:42 ADDRESS= PROTOCOL=TCP HOST=turingsman PORT=1521
Node: Server Time and address of entry into node:
------------------------------------------------------------10-MAR-2013 20:24:42 ADDRESS= PROTOCOL=TCP HOST=turingsman PORT=1521
If everything works similar way in your case, we can progress to the part 8 of this series. Finally, to summarize our
checkpoint here, we should remember that if something is not working properly, the most common reasons are
hidden in:
Improperly owned directories of Oracle installation (refer to the previous parts to check the guidelines on
chown command). Remember we're working on oracle user account. Root role is used very rare, mostly for
operating system purposes and not the Oracle Database itself with significant exception during Oracle Universal
Installer part, when we have to execute root.sh script from root account.
Improperly assigned rights to the Oracle installation directories please not only check you've applied chown
command on all required directories, but also use took care to use chmod command (refer to the part 4).
Improperly defined or not set and exported Oracle Database environment variables refer to the .bash_profile
(this part) and double check you have all required variables and correctly defined paths. If yes, but you can't for
example invoke the tools presented in this part, maybe you should reload .bash_profile or which is quite common
remember to use BASH (maybe you're using oracle account with different shell, like CSH?).
Errors in the configuration files usually, for basic Oracle Database 11gR2 configuration, we should check the
files presented here (listener.ora, tnsnames.ora).