diff --git a/ashv/src/main/java/core/processing/GetFromRemoteAndStore.java b/ashv/src/main/java/core/processing/GetFromRemoteAndStore.java index ba88027..9f11a9d 100644 --- a/ashv/src/main/java/core/processing/GetFromRemoteAndStore.java +++ b/ashv/src/main/java/core/processing/GetFromRemoteAndStore.java @@ -70,6 +70,7 @@ public class GetFromRemoteAndStore { private ConnProfile connProfile; private Connection connection = null; + private Connection connectionForTrace = null; private Map> metadataMap = new HashMap<>(); @@ -538,6 +539,7 @@ private int getColumnIdForCol(String filterCol){ private void initializeConnection() throws SQLException { this.connection = this.remoteDBManager.getConnection(); + this.connectionForTrace = this.remoteDBManager.getConnection(); } private List loadSqlMetaData(String sqlName, String sqlText) { @@ -738,15 +740,13 @@ public String setTrace10046(int sid, int serial, boolean bool) { try { if (bool) { - stmt = remoteDBManager.getBasicDataSource().getConnection() - .prepareCall("begin " + + stmt = connectionForTrace.prepareCall("begin " + "SYS.DBMS_MONITOR." + "SESSION_TRACE_ENABLE" + "(?,?,true,true); end;"); out = "SYS.DBMS_MONITOR.SESSION_TRACE_ENABLE successfully executed!"; } else { - stmt = remoteDBManager.getBasicDataSource().getConnection() - .prepareCall("begin " + + stmt = connectionForTrace.prepareCall("begin " + "SYS.DBMS_MONITOR." + "SESSION_TRACE_DISABLE" + "(?,?); end;"); diff --git a/ashv/src/main/java/remote/RemoteDBManager.java b/ashv/src/main/java/remote/RemoteDBManager.java index e18eb32..e96be51 100644 --- a/ashv/src/main/java/remote/RemoteDBManager.java +++ b/ashv/src/main/java/remote/RemoteDBManager.java @@ -34,7 +34,7 @@ public void init(ConnProfile connProfile) { this.basicDataSource.setUrl(this.connProfile.getUrl()); this.basicDataSource.setUsername(this.connProfile.getUserName()); this.basicDataSource.setPassword(passConfig.decrypt(this.connProfile.getPassword())); - this.basicDataSource.setInitialSize(2); + this.basicDataSource.setInitialSize(3); } catch (ClassNotFoundException e) { log.error(e.toString());