Nov 26, 2010

how to load properties from properties files?

Setting Up the Properties Object

The following Java code performs the first two steps described in the previous section: loading the default properties and loading the remembered properties:

. . .
/* create and load default properties */
Properties defaultProps = new Properties();
FileInputStream in = new FileInputStream("defaultProperties");
defaultProps.load(in);
in.close();

// create application properties with default
Properties applicationProps = new Properties(defaultProps);

// now load properties from last invocation
in = new FileInputStream("appProperties");
applicationProps.load(in);
in.close();
. . .

First, the application sets up a default Properties object. This object contains the set of properties to use if values are not explicitly set elsewhere. Then the load method reads the default values from a file on disk named defaultProperties.

Next, the application uses a different constructor to create a second Properties object, applicationProps, whose default values are contained in defaultProps. The defaults come into play when a property is being retrieved. If the property can't be found in applicationProps, then its default list is searched.

Finally, the code loads a set of properties into applicationProps from a file named appProperties. The properties in this file are those that were saved from the application the last time it was invoked, as explained in the next section.

Source:- http://download.oracle.com/javase/tutorial/essential/environment/properties.html

Nov 23, 2010

sqlplus syntax

sqlplus sys/oracle@:/ as sysdba
eg:sqlplus sys/oracle@10.177.219.131:1521/orcl.idc.oracle.com as sysdba

Oct 19, 2010

Generate Java Code from WSDL

Overview

The wsimport tool generates JAX-WS portable artifacts, such as:

  • Service Endpoint Interface (SEI)
  • Service
  • Exception class mapped from wsdl:fault (if any)
  • Async Reponse Bean derived from response wsdl:message (if any)
  • JAXB generated value types (mapped java classes from schema types)

These artifacts can be packaged in a WAR file with the WSDL and schema documents along with the endpoint implementation to be deployed. also provides wsimport ant task, see Wsimport ant task.

Launching wsimport

  • Solaris/Linux
    • /bin/wsimport.sh -help
  • Windows
    • \bin\wsimport.bat -help

Syntax

wsimport [options] 

The following table lists the wsimport options.

Option

Description

-d   

Specify where to place generated output files

-b   

Specify external JAX-WS or JAXB binding files (Each must have its own -b)

-B 

Pass this option to JAXB schema compiler

-catalog

Specify catalog file to resolve external entity references, it supports TR9401, XCatalog, and OASIS XML Catalog format. Please read the documentation of catalog and see catalog sample.

-extension  

Allow vendor extensions (functionality not specified by the specification). Use of extensions may result in applications that are not portable or may not interoperate with other implementations

-help  

Display help

-httpproxy::  

Specify an HTTP proxy server (port defaults to 8080)

-keep  

Keep generated files

-p  
Specifying a target package via this command-line option, overrides any wsdl and schema binding customization for package name and the default package name algorithm defined in the specification
-s   

Specify where to place generated source files

-verbose  

Output messages about what the compiler is doing

-version  

Print version information

-wsdllocation  
@WebServiceClient.wsdlLocation value
-target  
Generate code as per the given JAX-WS specification version. version 2.0 will generate compliant code for JAX-WS 2.0 spec.
-quiet  
Suppress wsimport output

Multiple JAX-WS and JAXB binding files can be specified using -b option and they can be used to customize various things like package names, bean names, etc. More information on JAX-WS and JAXB binding files can be found in the customization documentation.

Example

wsimport -p stockquote http://stockquote.xyz/quote?wsdl
This will generate the Java artifacts and compile them by importing the http://stockquote.xyz/quote?wsdl.


Ant task

An Ant task for the wsimport tool is provided along with the tool. The attributes and elements supported by the Ant task are listed below:

        wsdl="..."     

destdir="directory for generated class files"
sourcedestdir="directory for generated source files"
keep="true|false"
extension="true|false"
verbose="true|false"
version="true|false"
wsdlLocation="..."
catalog="catalog file"
package="package name"



