测试方法代码:
public class OscarExport {
public static final byte level = 2;
public static void main(String[] args) throws OBaseException, IOException, SQLException {
BackupParameter backupParameter = new BackupParameter();
backupParameter.setHostname("10.0.5.123");
backupParameter.setPort("2003");
backupParameter.setDatabase("OSRDB");
backupParameter.setUsername("SYSDBA");
backupParameter.setPassword("szoscar55");
backupParameter.setBkFilePath("~/test/bin/222.osr");
backupParameter.setLevel(level);
Vector vector = new Vector();
vector.add("SYSDBA");
backupParameter.setSchema(vector);
BaseBackup cmdBackupInstance = BackupFactory.getCmdBackupInstance(backupParameter);
cmdBackupInstance.doBackup();
}
}
|