1、开启达梦数据归档模式
有三种办法,网上教程很多,此处不予介绍了
2、java实现日志解析
BaseDBcon类
public class BaseDBCon {
protected static String host;
protected static Integer port;
protected static String userName;
protected static String password;
protected static String urlString;
private static Logger logger = LoggerFactory.getLogger(BaseDBCon.class);
// 查询归档日志的sql语句
protected static final String referLogSql = "select name from v$archived_log ORDER BY sequence# DESC";
// 读取properties的数据库信息
static {
Properties properties = new Properties();
try{
FileInputStream fis = new FileInputStream("db.properties");
properties.load(fis);
}catch (IOException e){
System.err.println("文件db.properties没找到"+e.getMessage());
}