Attribute

Description

Command line

wsdl

WSDL file

WSDL

destdir

Specify where to place output generated classes

-d

sourcedestdir

Specify where to place generated source files, keep is turned on with this option

-s

keep

Keep generated files, tunred on with sourcedestdir option

-keep

verbose

Output messages about what the compiler is doing

-verbose

binding

Specify external JAX-WS or JAXB binding files

-b

extension

allow vendor extentions (funcionality not specified by the specification). Use of extensions may result in applications that are not portable or may not interoperate with other implementations

-extension

wsdllocation
The wsdl URI passed thru this option will be used to set the value of @WebService.wsdlLocation and @WebServiceClient.wsdlLocation annotation elements on the generated SEI and Service interface
-wsdllocation
catalog
Specify catalog file to resolve external entity references, it supports TR9401, XCatalog, and OASIS XML Catalog format. Additionally, ant xmlcatalog type can be used to resolve entities, see wsimport_catalog sample.
-catalog
package
Specifies the target package -p

The binding attributes is like a path-like structure and can also be set via nested elements, respectively. Before this task can be used, a element needs to be added to the project as given below:




where jaxws.classpath is a reference to a path-like structure, defined elsewhere in the build environment, and contains the list of classes required by the JAX-WS tools.

Examples

destdir="${build.classes.home}"
debug="true"
wsdl="AddNumbers.wsdl"
binding="custom.xml"/>


The above example generates client-side artifacts for AddNumbers.wsdl, stores .class files in the ${build.classes.home} directory using the custom.xml customization file. The classpath used is xyz.jar and compiles with debug information on.

keep="true"
sourcedestdir="${source.dir}"
destdir="${build.classes.home}"
wsdl="AddNumbers.wsdl">




The above example generates portable artifacts for AddNumbers.wsdl, stores .java files in the ${source.dir} directory, stores .class files in the ${build.classes.home} directory.

Source: https://jax-ws.dev.java.net/jax-ws-ea3/docs/wsimport.html


Oct 6, 2010

What are PermSize and MaxPermSize and how they work in Java?

Permanent Generation (which is “Perm” in PermSize)

The permanent generation is used to hold reflective of the VM itself such as class objects and method objects. These reflective objects are allocated directly into the permanent generation, and it is sized independently from the other generations. Generally, sizing of this generation can be ignored because the default size is adequate. However, programs that load many classes may need a larger permanent generation.

PermSize is additional separate heap space to the -Xmx value set by the user. The section of the heap reserved for the permanent generation holds all of the reflective data for the JVM. You should adjust the size accordingly if your application dynamically load and unload a lot of classes in order to optimize the performance.

By default, MaxPermSize will be 32mb for -client and 64mb for -server. However, if you do not set both PermSize and MaxPermSize, the overall heap will not increase unless it is needed. When you set both PermSize and MaxPermSize, for example, 192mb, the extra heap space will get allocated when it startup and will stay allocated.

Source : http://www.dbuggr.com/smallwei/permsize-maxpermsize-work-java/

Sep 27, 2010

Oracle DB 11g Uninstallation.

In order to uninstall Oracle Database 11g go to "deinstall" directory in $ORACLE_HOME:

echo
$ORCALE_HOME

/u01/app/oracle/product/11.2.0

cd $ORACLE_HOME/dbhome_1/deinstall

#run deinstall script (none a graphical):
sh deinstall



Source: http://www.emarcel.com/emarcel/database/114-uninstalldb11g

Sep 22, 2010

ADF Faces - Relationship Between Scopes and Page Flow



Source : http://download.oracle.com/docs/cd/E15523_01/web.1111/b31973/af_lifecycle.htm#CHDGGGBI

Important News Related to Sun Certification

New Certification Titles (Effective September 1, 2010)

