Dear
Readers,
My
name is Franz Devantier, creator of this blog. I am an Oracle Certified
Professional (OCP DBA 11g) Security DBA.
I will be sharing with you the basic duties of an Oracle DBA, and also
some of the undocumented, and not so well known tasks.
I will make a deal with you: If you refer me to a company that needs
database support, from a few hours per week to full time, and I am able to sign
a contract with them.
Then I will give you 10% of the monthly
contract or deal price every month. When
the contract ends, and we re-sign the contract, I will again give you 10% of
the monthly contract price. This will go
on until the company no longer employs or contracts me or my agents to look
after their databases.
I can do this, because that 10% is my
marketing budget. When we re-sign the
contract, in the future, it may depend on you giving the thumbs up again, and
that is worth 10% of the monthly contract price, to be given to you as
commission.
Oracle
Database Preinstallation – Part 6
Ephemeral Ports
This is a short lived transport
protocol port for Internet Protocol (IP) communications, which is automatically
allocated from a predefined range by the TCP/IP software. Ephemeral ports are used by Transmission
Control Protocol (TCP), User Datagram Protocol (UDP), or Stream Control
transmission Protocol (SCTP), as the port assignment for the client end of a
client server communication, to a well-known port on a server.
On servers, ephemeral ports may be
used as the port assignment on the server end of a communication. This may be done to continue communications
with a client that initially connected to one of the server’s well-known
service listening ports. File Transfer
Protocol (FTP) and Remote Procedure Call (RPC) applications are tow protocols
that can behave in this way. By servers
we include workstations that are running services and receive connections,
initiated by other clients, such as Remote Desktop Protocol (RDP). Ephemeral port allocations are temporary, and
only valid for the duration of the communication session. When the communication session completes, the
port will again become available for reuse, which is why they are also called
dynamic ports.
The
Internet Assigned Numbers Authority (IANA) suggests the range of 49152 to 65535
for these dynamic or ephemeral ports.
Most Linux kernels use the port range of 32768 to 61000, with the
exception of “FreeBSD release 4.6”, which uses the IANA port range. Previous versions of Berkeley Software
Distribution (BSD), used the port range of 1024 to 5000 as ephemeral ports.
Microsoft
windows up to and including the XP operating system, use the port range of 1025
to 5000 as ephemeral ports by default.
Windows server 2003 also uses the port range of 1025 to 5000 by default
as ephemeral ports. From Windows Vista
onwards, and Server 2008 onwards, windows uses the IANA range by default as
ephemeral ports. In addition to the
default ephemeral port range, all versions of Microsoft since Windows 2000,
allows the use of a non-default port range of 1025 to 65535 to be used as
ephemeral ports. There is a popular misconception
in Microsoft circles that 1025 to 65535 is the default or in fact required
range for ephemeral ports, so watch out for that one.
Verify UDP and TCP Kernel Parameters
You
need to have some idea of the anticipated server workload, so that you can set
enough ephemeral ports to cater for the anticipated workload. If you are not going to set it to the IANA
range, then at least make sure that the lower range is set to at least 9000 or
higher. In this way you will be avoiding
well known ports. You need to be out of
the port range that is commonly used by oracle, and other services. You definitely want to avoid becoming
entangled with reserved ports, with your ephemeral port ranges. If you are confident that your lower range of
your ephemeral ports is at least 9000, and you have a large enough range to
cater for the expected workload, then you can ignore the warnings generated by
Oracle Universal Installer (OUI) with regards to your ephemeral port range.
If
you are using IPV4 for example, you can check your current range of ephemeral
ports something like this:
$
cat /proc/sys/net/ipv4/ip_local_port_range
32768
61000
From this you can see that the
ephemeral ports are set to the default Linux port range. If it is necessary you can update the UDP and
the TCP ephemeral port range to values that are suitable for the anticipated
system workloads; emsuring that the ephemeral port range starts at a minimal of
9000. Be careful with the below command
because it will overwrite the ip_local_port_range file.
$ echo 9000 65500 > /proc/sys/net/ipv4/ip_local_port_range
Oracle recommends that you
should make these setting permanent, so that after rebooting, you still have
the same ephemeral port configuration.
As the root user, you can open /etc/sysctl.conf. If the values are not suitable, then you can
add or change the following entry.
net.ipv4.ip_local_port_range =
9000 65500
After making this change you
must restart the network:
$ /etc/rc.d/init.d/network
restart
You can also refer to your
Linux distribution system administration documents, for the information about
automating the ephemeral port ranges over system restarts.
Installing the
cvuqdisk Package for Linux
Next you need to decide
whether you are going to enable or disable the Cluster Verification Utility for
shared disk checks.
However firstly you will need
to install the operating system package cvuqdisk. Without this the Cluster Verification Utility
(CVU) cannot find the shared disks, and when you run the CVU utility, you will
get this error. “Package cvuqdisk not installed”.
Make sure that you use the cvuqdisk RPM package that matches your
hardware, for example x86_64 or i386.
If you are going to disable
the CVU, then you don’t need to install the package, and you can disable it
like this:
$ vi $ORACLE_HOME/cv/admin/cvu_config
And add this line to the
file:
CV_RAW_CHECK_ENABLED=FALSE
Below is an example of the
steps that you could go through to install the cvuqdisk rpm package.
=> Either download or
locate the package on the installation media, or if you installed the Oracle
Grid Infrastructure it will be in $ORACLE_HOME/cv/rpm
=> log in as root or
switch user to root
=> Check if there is an
existing version already installed.
$ rpm -qi cvuqdisk
=> If there is an existing
version, then first deinstall it.
$rpm -e cvuqdisk
=> Set your environment
variable CVUQDISK to point to the group that owns cvuqdisk, which would be “oinstall”
or “oracle”,
$ CVUQDISK_GRP=oinstall; export
CVUQDISK_GRP
=> Now you can change to
the directory, where the cvuqdisk rpm package resides and install it.
$ rpm -iv cvuqdisk-1.0.9-1.rpm
You are done.
Checking the
Network Setup
Usually the computer that you
are installing the Oracle Database is connected to the Network. Typically it will have local storage to hold
the Oracle database installation. It will
also have a display monitor, and a DVD drive.
In this case the installation is fairly straight forward, once you have
verified the pre-requisites. However not
all computers that we need to install Oracle on, are set up in this way.
Installing on
DHCP Computers
Dynamic Host Configuration
Protocol (DHCP) assigns dynamic IP addresses on a network. Dynamic addressing
enables a computer to have a different IP address each time it connects to the
network. In some cases, the IP address can change while the computer is still
connected. On a DHCP system, you can have a mixture of static and dynamic IP
addresses.
The DHCP software tracks the IP
addresses, which helps with the network administration. With setup, you can add
a new computer to the network, without manually assigning an IP address to the
newly added computer.
Installing on
Multihomed Computers
A Multihomed computer is one
which contains multiple IP addresses.
Typically the computer would have multiple network cards on the
computer. Each IP address is associated
with a host name. Of course you can also
set up aliases for each of the host names.
OUI by default uses the ORACLE_HOSTNAME environment variable to find the
host name. Ok, but what if ORACLE_HOSTNAME
is not set, for whatever reason? Then
OUI will determine the host name from the /etc/hosts file. These are the two places to look if you need
to do some trouble shooting.
Clients who need to connect
to the computer will need to connect using the host name or by using one of the
aliases. To verify that this mechanism is
working, you can ping the host name from a client computer with the short name,
which is the host name only. Then you
can try the long name, which is the host name and the domain name
together. Both of these test must be
successful.
You can install Oracle
Database on a multihomed computer. A multihomed computer is associated with
multiple IP addresses. This is typically achieved by having multiple network
cards on the computer. Each IP address is associated with a host name. In
addition, you can set up aliases for the host name. By default, Oracle
Universal Installer uses the ORACLE_HOSTNAME environment variable setting to find the host name. If ORACLE_HOSTNAME is not set and you are
installing on a computer that has multiple network cards, then Oracle Universal
Installer determines the host name from the /etc/hosts file.
Clients must be able to
access the computer either by using this host name or by using aliases for this
host name. To verify, ping the host name from the client computers using the
short name (host name only) and the full name (host name and domain name). Both
tests must be successful.
Setting the
ORACLE_HOSTNAME Environment Variable
In the Bourne, Bash, or Korn
shell (Hopefully you will be using the Bash shell, because it is the latest)
$
ORACLE_HOSTNAME=hostname.domain.example.com
$ export ORACLE_HOSTNAME
Or more simply
$ export ORACLE_HOSTNAME=hostname.domain.example.com
If for some reason you insist
on using the C shell.
$ setenv ORACLE_HOSTNAME=hostname.domain.example.com
Keep in mind that this configuration
will only last for the duration of your shell.
You may consider setting up this variable in your .profile file, when
you log in as oracle or oinstall for example.
Or configuring it, when you source the environment.
Installing on
Computers with Multiple Aliases
Sometimes a computer can have
multiple aliases, which all resolve to the same IP address. It is best to set the ORACLE_HOSTNAME
environment variable to the computer name, and not to one of the aliases. Make sure before you start the installation,
by doing a ping over the network, to see if you can see the computer.
Installing on
Non-Networked Computers
You can of course install the
Oracle database on a computer that is not connected to a network. If such a computer, for example a laptop is
configured for DHCP, and you do plan to connect to a network after the installation. Then before you start, you must verify that
the computer can connect to itself, by running a ping command to the computer
that you are on. Ping for only the host
name, and then for the host name plus the domain name, which is the fully
qualified name. The fully qualified name
should be in the /etc/hosts file. The
ping command should be returning the IP address of the computer that you are
on. If the ping command fails, then you
need to resolve this issue, possibly with the system administrator, before you
continue with the installation.
Otherwise after the installation, you may not be able to connect to the
network, and the exercise may not have been a productive one.
Connecting the
Computer to the Network after Installation
Now you should be able to
connect to a network, after you have completed the Oracle Database installation. Typically this network connectivity is
essential, to facilitate the running of the application etc, unless it is a
very small installation, with the application, database, and user or users all
connecting directly to the one computer.
The computer should be able to use a static IP address or DHCP,
depending on the network that you connect to.
Franz
Devantier,
Need
a database health check?
devantierf@gmail.com
Classifieds
No comments:
Post a Comment