Saturday, December 10, 2011

PLS-00201: identifier 'DVSYS.SYNCHRONIZE_POLICY_FOR_OBJECT' must be declared

Problem Description
In the audit vault server database in the alert log I see the following error message.
Errors in file /u01/oracle/product/10.2.3/av_1/admin/av/bdump/av_j002_9157.trc:
ORA-12012: error on auto execute of job 89
ORA-06550: line 1, column 97:
PLS-00201: identifier 'DVSYS.SYNCHRONIZE_POLICY_FOR_OBJECT' must be declared
ORA-06550: line 1, column 97:
PL/SQL: Statement ignored
Trace file reports following entries.

*** SERVICE NAME:(SYS$USERS) 2011-12-11 11:55:52.892
*** SESSION ID:(203.673) 2011-12-11 11:55:52.892
*** 2011-12-11 11:55:52.892
ORA-12012: error on auto execute of job 89
ORA-06550: line 1, column 97:
PLS-00201: identifier 'DVSYS.SYNCHRONIZE_POLICY_FOR_OBJECT' must be declared
ORA-06550: line 1, column 97:
PL/SQL: Statement ignored
*** 2011-12-11 11:56:03.038
*** ACTION NAME:(GATHER_STATS_JOB) 2011-12-11 11:56:03.038
*** MODULE NAME:(DBMS_SCHEDULER) 2011-12-11 11:56:03.038
*** SERVICE NAME:(SYS$USERS) 2011-12-11 11:56:03.038
*** SESSION ID:(203.675) 2011-12-11 11:56:03.038
ORA-01031: insufficient privileges
*** 2011-12-11 11:56:03.038
GATHER_STATS_JOB: GATHER_TABLE_STATS('"AVSYS"','"AV$METRICS"','""', ...)
ORA-01031: insufficient privileges
*** 2011-12-11 11:56:03.137
GATHER_STATS_JOB: GATHER_TABLE_STATS('"AVSYS"','"AV_NOTIFICATION_TEMPLATES"','""', ...)
ORA-01031: insufficient privileges
*** 2011-12-11 11:56:03.159
GATHER_STATS_JOB: GATHER_TABLE_STATS('"AVSYS"','"AV_LANG_MAP"','""', ...)
ORA-01031: insufficient privileges
*** 2011-12-11 11:56:03.164
GATHER_STATS_JOB: GATHER_TABLE_STATS('"AVSYS"','"AV_EXCLUDE_COLS"','""', ...)
ORA-01031: insufficient privileges
*** 2011-12-11 11:56:03.372
GATHER_STATS_JOB: GATHER_TABLE_STATS('"AVSYS"','"AV_ALERT_STATUSES"','""', ...)
ORA-01031: insufficient privileges
*** 2011-12-11 11:56:03.378
GATHER_STATS_JOB: GATHER_TABLE_STATS('"AVSYS"','"AV$POLICY_RETRIEVAL_STATUS"','""', ...)
ORA-01031: insufficient privileges
*** 2011-12-11 11:56:03.384
GATHER_STATS_JOB: GATHER_TABLE_STATS('"AVSYS"','"AV$UE_RETRIEVAL_STATUS"','""', ...)
ORA-01031: insufficient privileges
*** 2011-12-11 11:56:03.389
GATHER_STATS_JOB: GATHER_TABLE_STATS('"AVSYS"','"AV$UE_LABEL"','""', ...)
ORA-01031: insufficient privileges
*** 2011-12-11 11:56:03.395
GATHER_STATS_JOB: GATHER_TABLE_STATS('"AVSYS"','"AV$UE_SNAPSHOT"','""', ...)
ORA-01031: insufficient privileges
*** 2011-12-11 11:56:03.399
GATHER_STATS_JOB: GATHER_TABLE_STATS('"AVSYS"','"AV$UE_SNAPSHOT_LABEL_MAPPING"','""', ...)
ORA-01031: insufficient privileges
 Too many errors...  Rest of the erros are not reporded.