Use the following table to see how the Sun Certification titles have been rebranded under the Oracle Certification program.

Former Sun Certification Title New Oracle Certification Title
JAVA TECHNOLOGY
Sun Certified Java Associate Oracle Certified Associate, Java SE 5/SE 6
Sun Certified Java Programmer (SCJP) SE 5 Oracle Certified Professional, Java SE 5 Programmer
Sun Certified Java Programmer (SCJP) SE 6 Oracle Certified Professional, Java SE 6 Programmer
Sun Certified Java Developer (SCJD) Oracle Certified Master, Java SE6 Developer
Sun Certified Web Component Developer (SCWCD) EE5 Oracle Certified Professional, Java EE 5 Web Component Developer
Sun Certified Business Component Developer (SCBCD) EE5 Oracle Certified Professional, Java EE 5 Business Component Developer
Sun Certified Developer for Java Web Services 5 (SCDJWS) Oracle Certified Professional, Java EE 5 Web Services Developer
Sun Certified Enterprise Architect (SCEA) EE5 Oracle Certified Master, Java EE 5 Enterprise Architect
Sun Certified Mobile Application Developer (SCMAD) Oracle Certified Professional, Java ME 1 Mobile Application Developer
Sun Certified JSP and Servlet Developer for the Java EE6 Platform Oracle Certified Professional, Java Platform, Enterprise Edition 6 JavaServer Pages and Servlet Developer
Sun Certified EJB Developer for the Java EE6 Platform Oracle Certified Professional, Java Platform, Enterprise Edition 6 Enterprise JavaBeans Developer
Sun Certified JPA Developer for the Java EE6 Platform Oracle Certified Professional, Java Platform, Enterprise Edition 6 Java Persistence API Developer
Sun Certified Developer for the Java Web Services for the Java EE6 Oracle Certified Professional, Java Platform, Enterprise Edition 6 Web Services Developer
Sun Certified Developer for the JSF for the Java EE6 Platform Oracle Certified Professional, Java Platform, Enterprise Edition 6 JavaServer Faces Developer
ORACLE SOLARIS
Sun Certified Solaris Associate (SCSAS) Oracle Certified Associate, Oracle Solaris 10 Operating System
Sun Certified System Administrator (SCSA) for Solaris OS 10 Oracle Certified Professional, Oracle Solaris 10 System Administrator
Sun Certified Network Administrator (SCNA) for Solaris OS 10 Oracle Certified Expert, Oracle Solaris 10 Network Administrator
Sun Certified Security Administrator (SCSECA) for Solaris OS 10 Oracle Certified Expert, Oracle Solaris 10 Security Administrator
MYSQL, OPENOFFICE, ORACLE SOLARIS CLUSTER
Sun Certified MySQL 5.0 Database Administrator (SCMDBA) Oracle Certified Professional, MySQL 5.0 Database Administrator
Sun Certified MySQL 5.0 Developer (SCMDEV) Oracle Certified Professional, MySQL 5.0 Developer
Sun Certified MySQL Associate (SCMA) Oracle Certified Associate, MySQL 5.0/5.1/5.5
Sun Certified MySQL 5.1 Cluster Database Administrator (SCMCDBA) Oracle Certified Expert, MySQL 5.1 Cluster Database Administrator
Sun Certified System Administrator for Sun Cluster 3.2 Oracle Certified Professional, Oracle Solaris Cluster 3.2 System Administrator
Sun Certified OpenOffice.org Calc Specialist Oracle Certified Expert, OpenOffice.org Calc
Sun Certified OpenOffice.org Impress Specialist Oracle Certified Expert, OpenOffice.org Impress
Sun Certified OpenOffice.org Writer Specialist Oracle Certified Expert, OpenOffice.org Writer
Sun Certified Specialist for NetBeans IDE Oracle Certified Expert, NetBeans Integrated Development Environment 6.1 Programmer


Source : http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=433&p_org_id=1080544&lang=US

