Wednesday, December 28, 2011

Running wls_basic_audit.py - Weblogic BASIC license compliance

This script will help with verifying that WebLogic Server is being used in accordance with the WebLogic Server "Basic" license.

Reference: MOS note "WebLogic Server Basic License Audit Script [ID 885587.1]"

1. Set the environment from WL_SERVER_HOME/server/bin. Make sure to use below command to avoid "Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/WLST"

Two dots are important in case the "." is not specified in PATH variable.

. ./setWLSEnv.sh

2. java weblogic.WLST wls_basic_audit.py
$ java weblogic.WLST wls_basic_audit.py

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

===============
WLS Basic Audit
===============
12/28/11 4:31 PM
Please enter your username :weblogic
Please enter your password :
Please enter your server URL [t3://localhost:7001] :
Connecting to t3://localhost:7001 with userid weblogic ...
Successfully connected to Admin Server 'AdminServer' that belongs to domain 'INB'.

Warning: An insecure protocol was used to connect to the
server. To ensure on-the-wire security, the SSL port or
Admin port should be used instead.

===========
Domain Info
===========
Checking for administration port enabled: 
Checking for service migration: 
No errors detected
============
Cluster Info
============
Checking cluster type and overload actions: 
No errors detected
===========
Server Info
===========
Checking server mode and overload actions: 
No errors detected
======================
Singleton Service Info
======================
Checking for singleton services: 
No errors detected
======================
Service Migration Info
======================
Checking for service migration: 
No errors detected
========================
Global Work Manager Info
========================
Checking for global Work Managers: 
No errors detected
=============================
Application Work Manager Info
=============================
Checking for application-scoped Work Managers: 
No errors detected
===============
Deployment Info
===============
Checking for application versioning and ordering: 
License compliance failure:  Application reports version 11.1.1.2.0 uses version 11.1.1.2.0
License compliance failure:  Application formsapp version 11.1.1 uses version 11.1.1
Production redeployment strategy involves deploying a new version of an updated application alongside an older version of the same application. WebLogic Server automatically manages client connections so that only new client requests are directed to the new version. Clients already connected to the application during the redeployment continue to use the older version of the application until they complete their work, at which point WebLogic Server automatically retires the older application. This capability is supported by deploying the application in Administration mode, which makes it available only via a configured Administration channel.
In the license for WebLogic Server Basic, deploying any application that uses a version identifier is not permitted.
See the documentation:  http://download.oracle.com/docs/cd/E12839_01/web.1111/e13702/redeploy.htm#DEPGD281
2 error(s) detected
=========================
Application FastSwap Info
=========================
Checking whether FastSwap is enabled in an application: 
No errors detected
========
JMS Info
========
Checking for non-default Unit-of-Work Message Handling Policy: 
Checking for non-default Message Unit-of-Order: 
Checking for Message Store-and-Forward agents: 
No errors detected
=====================
Tuxedo Connector Info
=====================
Checking for WebLogic Tuxedo Connectors: 
No errors detected
=========
SNMP Info
=========
Checking for SNMP agents: 
No errors detected
=====================
Application Mode Info
=====================
Checking for application in Administration mode: 
Location changed to domainRuntime tree. This is a read-only tree with DomainMBean as the root.
For more help, use help(domainRuntime)

Location changed to serverRuntime tree. This is a read-only tree with ServerRuntimeMBean as the root.
For more help, use help(serverRuntime)

No errors detected
======================
Module Deployment Info
======================
Checking for deployment of standalone JMS, JDBC, or WLDF modules: 
No errors detected
===========================
HTTP Publish-Subscribe Info
===========================
Checking for HTTP Publish-Subscribe Server usage: 
No errors detected
==========================
Diagnostics Framework Info
==========================
Checking for WebLogic Diagnostics Framework usage: 
License compliance failure:  Diagnostics framework system resource is being used:  Module-FMWDFW
The WebLogic Diagnostic Framework (WLDF) is a monitoring and diagnostic framework that defines and implements a set of services that run within WebLogic Server processes and participate in the standard server life cycle. Using WLDF, you can create, collect, analyze, archive, and access diagnostic data generated by a running server and the applications deployed within its containers. This data provides insight into the run-time performance of servers and applications and enables you to isolate and diagnose faults when they occur.
In the license for WebLogic Server Basic, the use of WLDF is not permitted.
See the documentation:  http://download.oracle.com/docs/cd/E12839_01/web.1111/e13714/intro.htm#WLDFC108
1 error(s) detected
=======
Summary
=======
3 error(s) detected


Exiting WebLogic Scripting Tool.






I will post more posts on how to take care of these errors reported by compliance script.

Sungard Banner on Oracle 11g Middleware and Database


I have been working on this since last 8 months. The production is still at 10g iAS and Database. I am expecting it to get completed by first quarter of 2012.

The current strategy is to have:
1. Two separate domains for INB and SSB
2. INB would utilize Oracle PFR&D 11.1.1.4.0 + weblogic 10.3.4
3. SSB would utilize Oracle WebTier Utilities 11.1.1.4.0 + weblogic 10.3.4
4. Single installation of Oracle Weblogic 10.3.4
5. The domains are created in production mode
6. boot.properties is utilized to avoid prompting of username/password
7. Database is going to be upgraded to 11.2.0.2
8. Follow FAQ 1-XFTOI5 to take care of privileges for 11g database users.
5. Take care of creating ACLs - FAQ 1-648TQ0


Related FAQs from Sungard Support Center:
FAQ 1-BTZNOZ
FAQ 1-Z7JOUC
FAQ 1-XFTOI5
FAQ 1-648TQ0






Oracle VM on my laptop..

I haven't got the chance to upgrade RAM on my laptop. I should be able to do that this week and then no stopping (hopefully) to configure Oracle VM server on it..

Meanwhile I had asked if anyone has done it before on OTN forums:
https://forums.oracle.com/forums/message.jspa?messageID=10038738#10038738

Looks like it can be done on external drive without messing up internal drive. Also VM manager can be configured on one of the guest OSs.

More to come....

Tuesday, December 20, 2011

False ORA-19815 db_recovery_file_dest_size is 100.00% used

Another strange parameter change issue....

My db_recovery_file_dest_size was set to 52G. I decided to lower that value to 5G because I don't expect of using it or whatever...

After the change, restarted database and got below warning in the alert.log:
..
..
Tue Dec 20 12:09:47 2011
Errors in file /oracle/admin/diag/rdbms/rd11852/RD11852/trace/RD11852_m000_31348.trc:
ORA-19815: WARNING: db_recovery_file_dest_size of 5368709120 bytes is 100.00% used, and has 0 remaining bytes available.
************************************************************************
You have following choices to free up space from recovery area:
1. Consider changing RMAN RETENTION POLICY. If you are using Data Guard,
   then consider changing RMAN ARCHIVELOG DELETION POLICY.
2. Back up files to tertiary device such as tape using RMAN
   BACKUP RECOVERY AREA command.
3. Add disk space and increase db_recovery_file_dest_size parameter to
   reflect the new space.
4. Delete unnecessary files using RMAN DELETE command. If an operating
   system command was used to delete files, then use RMAN CROSSCHECK and
   DELETE EXPIRED commands.
************************************************************************

..
..



Values for FRA related parameters:
SQL> show parameter recovery

NAME
------------------------------------
TYPE                                         VALUE
-------------------------------------------- ------------------------------
db_recovery_file_dest
string                                       /oracle/admin/fast_recovery_area
db_recovery_file_dest_size
big integer                                  5G
recovery_parallelism
integer                                      0


Checked for available space on OS:
$ cd /oracle/admin/fast_recovery_area/

$ df -k .
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/vgsan-oracle
                      30963708  16639264  14324444  54% /oracle
 

$ ls -ltr
total 4
drwxr-s--- 3 oracle dba 4096 Oct 24 10:33 RD11852
 

oracle@strudel:/oracle/admin/fast_recovery_area[RD11852]
$ du -sk RD11852
16      RD11852
 

oracle@strudel:/oracle/admin/fast_recovery_area[RD11852]
$ du -sk .
20      .



That means enough free space was available at OS level.

Checking database views related to FRA:
SQL> select * from v$recovery_file_dest;

NAME
--------------------------------------------------------------------------------
SPACE_LIMIT SPACE_USED SPACE_RECLAIMABLE NUMBER_OF_FILES
----------- ---------- ----------------- ---------------
/oracle/admin/fast_recovery_area
 5368709120 1.1520E+10                 0               2


SQL> select * from v$flash_recovery_area_usage;

FILE_TYPE
--------------------------------------------------------------------------------
PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
------------------ ------------------------- ---------------
CONTROL FILE
                 0                         0               0

REDO LOG
                 0                         0               0

ARCHIVED LOG
                 0                         0               0

BACKUP PIECE
            214.58                         0               2


IMAGE COPY
                 0                         0               0

FLASHBACK LOG
                 0                         0               0

FOREIGN ARCHIVED LOG
                 0                         0               0


7 rows selected.


Strange that it showed two backup pieces consuming around 214.58% of FRA.

Decided to check using RMAN:
RMAN> list backup;

List of Backup Sets
===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
2       Full    10.72G     DISK        00:12:04     24-OCT-11     
        BP Key: 2   Status: AVAILABLE  Compressed: NO  Tag: TAG20111024T134517
        Piece Name: /oracle/admin/fast_recovery_area/RD11852/backupset/2011_10_24/o1_mf_nnndf_TAG20111024T134517_7bc91gr2_.bkp
  List of Datafiles in backup set 2
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 7443640574332 24-OCT-11 /u02/oradata/RD11852/system01.dbf
  2       Full 7443640574332 24-OCT-11 /u02/oradata/RD11852/undo01.dbf
  3       Full 7443640574332 24-OCT-11 /u02/oradata/RD11852/sysaux01.dbf
  4       Full 7443640574332 24-OCT-11 /u02/oradata/RD11852/axiom01.dbf
  5       Full 7443640574332 24-OCT-11 /u02/oradata/RD11852/banaq01.dbf
  6       Full 7443640574332 24-OCT-11 /u02/oradata/RD11852/baniam01.dbf
  7       Full 7443640574332 24-OCT-11 /u02/oradata/RD11852/banlob.dbf
  8       Full 7443640574332 24-OCT-11 /u02/oradata/RD11852/devl01.dbf
  9       Full 7443640574332 24-OCT-11 /u02/oradata/RD11852/devl02.dbf
  10      Full 7443640574332 24-OCT-11 /u02/oradata/RD11852/devl03.dbf
  11      Full 7443640574332 24-OCT-11 /u02/oradata/RD11852/devl04.dbf
  12      Full 7443640574332 24-OCT-11 /u02/oradata/RD11852/devl05.dbf
  13      Full 7443640574332 24-OCT-11 /u02/oradata/RD11852/devl06.dbf
  14      Full 7443640574332 24-OCT-11 /u02/oradata/RD11852/devl07.dbf
  15      Full 7443640574332 24-OCT-11 /u02/oradata/RD11852/devl08.dbf
  16      Full 7443640574332 24-OCT-11 /u02/oradata/RD11852/devl09.dbf
  17      Full 7443640574332 24-OCT-11 /u02/oradata/RD11852/devl10.dbf
  18      Full 7443640574332 24-OCT-11 /u02/oradata/RD11852/tools01.dbf
  19      Full 7443640574332 24-OCT-11 /u02/oradata/RD11852/users01.dbf
  20      Full 7443640574332 24-OCT-11 /u02/oradata/RD11852/xdb01.dbf
  21      Full 7443640574332 24-OCT-11 /u02/oradata/RD11852/devl11.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
3       Full    9.64M      DISK        00:00:01     24-OCT-11     
        BP Key: 3   Status: AVAILABLE  Compressed: NO  Tag: TAG20111024T134517
        Piece Name: /oracle/admin/fast_recovery_area/RD11852/backupset/2011_10_24/o1_mf_ncsnf_TAG20111024T134517_7bc9rf90_.bkp
  SPFILE Included: Modification time: 08-JUN-11
  Control File Included: Ckp SCN: 7443640574332   Ckp time: 24-OCT-11


Checked on OS if those backup pieces existed:

$ ls -ltr /oracle/admin/fast_recovery_area/RD11852/backupset/2011_10_24/o1_mf_nnndf_TAG20111024T134517_7bc91gr2_.bkp
/bin/ls: /oracle/admin/fast_recovery_area/RD11852/backupset/2011_10_24/o1_mf_nnndf_TAG20111024T134517_7bc91gr2_.bkp: No such file or directory


$ ls -ltr /oracle/admin/fast_recovery_area/RD11852/backupset/2011_10_24/o1_mf_ncsnf_TAG20111024T134517_7bc9rf90_.bkp
/bin/ls: /oracle/admin/fast_recovery_area/RD11852/backupset/2011_10_24/o1_mf_ncsnf_TAG20111024T134517_7bc9rf90_.bkp: No such file or directory


Decided to delete those backups using rman:
RMAN> crosscheck backup;

using channel ORA_DISK_1
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/oracle/admin/fast_recovery_area/RD11852/backupset/2011_10_24/o1_mf_nnndf_TAG20111024T134517_7bc91gr2_.bkp RECID=2 STAMP=765380718
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/oracle/admin/fast_recovery_area/RD11852/backupset/2011_10_24/o1_mf_ncsnf_TAG20111024T134517_7bc9rf90_.bkp RECID=3 STAMP=765381453
Crosschecked 2 objects


RMAN> delete backup;

using channel ORA_DISK_1

List of Backup Pieces
BP Key  BS Key  Pc# Cp# Status      Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
2       2       1   1   EXPIRED     DISK        /oracle/admin/fast_recovery_area/RD11852/backupset/2011_10_24/o1_mf_nnndf_TAG20111024T134517_7bc91gr2_.bkp
3       3       1   1   EXPIRED     DISK        /oracle/admin/fast_recovery_area/RD11852/backupset/2011_10_24/o1_mf_ncsnf_TAG20111024T134517_7bc9rf90_.bkp

Do you really want to delete the above objects (enter YES or NO)? YES
deleted backup piece
backup piece handle=/oracle/admin/fast_recovery_area/RD11852/backupset/2011_10_24/o1_mf_nnndf_TAG20111024T134517_7bc91gr2_.bkp RECID=2 STAMP=765380718
deleted backup piece
backup piece handle=/oracle/admin/fast_recovery_area/RD11852/backupset/2011_10_24/o1_mf_ncsnf_TAG20111024T134517_7bc9rf90_.bkp RECID=3 STAMP=765381453
Deleted 2 objects

Verifying database views:
SQL> select * from v$flash_recovery_area_usage;
FILE_TYPE
--------------------------------------------------------------------------------
PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
------------------ ------------------------- ---------------
CONTROL FILE
                 0                         0               0

REDO LOG
                 0                         0               0

ARCHIVED LOG
                 0                         0               0
 

BACKUP PIECE
                 0                         0               0


IMAGE COPY
                 0                         0               0

FLASHBACK LOG
                 0                         0               0
 

FOREIGN ARCHIVED LOG
                 0                         0               0


Now that showed "0".



Restarted database:

Database alert.log showed below now. ..
.. 
Tue Dec 20 12:38:21 2011
db_recovery_file_dest_size of 5120 MB is 0.00% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.
..
..




Regards,
Vishal

ORA-00723 COMPATIBLE must be explicitly set


I was going through Reference book for Oracle 11gR2 for COMPATIBLE parameter at: http://docs.oracle.com/cd/E11882_01/server.112/e25513/initparams034.htm#REFRN10019

I have a database which was recently upgraded to 11.2.0.3. I had not changed the value of COMPATIBLE parameter and it was still pointing to "10.2.0.4".

I decided to make that change today and also realized that in the documentation of COMPATIBLE parameter for 11gR2 it says the default value is "11.2.0".

So I removed the COMPATIBLE parameter from my pfile and wanted to see if Oracle takes the default value i.e. 11.2.0.

Below is what happend:

SQL> startup
ORACLE instance started.

Total System Global Area  939495424 bytes
Fixed Size                  2233960 bytes
Variable Size             545261976 bytes
Database Buffers          385875968 bytes
Redo Buffers                6123520 bytes
ORA-00723: Initialization parameter COMPATIBLE must be explicitly set

I checked alert.log which shows:
..
..
Spfile /oracle/product/11.2.0.3/dbs/spfileRD11852.ora is in old pre-11 format and compatible >= 11.0.0; converting to new H.A.R.D. compliant format.
Tue Dec 20 12:06:01 2011
ALTER DATABASE   MOUNT
ORA-723 signalled during: ALTER DATABASE   MOUNT...
..
..


That tells me that Oracle tried to use the default value i.e. 11.2.0 but it failed while mounting which requires compatible to be set explicitly.


Strange....

Searched on MOS and found 287664.1:

Error:   ORA-00723  (ORA-723)
Text:   Initialization parameter COMPATIBLE must be explicitly set 
---------------------------------------------------------------------------
Cause: Oracle detected that the initialization parameter COMPATIBLE was 
 not explicitly specified, and the compatibility of the database is 
 lower than the default value of the COMPATIBLE parameter. In order 
 to use the new compatible setting, the intialization parameter 
 must be explicitly set by the user. 
Action: Explicitly set the value of COMPATIBLE parameter either in PFILE 
 or SPFILE, whichever is used.
 
 
Ahh, that's a relief. So that error was because i was changing the database
compatibility to 11.2.0 and the compatible was not explicitly set. That means if the
compatibility of the database is changing the parameter compatible has to be explicitly set. 
 
Ok.
 
I added compatible=11.2.0 to pfile and database opened. Alert.log showed:
..
.. 
ALERT: Compatibility of the database is changed from 10.2.0.4.0 to 11.2.0.0.0.
Increased the record size of controlfile section 4 to 520 bytes
Control file expanded from 612 blocks to 614 blocks
Increased the record size of controlfile section 14 to 200 bytes
Control file expanded from 614 blocks to 618 blocks
Increased the record size of controlfile section 16 to 736 bytes
Control file expanded from 618 blocks to 622 blocks
Increased the record size of controlfile section 20 to 928 bytes
Control file expanded from 622 blocks to 626 blocks
Increased the record size of controlfile section 21 to 124 bytes
Control file expanded from 626 blocks to 632 blocks
Increased the record size of controlfile section 22 to 900 bytes
The number of logical blocks in section 22 remains the same 
..
.. 
 
Now the compatibility of database is already upgraded to 11.2.0, so if I remove
COMPATIBLE parameter from pfile the instance should startup without ORA-00723...lets see...
 
 
AND THAT'S TRUE...database opened without ORA-00723 this time. COMPATIBLE is not set
explicitly...
 
SQL> select name, value, ISMODIFIED, isdefault from v$parameter where name='compatible';

NAME
--------------------------------------------------------------------------------
VALUE
--------------------------------------------------------------------------------
ISMODIFIED                               ISDEFAULT
---------------------------------------- ---------
compatible
11.2.0
FALSE                                    TRUE
 
 
 
 

Wednesday, December 14, 2011

Oracle VM on my laptop

I am planning to install Oracle VM on my personal laptop after adding additional 4G RAM to make it 8G.

My plan is to install Oracle VM on external USB drive which is of 500GB capacity. I don't want to mess up with my Windows on internal drive.

I do have recovery disk and intend to backup my laptop's internal drive before starting this install. I will keep posting my progress.

Regards,
Vishal