Cause of the Problem
Oracle is extremely buggy product and their audit vault has so many bugs too. This issue is also an Oracle bug. This will fire whenever you upgrade the AV RDBMS from 10.2.0.3.0 to 10.2.0.4.0. During the upgrade of Audit Vault database server the job dvsys.synchronize_policy_for_object is not dropped and this bug fires. Whenever you query what column on the table dba_jobs you will find similar entries like below:

SQL> select what from dba_jobs where SCHEMA_USER = 'DVSYS';

WHAT
--------------------------------------------------------------------------------
 dvsys.synchronize_policy_for_object('TABLE','AVSYS','AV$RADS_MRG_20111128');
 dvsys.synchronize_policy_for_object('TABLE','AVSYS','AV$RADS_MRG_20111201');
 dvsys.synchronize_policy_for_object('TABLE','AVSYS','AV$RADS_MRG_20111202');

Solution of the Problem
You can simply ignore the error as from my experience I saw these error will not hurt to Audit Vault.
Otherwise, you can simply delete the job manually.

Rumana Monzur (Teacher of DU) exclusive photo with her boy friend.

Some incident make me sad, some incident make me cry and there is some incident which will make you dumb. Such incident or you can say such severe accident happened in Bangladesh between two so called educated man and woman. The end result is Sayed (Rumana's Husband) is killed and Rumana lost her eyes. To kill a man will make you speakless after you see these exclusive images of Rumana.

According to me the culprit is Rumana Monzur (রুমানা). The situation started when Rumana started to love and have sex several times with her Irani boyfriend. In Canada Rumana started to have live together with her Irani Boyfriend Naved and both of them have sex. Here goes their exclusive photos. And love letter is attached as jpegs both in english and bengali.









Friday, December 9, 2011

ERROR: could not get AV admin connection using jdbc:oracle:oci:@av

Problem Description
While adding source database for audit vault configuration it fails with ORA-12541: TNS:no listener like below. Though connection to source database from audit vault server is successful.
[oracle@av-mrp ~]$ avorcldb add_source -src 192.168.0.73:1522:BDDIPLOC -srcname RAJSHAHI -desc 'Rajshahi RPO'
Enter Source user name: src
Enter Source password:
ERROR: could not get AV admin connection using jdbc:oracle:oci:@av
ERROR: java.sql.SQLException: ORA-12541: TNS:no listener

Cause of the Problem
The problem is due to the listener is not started in audit vault server database. Though source database listener is on. If Audit vault server database is not started you might face similar issue as well.

Solution of the Problem
Connect to the audit vault server database and start the database and listener.
[oracle@av-mrp ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.3.0 - Production on Fri Dec 9 14:25:49 2011

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area  536870912 bytes
Fixed Size                  2074080 bytes
Variable Size             197134880 bytes
Database Buffers          331350016 bytes
Redo Buffers                6311936 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining
and Oracle Database Vault options
[oracle@av-mrp ~]$ lsnrctl start
Once listener is started now add the source database.
[oracle@av-mrp ~]$ avorcldb add_source -src 192.168.0.73:1522:BDDIPLOC -srcname RAJSHAHI -desc 'Rajshihi RPO'
Enter Source user name: src
Enter Source password:
Adding source...
Source added successfully.
source successfully added to Audit Vault

remember the following information for use in avctl
Source name (******rcname): RAJSHAHI
Storing user credentials in wallet...
Create credential oracle.security.client.connect_string3
done.

Function AV_TRUNCATE_CLOB does not exist in source database

Problem Description
After installing patchset 10.2.3.2.0 on the Agent Oracle Home the DBAUD Collectors do not start anymore or does not collect audit data. The following errors may be seen in the collectors' log files:
INFO @ '09/12/2011 11:04:30 06:00':
Could not call Listener, NS error 12541, 12560, 511, 2, 0
INFO @ '09/12/2011 11:04:31 06:00':
Could not call Listener, NS error 12541, 12560, 511, 2, 0
INFO @ '09/12/2011 11:04:31 06:00':

             ***** Started logging for 'AUD$ Audit Collector' *****


INFO @ '09/12/2011 11:04:31 06:00':
     ***** Collector Name = DBAUD_Collector

INFO @ '09/12/2011 11:04:31 06:00':
     ***** Source Name = BARISHAL

INFO @ '09/12/2011 11:04:31 06:00':
     ***** Av Name = AV

INFO @ '09/12/2011 11:04:31 06:00':
     ***** Initialization done OK

INFO @ '09/12/2011 11:04:31 06:00':
     ***** Starting CB

INFO @ '09/12/2011 11:04:31 06:00':
Getting parameter |AUDAUDIT_DELAY_TIME|, got |20|

INFO @ '09/12/2011 11:04:31 06:00':
Getting parameter |AUDAUDIT_SLEEP_TIME|, got |5000|

INFO @ '09/12/2011 11:04:31 06:00':
Getting parameter |AUDAUDIT_ACTIVE_SLEEP_TIME|, got |1000|

INFO @ '09/12/2011 11:04:31 06:00':
Getting parameter |AUDAUDIT_MAX_PROCESS_RECORDS|, got |1000|

INFO @ '09/12/2011 11:04:31 06:00':
     ***** CSDK inited OK + 1

INFO @ '09/12/2011 11:04:31 06:00':
     ***** Src alias = SRCDB3
INFO @ '09/12/2011 11:04:31 06:00':
     ***** SRC connected OK

INFO @ '09/12/2011 11:04:32 06:00':
     ***** SRC data retrieved OK

WARNING @ '09/12/2011 11:04:32 06:00':
Function AV_TRUNCATE_CLOB does not exist in source database
INFO @ '09/12/2011 11:04:32 06:00':
     ***** Recovery done OK

Cause of the Problem
In the source database the latest version of script zarsspriv.sql was not run.
For example you had configured the source database using a release earlier than the latest release of Oracle Audit Vault. Now you have upgraded the Oracle Audit Vault agent but still source database using older zarsspriv.sql script.

Solution of the Problem
1) Set the environment variables for the source database

2) Connect as SYSDBA

