44 |
} |
} |
45 |
|
|
46 |
public void renameResultTables() throws SQLException { |
public void renameResultTables() throws SQLException { |
47 |
|
Constants consts = Constants.getInstance(); |
48 |
|
String ext = consts.getTableExtension(); |
49 |
|
|
50 |
logger.info("Dropping old backup table (if exists)"); |
logger.info("Dropping old backup table (if exists)"); |
51 |
String sql = "DROP TABLE IF EXISTS fulddaekning.afstand_anden_rute_old"; |
String sql = "DROP TABLE IF EXISTS fulddaekning.afstand_anden_rute_old" + ext; |
52 |
conn.createStatement().executeUpdate(sql); |
conn.createStatement().executeUpdate(sql); |
53 |
|
|
54 |
logger.info("Rename tables"); |
logger.info("Rename tables"); |
55 |
sql = "RENAME TABLE fulddaekning.afstand_anden_rute TO fulddaekning.afstand_anden_rute_old, fulddaekning.afstand_anden_rute_ny TO fulddaekning.afstand_anden_rute"; |
sql = "RENAME TABLE fulddaekning.afstand_anden_rute" + ext + " TO fulddaekning.afstand_anden_rute_old" + ext + ", fulddaekning.afstand_anden_rute_ny TO fulddaekning.afstand_anden_rute" + ext; |
56 |
conn.createStatement().executeUpdate(sql); |
conn.createStatement().executeUpdate(sql); |
57 |
} |
} |
58 |
|
|
245 |
connectionProps.put("user", db_user); |
connectionProps.put("user", db_user); |
246 |
connectionProps.put("password", db_pass); |
connectionProps.put("password", db_pass); |
247 |
|
|
248 |
|
//For debug output, tilføj denne til JDBC url'en: &profileSQL=true |
|
|
|
249 |
conn = DriverManager.getConnection( |
conn = DriverManager.getConnection( |
250 |
"jdbc:mysql://" + |
"jdbc:mysql://" + |
251 |
db_host + |
db_host + |