/**用于执行某表的备份(内部类)线程
* @from fhadmin.cn
* Callable 有返回值的线程接口
*/
class DbBackUpCallable implements Callable<Object>{
String tableName = null;
public DbBackUpCallable(String tableName){
this.tableName = tableName;
}
@Override
public Object call() {
try {
String remoteDB = pros.getProperty("remoteDB"); //是否远程备份数据库 yes or no
String DBSeverport = pros.getProperty("DBSeverport"); //远程服务器备份程序端口
String dbtype = pros.getProperty("dbtype"); //数据库类型
String username = pros.getProperty("username"); //用户名
String password = pros.getProperty("password"); //密码
String address = pros.getProperty("dbAddress"); //数据库连接地址
String databaseName = pros.getProperty("databaseName"); //数据库名
String dbpath = pros.getProperty("dbpath"); //数据库的安装路径
String sqlpath = pros.getProperty("sqlFilePath"); //存储路径
String ffilename = DateUtil.getSdfTimes();
String commandStr = "";
if(!"sqlserver".equals(dbtype)){
sqlpath = sqlpath+DateUtil.getDays()+"/"; //日期当路径分支
if("yes".equals(remoteDB)
java 操作数据库备份
最新推荐文章于 2024-05-08 17:33:03 发布