3) Run script zarsspriv.sql from the latest patchset of audit vault agent:

SQL> @/AVAgentORACLE_HOME/av/scripts/streams/source/zarsspriv.sql srcusr SETUP

Error executing task start_collector: Internal Collector NOAKHALI:DBAUD_Collector Error

Problem Description'
While starting collector in Oracle Audit Vault configuration it fails with following error.
[oracle@av-mrp ~]$ avctl start_collector -collname DBAUD_Collector -srcname NOAKHALI
AVCTL started
Starting collector...
Error executing task start_collector: Internal Collector NOAKHALI:DBAUD_Collector Error

From Oracle Audit Vault EM Console from Audit Error History we notice following error.
On line 7662: ORA-12154: TNS:could not resolve the connect identifier specified

After opening the DBAUD_Collector log we notice similar entry.
$ less /u01/oracle/product/10.2.3/avagent_1/av/log/DBAUD_Collector_NOAKHALI_2.log


INFO @ '09/12/2011 08:58:50 06:00':
Could not call Listener, NS error 12541, 12560, 511, 2, 0
INFO @ '09/12/2011 08:58:50 06:00':
Could not call Listener, NS error 12541, 12560, 511, 2, 0
INFO @ '09/12/2011 08:59:50 06:00':
Could not call Listener, NS error 12541, 12560, 511, 2, 0
INFO @ '09/12/2011 09:00:50 06:00':
Could not call Listener, NS error 12541, 12560, 511, 2, 0
INFO @ '09/12/2011 09:01:50 06:00':
Could not call Listener, NS error 12541, 12560, 511, 2, 0
INFO @ '09/12/2011 09:02:50 06:00':
Could not call Listener, NS error 12541, 12560, 511, 2, 0
INFO @ '09/12/2011 09:03:50 06:00':
Could not call Listener, NS error 12541, 12560, 511, 2, 0
INFO @ '09/12/2011 09:04:50 06:00':
Could not call Listener, NS error 12541, 12560, 511, 2, 0
INFO @ '09/12/2011 09:05:50 06:00':
Could not call Listener, NS error 12541, 12560, 511, 2, 0

Cause of the Problem
The problem arises as "avorcldb setup" was not run against the Agent before starting the Collector. "avorcldb setup" is a mandatory step in order to configure Oracle Audit Vault which is discussed in http://arjudba.blogspot.com/2011/09/step-by-step-oracle-audit-vault.html Step 02: Setup Agent for Source Database Connectivity.

