Thursday, December 9, 2010

Oracle Select Date

select * from audit_log
where CREATED_DATE > to_date('08-12-2010','dd-mm-yyyy')

Friday, December 3, 2010

Apache In Linux

Start Apache
goto /usr/local/apache2/bin
type: ./apachectl start

Stop Apache
goto /usr/local/apache2/bin
type: ./apachectl stop

Check Apache Service Available or Not
ps -ef | grep apache

If apache up, it will show something like this:-
daemon 1599 1589 0 10:52:38 ? 0:00 /usr/local/apache2/bin/httpd -k start
daemon 1600 1589 0 10:52:38 ? 0:00 /usr/local/apache2/bin/httpd -k start
daemon 1598 1589 0 10:52:37 ? 0:00 /usr/local/apache2/bin/httpd -k start

Wednesday, October 27, 2010

Convert int to double

int myInt = 255;
System.out.println("int value=" + myInt);

BigDecimal bdInt1 = new BigDecimal(Integer.toString(myInt));
BigDecimal bdInt2 = new BigDecimal(100);

bdInt1= bdInt1.divide(bdInt2);
double d = bdInt1.doubleValue();
System.out.println("double value=" + d);

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