Sep 16, 2010

Block/Enable usage of USB Removable Disks

Block usage of USB Removable Disks

To block your computer's ability to use USB Removable Disks follow these steps:

  1. Open Registry Editor.
  2. In Registry Editor, navigate to the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR
  1. Locate the following value (DWORD):

Start and give it a value of 4.

Note: As always, before making changes to your registry you should always make sure you have a valid backup. In cases where you're supposed to delete or modify keys or values from the registry it is possible to first export that key or value(s) to a .REG file before performing the changes.

  1. Close Registry Editor. You do not need to reboot the computer for changes to apply.

Enable usage of USB Removable Disks

To return to the default configuration and enable your computer's ability to use USB Removable Disks follow these steps:

  1. Go to the registry path found above.
  1. Locate the following value:
Start and give it a value of 3.

Aug 13, 2010

Solaris Command Reference

HD info(vendor, RPM, capacity)

oasis:/home/tse/dxy[9:18pm] iostat -E

sd0 Soft Errors: 0 Hard Errors: 3 Transport Errors: 0
Vendor: SEAGATE Product: ST34371W SUN4.2G Revision: 7462 Serial No: 9742K71685
RPM: 7200 Heads: 16 Size: 4.29GB <4292075520>
Media Error: 0 Device Not Ready: 0 No Device: 3 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0

sd1 Soft Errors: 0 Hard Errors: 3 Transport Errors: 0
Vendor: SEAGATE Product: ST32171W SUN2.1G Revision: 7462 Serial No: 9736T74649
RPM: 5400 Heads: 19 Size: 2.13GB <2127708160>
Media Error: 0 Device Not Ready: 0 No Device: 3 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0

sd6 Soft Errors: 0 Hard Errors: 3 Transport Errors: 0
Vendor: TOSHIBA Product: XM5701TASUN12XCD Revision: 0997 Serial No: 04/09/97
RPM: 0 Heads: 0 Size: 18446744073.71GB <-8589934591 bytes>
Media Error: 0 Device Not Ready: 3 No Device: 0 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0

Display the number of used and free i-nodes

impulse:/home/dxy[4:07pm] df -F ufs -o i
Filesystem iused ifree %iused Mounted on
/dev/dsk/c0t3d0s0 38555 403045 9% /
/dev/dsk/c0t1d0s0 160761 345607 32% /export/home
/dev/md/dsk/d20 149826 1905214 7% /usr/local
impulse:/home/dxy[4:07pm] /usr/ucb/df -i
Filesystem iused ifree %iused Mounted on
/dev/dsk/c0t3d0s0 38555 403045 9% /
/dev/dsk/c0t1d0s0 160761 345607 32% /export/home
/dev/md/dsk/d20 149826 1905214 7% /usr/local
impulse:/home/dxy[4:07pm]

Display processes with the highest CPU utilization

velocity:/home/dxy[4:54pm] ps -eo pid,pcpu,args | sort +1n

Display processes with the highest memory usage

velocity:/home/dxy[4:54pm] ps -eo pid,vsz,args | sort +1n

Printing disk geometry and partition info

oasis:/home/dxy[4:16pm] prtvtoc /dev/rdsk/c0t0d0s0
* /dev/rdsk/c0t0d0s0 partition map
*
* Dimensions:
* 512 bytes/sector
* 135 sectors/track
* 16 tracks/cylinder
* 2160 sectors/cylinder
* 3882 cylinders
* 3880 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 0 7855920 7855919 /usr/local
1 3 01 7855920 524880 8380799
2 5 00 0 8380800 8380799
oasis:/home/dxy[4:16pm]

Checking whether it's running in 32-bit mode or 64-bit mode

64-bit mode

% isalist -v
sparcv9+vis sparcv9 sparcv8plus+vis sparcv8plus sparcv8 sparcv8-fsmuld sparcv7 sparc
% isainfo -v
64-bit sparcv9 applications
32-bit sparc applications