Solution of the Problem
Set environmental variable to agent. Now run the following
[oracle@av-mrp ~]$ avorcldb setup -srcname NOAKHALI
Enter Source user name: src
Enter Source password:
adding credentials for user src for connection [SRCDB2]
Storing user credentials in wallet...
Create credential oracle.security.client.connect_string4
done.
updated tnsnames.ora with alias [SRCDB2] to source database
verifying SRCDB2 connection using wallet
Once it is run successfully now set the environmental variable to Audit Vault Server and then start the collector.

[oracle@av-mrp ~]$ avctl start_collector -collname DBAUD_Collector -srcname NOAKHALI
AVCTL started
Starting collector...
Collector started successfully.

Thursday, December 8, 2011

Wordpress WP-PageNavi plugin not working

Those who have worked with wordpress they might have heard the name of WP-PageNavi plugin which provides you the function wp_pagenavi() tag and generates fancy pagination links. While working with WP-PageNavi sometimes you might face following issues.

- Whenever you go to page 2 it shows invalid link.
- The plugin does not show correct posts.
- When you go to page 2, you still notice the same posts as on page 1.

The problem is due to the theme is using query_posts() wrongly.

For example, you might notice in your theme file query_posts() is used as following:

query_posts("posts_per_page=5&cat=$cur_cat_id"); ?>

Which in fact is wrong. If the file in question is a custom page template, replace it with this:

query_posts( array( 'cat' => $cur_cat_id , 'paged' => get_query_var('page') ) );

otherwise replace it by,
query_posts( array( 'cat' => $cur_cat_id , 'paged' => get_query_var('paged') ) );

Save and now check your wp-pagenavi plugin.

Tuesday, December 6, 2011

11gR2 DBUA Errors - Database Vault option is enabled

Problem Description
While running Database Upgrade Assistance dbua, the up gradation fails with error "Database Vault option is enabled". Whenever you look into trace file you will notice error like,
[Thread-12] [ 2011-06-12 12:33:10.257 EDT ] [OracleHome.isDatabaseOptionOn:1172] Database Option Oracle Database Vault is true
[Thread-12] [ 2011-06-12 12:33:10.258 EDT ] [CompManager.doPreMigrationChecks:2975] Database Vault option is enabled in Oracle Home: "/u01/oracle/bddiploc/db/11.2.0". This option needs to be disabled prior to upgrade.

Cause of the Problem
The problem can be happened due to any of the two reasons:
Reason 01: Oracle environment variable for example ORACLE_HOME is pointed to the wrong path. This is very possible whenever you have installed new version of Oracle software product and then you run the dbua from old database software home instead of running dbua from new installed Oracle database software.

Reason 02: Oracle Data Vaultt is enabled.

Solution of the Problem
Before running dbua ensure the following:
1) On windows issue path and see the path setting environmental variable. Ensure that, new version software path is shown before old version of software. If it is not set there, then set ORACLE_HOME and set path and then run dbua. Also you can run dbua directly from new Oracle home\bin directory.

On Linux issue env statement and check the environmental variable. Check about ORACLE_HOME variable setting. Make sure dbua is being run from new installed release of 11GR2 & using dbua file under 11GR2 $ORACLE_HOME/bin directory. If it is 11.2.0.3 then run from new software release.

2) Make sure the instance to be upgraded is shutdown properly.

3) Make sure that ALL environment variables are pointing to new ORACLE_HOME including ORACLE_BASE, ORACLE_HOME, PATH, LD_LIBRARY_PATH etc.

4) Check whether Data Vault is enabled or not. Data Vault is disabled if following is TRUE
$ cd $ORACLE_HOME/rdbms/lib
$ ar -t libknlopt.a | grep dv
kzvndv.o <<<<<< Shows DV is disabled
If Data Vault is not disabled, then it needs to be done following:
$ cd $ORACLE_HOME/rdbms/lib

$ make -f ins_rdbms.mk dv_off

$ cd $ORACLE_HOME/bin

$ relink all