Thursday, September 8, 2011

AV server is expecting an agent with the given name to be installed on another machine

Problem Description
It was done following things.

1) Install Audit Vault Server (10.2.0.3) on a Red Hat Linux 64 bit Server.

2) post-installation tasks was completed.

3) On the client Windows machine "Audit Vault Agent" Installer is invoked. After I run the installer it asks me following things

a) Audit vault Agent Name
b) Aduit Vault Agent Home
c) Agent Username
d) Agent Password
e) Audit Vault Server Connect String (Provide the Database details as mentioned in Audit Vault Server (server_name:port:servicename)

and when I click on the next button it throws the following error:

"error1: the AV server is expecting an agent with the given name to be installed on another machine".

Note that, I am able to ping from Windows to Linux machine and Vice versa (By IP Address).

In the server it was added agent using following command.
[oracle@rac1 ~]$ avca add_agent -agentname avagent2 -agenthost 192.168.8.5 -agentusr avagent
AVCA started
Adding agent... 
Enter agent user password:          
Re-enter agent user password:          
Agent added successfully.
Cause ans Solution of the Problem
Though agent is created in the server but there is problem with the agent host IP address. Agenthost must be the hostname or IP Address of agent not Audit vault server. Here 192.168.8.5 is the IP Address of Aduit Vault server and agent client IP address is 172.15.10.33. So add an agent as following:
[oracle@rac1 ~]$ avca add_agent -agentname avagent4 -agenthost 172.15.10.33 -agentusr avagent
AVCA started
Adding agent... 
Agent added successfully.

Now use this avagent4 agent name of agent installation.

Wednesday, September 7, 2011

Ora-29257 When Trying to Use UTL_INADDR to Get IP Address or Host Name of a Server

Problem Description
When using either the get_host_address() or get_host_name() function of the UTL_INADDR package to get host information, an ORA-29257 error is returned like below:
ORA-29257: host notebook unknown
ORA-06512: at "SYS.UTL_INADDR", line 19
ORA-06512: at "SYS.UTL_INADDR", line 40
For example while installation Audit Vault Agent it fails with following error:
Error1: SQL Error: ORA-29257: host notebook unknown
ORA-06512: at "SYS.UTL_INADDR", line 19
ORA-06512: at "SYS.UTL_INADDR", line 40
ORA-06512: at "AVSYS.DBMS_AUDIT_VAULT_AGENT_INSTALL" line 55
ORA-06512: at line 1
Cause of the Problem

The functions in the UTL_INADDR package are essentially using the 'nslookup' command behind the scenes and the nslookup command uses the specified dns server to get the information. If you test the nslookup command and it fails then there is a configuration issue on the host machine and it has nothing to do with the the Oracle Database server. On unix machines, the /etc/resolv.conf identifies the DNS server to be used.
Solution of the Problem
Modify the /etc/resolv.conf to configure the DNS server resolution and once nslookup works, so will the UTL_INADDR package. Note that you must have DNS server in this case and the corresponding hostname must resolve DNS.

If you don't have DNS server you can use /etc/hosts file and add the entry of the host and IP address which is unknown.

For example:
# vi /etc/hosts

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain   localhost
::1     localhost6.localdomain6 localhost6
172.15.10.33 notebook

What is difference between Flash Recovery Area and Flashback Database

About Flash Recovery Area
The flash recovery area is a directory on the storage that provides a centralized disk location for backup and recovery files. The directory location is specified by parameter DB_RECOVERY_FILE_DEST and the size of the recovery area is defined by parameter DB_RECOVERY_FILE_DEST_SIZE. If log_archive_dest_* is set to USE_DB_RECOVERY_FILE_DEST then Oracle creates archived logs in the flash recovery area. RMAN can also store its backups in the flash recovery area ( and stores the backups in FRA by default), and it uses it when restoring files during media recovery.

All files necessary to recover the database following a media failure are located in the flash recovery area ( if defined ).

The flash recovery area also acts as a disk cache for tape. The recommended strategy is store the backups in the FRA, to have more recent backups available on disk, then the backup and restore processes will be faster.

About Flashback Database

Flashback database is a new feature introduced in 10g.

It provides a way to quickly revert entire Oracle database to the state it was in at a past point in time. Also it is possible to bring a single table back in time.

Flashback database is different from traditional point in time recovery. To Flashback a database, Oracle uses older block images to back out changes to the database, what means that the oracle blocks are being overwritten for its before images to bring the database back in time.

If flashback database feature is enabled, during normal database operation, Oracle creates the Flashback logs, where the before image of the database blocks is stored previously to applying any change in this database blocks.

The following recovery-related files are stored in the flash recovery area:

-- Current control file
-- Online redo logs
-- Archived redo logs
-- Flashback logs
-- Control file autobackups
-- Datafile and control file copies
-- Backup pieces
-- Foreign archived redo log ( An archived redo log received by a logical standby database for a LogMiner session.)

Oracle automatically creates, deletes, and resizes Flashback logs in the flash recovery area. You only need to be aware of Flashback logs for monitoring performance and deciding how much disk space to allocate to the flash recovery area for Flashback logs.

Flashback Database is not true media recovery, because it does not involve restoring physical files. However, Flashback is preferable to using the RESTORE and RECOVER commands in some cases, because it is faster and easier, and does not require restoring the whole database.

You can limit the number of flashback logs stored by defining the parameter:

- DB_FLASHBACK_RETENTION_TARGET (dynamically modifiable) which defines the upper limit in minutes on how far back one can flashback the database.

Note that, you cannot manually delete the flashback logs, you need to turn flashback database off to delete the flashback logs.