32-bit mode

% isalist -v
sparcv8plus+vis sparcv8plus sparcv8 sparcv8-fsmuld sparcv7 sparc
% isainfo -v
32-bit sparc applications

Verifying a route to a specified network

# route -n get xxx.yyy.zzz.0
route to: xxx.yyy.zzz.0
destination: default
mask: default
gateway: xxx.yyy.aaa.254
interface: hme0
flags:
recvpipe sendpipe ssthresh rtt,msec rttvar hopcount mtu expire
0 0 0 0 0 0 1500 0
#

print the version of OBP

% prtconf -V
OBP 3.3.2 1996/06/28 08:43
% /usr/platform/`uname -i`/sbin/prtdiag -v | grep OBP
OBP 3.11.1 1997/12/03 15:53 POST 3.11.4 1997/05/27 02:26
%
{2} ok .version
Release 3.23 Version 1 created 1999/07/16 12:08
OBP 3.23.1 1999/07/16 12:08
POST 2.0.2 1998/10/19 10:46
{2} ok

print the version of Open Windows

% showrev -w

OpenWindows version:
OpenWindows Version 3.6.1 25 January 1999

%

To determine which monitor resolution is available

% /usr/sbin/ffbconfig -res \?
Valid values for -res option are:
1024x768x60 [1]
1024x768x70 [1]
1024x768x75 [1] [2]
1024x768x77
1024x800x84
1152x900x66
1152x900x76
1280x800x76 [1] [2]
1280x1024x60 [1] [2]
1280x1024x67
1280x1024x76
1280x1024x85 [1] [2]
960x680x112s
960x680x108s
640x480x60 [1] [2]
640x480x60i [1]
768x575x50i [1]
1440x900x76 [1] [2]
1600x1000x66 [1] [2]
1600x1000x76 [1] [2]
1600x1280x76 [1] [2]
1920x1080x72 [1] [2]
1920x1080x76 [1] [2]
1920x1200x70 [1] [2]
1920x1200x75 [1] [2]
svga [1]
1152
1280
stereo
vga [1] [2]
ntsc [1]
pal [1]
none
Notes:
[1] monitor does not support this resolution.
[2] this version of FFB (FFB1) does not support this resolution.
%

system configuration

% sysdef

Display the device list (and drivers attached to devices)

% prtconf -D
System Configuration: Sun Microsystems sun4u
Memory size: 256 Megabytes
System Peripherals (Software Nodes):

SUNW,Ultra-1
packages
terminal-emulator
deblocker
obp-tftp
disk-label
ufs-file-system
chosen
openprom
client-services
options, instance #0 (driver name: options)
aliases
memory
virtual-memory
counter-timer
sbus, instance #0 (driver name: sbus)
SUNW,CS4231 (driver name: audiocs)
auxio
flashprom
SUNW,fdtwo, instance #0 (driver name: fd)
eeprom (driver name: eeprom)
zs, instance #0 (driver name: zs)
zs, instance #1 (driver name: zs)
sc
SUNW,pll
SUNW,fas, instance #0 (driver name: fas)
sd (driver name: sd)
st (driver name: st)
sd, instance #0 (driver name: sd)
sd, instance #1 (driver name: sd)
sd, instance #2 (driver name: sd)
sd, instance #3 (driver name: sd)
sd, instance #4 (driver name: sd)
sd, instance #5 (driver name: sd)
sd, instance #6 (driver name: sd)
sd, instance #7 (driver name: sd)
sd, instance #8 (driver name: sd)
sd, instance #9 (driver name: sd)
sd, instance #10 (driver name: sd)
sd, instance #11 (driver name: sd)
sd, instance #12 (driver name: sd)
sd, instance #13 (driver name: sd)
sd, instance #14 (driver name: sd)
SUNW,hme, instance #0 (driver name: hme)
SUNW,bpp (driver name: bpp)
SUNW,UltraSPARC
SUNW,ffb, instance #0 (driver name: ffb)
pseudo, instance #0 (driver name: pseudo)

