Wednesday 27 June 2018

Write statements in File instead of Tomcat OutPut

How to write statements in file instead of Tomcat Output

import org.apache.log4j.Logger;
import org.apache.log4j.Level;

Logger log = Logger.getLogger("sailpoint.services.bshdemo");

log.debug("hello debug world");
log.info("hello info world");
log.warn("hello warn world");
log.error("hello error world");   

return; 

Wednesday 20 June 2018

Database Tips and Tricks

1. How to extract a string from CLOB datatype in SQL?
>dbms_lob.substr( clob_column, for_how_many_bytes, from_which_byte );
Using this function, we can extract a string.

2. How to copy database within same server?
1. Dump database objects and data into SQL file using the mysqldump tool. 
21>mysqldump -u root -p <database_to_copy> > D:\Temp\<database_to_copy>.sql
2 Enter password: **********

3. >mysql -u root -p <New_database> < D:\Temp\<Copied_database>.sql 

2 Enter password: **********

2. How to copy database from server to another?

1 CREATE DATABASE <database_name>;
2
3 USE <database_name>;

1>mysql -u root -p <database_name> < D:\Temp\<database_to_copy>.sql

SOAPAPi Call and Reading

<?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE Rule PUBLIC "sailpoint.dtd" "sailpoint.dtd">...