Showing posts with label Oracle 11G. Show all posts
Showing posts with label Oracle 11G. Show all posts

Friday, 6 July 2012

Grid control agent 11G on 10G grid control

I have being busy keeping my nose to the grindstone with nothing interesting to blog about, that is until I came across this head- scratcher of a problem. For a little history: I have a very enthusiastic developer who's as willing as me to try new (relatively) technology.

In a bid to move along with the times, we are testing out SOA suite on an 11G database. Now the easy bit was installing an 11G database and pointing the new SOA at it and creating all the relevant schemas and tablespaces.

As a DBA who prefers working smart to hard, I decided to point the database at the grid control host. This is were it begins to get interesting, as you all know, there are various methods of installing the grid agent;
  1. A push method from grid control. I ruled this out because I wanted an 11g agent. 
  2. An installation using OUI. This is not supported in 11G 
  3. A silent installation. Eureka, just what I wanted (not really), but I had no choice.
So I go along with the silent install:

./runInstaller -silent -responseFile /location of response file

For the less than observant this is after downloading the installables and unzipping the files(if you are as unlucky as me you will need to get the unzip utility from the IBM download page and install it. fun days).
Someone mentioned on some forum that Oracle enjoys making life difficult for people still running their RDBMSs on AIX. I am an example of this. Moving on...

So everything seems to be working (considering), until I hit some errors: 

WARN  http: nmehl_connect_internal: connect failed to (dbnew-test.3872): Connection refused (error = 79)
2012-07-04 13:32:01,083 Thread-1 ERROR main: nmectla_agentctl: Error connecting to https://dbnew-test:3872/emd/main/. Returning status code 1

Now at this point I did what any experienced DBA would do (hello Google). I got a few hits which after reviewing had nothing to do with my errors (or so i thought).

I ploughed ahead regardless. 

Trying to reconfigure, stop and start the agent, secure the agent, upload the agent:

./agentca -f -i /etc/oraInst.loc
./emctl start agent
./emctl stop agent
./emctl status agent
./emctl secure agent 
./emctl unsecure agent-----When I unsecured the agent the agent started but no connection to the repository.
./emctl upload agent

All along I had been barely reviewing one or two of the logs that were generated while I was going through this routine of mine over and over again. At some point I even re-installed the agent. No luck, same errors

I finally decided to take a closer look at the logs, and hey presto:

:Property 'agentTZRegion' is missing from /u022/location.

So while I was busy running mental, all I had to do was take a better look at my logs and the solution would have being staring me in the face.

So I:

./emctl config agent getTZ

realized the timezone was exactly what was in the emd.properties. 

./emctl resetTZ agent

On the grid/EM repository run the following(depending on your TZ settings)

SQL> exec mgmt_target.set_agent_tzrgn('':'','Etc/GMT+1')
SQL> commit


Now go on and multiply (start the agent).

This worked like a charm for me.

Good luck with the fix fellas. I'll be happy as always to answer any questions.


Wednesday, 14 March 2012

Changing an IP address SCAN listener and VIP in Oracle 11G


This is a quick and dirty way to modify the SCAN listener, Public IP and Virtual IP for an Oracle 11G
database

This change was carried out on Linux OS but is applicable to most *nix
As Grid owner
 . oraenv
/oifcfg getif 
crsctl stat res -t
srvctl stop instance -d testdb -i testdb1
srvctl stop instance -d testdb -i testdb2

* If CRS is on ASM disks shutdown CRS first as root on both nodes -- crsctl stop crs

srvctl stop asm -n plrac2 -f
crsctl stat res -t
srvctl disable database -d testdb
srvctl disable nodeapps


Modify /etc/hosts
ifdown eth0
modify ip address: vi /etc/sysconfig/network-scripts/ifcfg-eth0
ifup eth0
confirm changes: ifconfig -a

========================================================================

SCAN Listener:

AS grid owner
$ ./srvctl stop scan_listener
$ ./srvctl stop scan
$ ./srvctl config scan

$ ./srvctl remove scan_listener -f

$ exit
exit
#./srvctl remove scan -f
#./srvctl add scan -n plrac_cluster
#./srvctl config scan

#su oracle
$ ./srvctl add scan_listener -p 1521
$ ./srvctl config scan

===============================================================================
As root
srvctl modify nodeapps -n plrac1 -A plrac1/255.255.255.0
srvctl modify nodeapps -n plrac2 -A plrac2/255.255.255.0
./srvctl config scan

verify the changes:
 srvctl config nodeapps -a
./srvctl config scan



as root:
srvctl enable nodeapps
srvctl enable database -d testdb



as grid owner:
srvctl start vip -n plrac1
srvctl start vip -n plrac2

srvctl start instance -d testdb -n plrac1
srvctl start instance -d testdb -n plrac2