processor type, speed

% psrinfo -v
Status of processor 0 as of: 06/16/99 12:38:51
Processor has been on-line since 02/07/99 01:47:11.
The sparcv9 processor operates at 200 MHz,
and has a sparcv9 floating point processor.

patch applied on the system

% showrev -p

exported file system on NFS server

% showmount -e NFS_SERVER

display current run level

% who -r

Find out a package which a file belongs to

% pkgchk -l -p /usr/lib/sendmail
Pathname: /usr/lib/sendmail
Type: regular file
Expected mode: 4555
Expected owner: root
Expected group: bin
Expected file size (bytes): 650720
Expected sum(1) of contents: 22626
Expected last modification: Apr 07 04:13:53 1999
Referenced by the following packages:
SUNWsndmu
Current status: installed

%

Examining gcc behavior

% gcc -v -x c /dev/null

Display the version of CDE

% /usr/ccs/bin/what /usr/dt/bin/dtmail
/usr/dt/bin/dtmail:
CDE Version 1.3.4
CDEVersion1.3.4

Display the version of BIND

% nslookup -class=chaos -q=txt version.bind ns0.optix.org
Server: impulse.optix.org
Address: 210.164.85.210
Aliases: 210.85.164.210.in-addr.arpa

VERSION.BIND text = "8.2.2-P5"
% dig @ns-tk021.ocn.ad.jp version.bind chaos txt
; <<>> DiG 8.2 <<>> @ns-tk021.ocn.ad.jp version.bind chaos txt
; (1 server found)
;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUERY SECTION:
;; version.bind, type = TXT, class = CHAOS

;; ANSWER SECTION:
VERSION.BIND. 0S CHAOS TXT "4.9.7-REL"

;; Total query time: 81 msec
;; FROM: velocity to SERVER: ns-tk021.ocn.ad.jp 203.139.160.103
;; WHEN: Tue May 9 17:26:23 2000
;; MSG SIZE sent: 30 rcvd: 64

%

system configuration

% /usr/platform/`uname -i`/sbin/prtdiag
System Configuration: Sun Microsystems sun4u 8-slot Sun Enterprise 4000/5000
System clock frequency: 82 MHz
Memory size: 512Mb

========================= CPUs =========================

Run Ecache CPU CPU
Brd CPU Module MHz MB Impl. Mask
--- --- ------- ----- ------ ------ ----
0 0 0 248 2.0 US-II 1.1
0 1 1 248 2.0 US-II 1.1
2 4 0 248 2.0 US-II 1.1
2 5 1 248 2.0 US-II 1.1


========================= Memory =========================

Intrlv. Intrlv.
Brd Bank MB Status Condition Speed Factor With
--- ----- ---- ------- ---------- ----- ------- -------
0 0 256 Active OK 60ns 2-way A
2 0 256 Active OK 60ns 2-way A

========================= IO Cards =========================

Bus Freq
Brd Type MHz Slot Name Model
--- ---- ---- ---- -------------------------------- ----------------------
1 SBus 25 3 SUNW,hme
1 SBus 25 3 SUNW,fas/sd (block)
1 SBus 25 13 SUNW,soc/SUNW,pln 501-2069
5 SBus 25 3 SUNW,hme
5 SBus 25 3 SUNW,fas/sd (block)
5 SBus 25 13 SUNW,soc/SUNW,pln 501-2069

Detached Boards
===============
Slot State Type Info
---- --------- ------ -----------------------------------------
3 disabled disk Disk 0: Target: 10 Disk 1: Target: 11
7 disabled disk Disk 0: Target: 14 Disk 1: Target: 15

No failures found in System
===========================

No System Faults found
======================

Jul 30, 2010

