Friday, September 28, 2012

Configure Solaris 10 DNS client

Let’s get started!

I just got my brand new Solaris 10 server, but somehow although I have a DNS server in my domain, it cannot resolve any names given.  What’s wrong?

We have to first check the existence of some files and the status of the DNS client service.

So, first thing to do:  check the service

# svcs -a | grep dns
 
disabled     XX:XX:XX    svc:/network/dns/server:default
disabled     XX:XX:XX    svc:/network/dns/client:default



Then, let’s check the files.


Does the resolver configuration file exists? Try to see its contents with the following command.



# cat /etc/resolv.conf
 
cat: cannot open /etc/resolv.conf

Let’s then, create the file and edit it to add our name servers.



# touch /etc/resolv.conf
 
# vi /etc/resolv.conf

Add some lines with the following format



domain somedomain.com
nameserver 10.11.12.13
nameserver 14.15.16.17
nameserver 18.19.20.21
search firstdomain.com,seconddomain.com,thirddomain.com

where domain is the domain to look for as default, nameserver is the IP of each name server we have (up to three) and search is the domains that must be added as sufix to the name to look for if none was given.


That’s it with the resolver.  Now, we should go check the naming service switch file, /etc/nsswitch.conf


If you look for some nssswitch file in the /etc directory you’ll find that there are several templates already configured for your use. So backup your current file and replace it with the nsswitch.dns file provided.



# cp /etc/nsswitch.conf /etc/nsswitch.orig
 
# cp /etc/nsswitch.dns /etc/nsswitch.conf

Once you’re done.  Enable the dns client service and check again its status



# svcadm enable /network/dns/client
 
# svcs -a | grep dns
disabled    XX:XX:XX    svc:/network/dns/server:default
online      XX:XX:XX    svc:/network/dns/client:default
 

And welcome to the naming world, Solaris 10.


Hope this helps some of you.

Tuesday, January 24, 2012

Configuring EM DB Console manually

Welcome, for the DBAs out there, any tool that helps understand the  metrics of the DB performance faster is a helping hand in his daily job, the Enterprise Manager (EM) is no exception to this rule.

For the Oracle Database 10g and over, the EM can be automatically configured during the installation using the Oracle Universal Installer (OUI).  Depending on a variety of circumstances, this installation/configuration may fail, and thus we will have to create, or recreate the EM repository and configuration manually, by using the Enterprise Manager Configuration Assistant.

Contrary to what many of you would expect, the EMCA is not a GUI tool, but a command-line tool and thus, it can take us some time to read the entire list of options and clauses that can be added to the command in order to fulfill the task of configuring the EM and creating the necessary repository within the Oracle instance.

So, here you go.  The basic instructions you’ll need to create or recreate your repository and configure the EM are these:

emca –repos drop

emca –repos create

emca –deconfig dbcontrol db

emca –config dbcontrol db

But be sure to have the complete information of your instance because you will need it to fill the blanks when running these commands.  You’ll need: SID, port, password for sysdba and/or sysoper accounts.

If you are still having trouble, check your time zone settings.  For linux, the TZ environment variable should be set and it must match the line agentTZRegion within the EMD.properties file.

Hope this can help you out there.

All your comments are welcome.