Refactoring; Added username,password,adress,database as argument; Added check_archive,query_lock,query_redologs,query_rollbacks,querysessions