Pen-drive format in Linux

Steps to format pen-drive in Linux
  1. Insert your USB. Let it get detected and mounted automatically.
  2. Run sudo umount /dev/sda (substitute sda with your device)
  3. Run sudo mkfs.vfat -n 'PEN_DRIVE_LABEL' -I /dev/sda
  4. Remove and insert the pen drive to mount.

Jul 29, 2010

Oracle Database timezone

SELECT SESSIONTIMEZONE FROM DUAL;

ALTER SESSION SET TIME_ZONE='-7:00';

SELECT DBTIMEZONE FROM DUAL;


Note:- DBTIMEZONE only apply when you have "TIMESTAMP WITH LOCAL TIME ZONE" (TSLTZ) datatype.

Jul 20, 2010

ADF Certification and Support Matrix

http://www.oracle.com/technology/products/jdev/collateral/papers/11/certification/index.html

Browsers

The Oracle ADF Faces rich client components are certified or supported with the following browsers. For the ADF Faces components that render in Flash, Flash 9 and Flash 10 are certified. Please also see Apache MyFaces Trinidad supported platforms information.

Browser Operating Systems ADF (ADF Faces)
Firefox 2.0, 3.0, 3.5+2 Windows, Linux, Mac OS, Solaris Certified
Internet Explorer 7, 82 Windows Certified
Safari 3.2, 4.02 Windows, Mac OS Certified
Safari 3.0 (mobile)2 iPhone OS Supported
Chrome 1.0+1 Windows Supported

* 32 bit JDK required for Windows platforms. 32 bit JDK required for profiling features on Linux platforms
** Oracle ADF Mobile Client 11.1.1.3.0 is in "Developer Preview" and as such is not
1. Support or certification added in 11g Release 1 (11.1.1.1.0). Does not apply to 11g versions prior to 11.1.1.1.0.
2. Support or certification added in 11g Release 1 Patch Set 1 (11.1.1.2.0). Does not apply to 11g Release 1 versions prior to 11.1.1.2.0.
3. Support or certification added in 11g Release 1 Patch Set 2 (11.1.1.3.0). Does not apply to 11g Release 1 versions prior to 11.1.1.3.0.
supported, so this is for informational purposes only.

May 28, 2010

How to increase no. of sessions in oracle database?

If you are increasing sessions parameter you should consider increasing processes and transactions parameter as well.

Here is the formula you can use to determine their values.

processes=x
sessions=x*1.1+5
transactions=sessions*1.1
E.g.
processes=500
sessions=555
transactions=610

Commands:-
sqlplus "/as sysdba"
or
sqlplus '/as sysdba'


show parameter sessions;
show parameter processes;
show parameter transactions;
alter system set processes=500 SCOPE=SPFILE; 
alter system set sessions=555 SCOPE=SPFILE; 
alter system set transactions=610 SCOPE=SPFILE; 

and restart the database.


Settings for higher performance:-
alter system set open_cursors=1500 scope=both;
alter system set processes=3000 scope=spfile;
alter system set undo_retention=10800 scope=both;
alter system set max_shared_servers=50 scope=both;
alter system set db_files=2000 scope=spfile; 
alter system set sessions=3305 SCOPE=SPFILE;  
alter system set transactions=3635 SCOPE=SPFILE; 



If you facing below issue while doing alter system
SQL> ALTER SYSTEM SET memory_target = 0 SCOPE=SPFILE;
ALTER SYSTEM SET memory_target = 0 SCOPE=SPFILE
*
ERROR at line 1:
ORA-32001: write to SPFILE requested but no SPFILE is in use


then perform 'CREATE SPFILE FROM PFILE' to create a SPFILE and do restart the database.




May 4, 2010

How to get the list of all users in Oracle Database?

1. Connect to sql using 'sqlplus / as sysdba'

2. Execute 'Select * from all_users;' to display all users in Oracle db.