Wednesday, October 27, 2010

Convert double to int

double myDouble = 2.55;
System.out.println("double value=" + myDouble);

BigDecimal bd1 = new BigDecimal(Double.toString(myDouble));
BigDecimal bd2 = new BigDecimal(100);

bd1= bd1.multiply(bd2);
int i = bd1.toBigInteger().intValue();
System.out.println("Int value=" + myDouble);

Monday, September 6, 2010

Zip Command

jar -cvf server.zip server.log

Tuesday, August 10, 2010

Export DB Script

exp db_user_name/password@DBSID file=backup_20100810.dmp log=backup_20100810.log owner=db_user_name

Monday, July 26, 2010

Grant All Permission

Grant all permission to all .sh file
1) go to the correct folder directory.
2) type command>> chmod 777 *.sh

Wednesday, July 7, 2010

Unix Command

Copy
cp -r fromFolderName toFolderName

JDK vs JRE

You must have a copy of the JRE (Java Runtime Environment) on your system to run Java applications and applets. To develop Java applications and applets, you need the JDK (Java Development Kit), which includes the JRE

Monday, May 24, 2010

Check Oracle Status in UNIX

Check Oracle Service Status

Login as orale:
[oracle]#su - oracle

Check status command:
[oracle]# lsnrctl status