diff --git a/symmetric-assemble/src/assembly/assembly-server.xml b/symmetric-assemble/src/assembly/assembly-server.xml
index 7b1568c794..d059a12955 100644
--- a/symmetric-assemble/src/assembly/assembly-server.xml
+++ b/symmetric-assemble/src/assembly/assembly-server.xml
@@ -23,6 +23,7 @@
bin/dbexport
bin/dbimport
bin/dbfill
+ bin/dbsql
bin/sym_service
bin/sym_service.initd
@@ -58,6 +59,11 @@
/bin
755
+
+
+ /bin
+ 755
+
/bin
diff --git a/symmetric-client/src/main/java/org/jumpmind/symmetric/DbSqlCommand.java b/symmetric-client/src/main/java/org/jumpmind/symmetric/DbSqlCommand.java
new file mode 100644
index 0000000000..9dcf9c8498
--- /dev/null
+++ b/symmetric-client/src/main/java/org/jumpmind/symmetric/DbSqlCommand.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to JumpMind Inc under one or more contributor
+ * license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding
+ * copyright ownership. JumpMind Inc licenses this file
+ * to you under the GNU Lesser General Public License (the
+ * "License"); you may not use this file except in compliance
+ * with the License.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see
+ * .
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.jumpmind.symmetric;
+
+import org.apache.commons.cli.CommandLine;
+import org.apache.commons.dbcp.BasicDataSource;
+import org.h2.tools.Shell;
+
+public class DbSqlCommand extends AbstractCommandLauncher {
+
+ public DbSqlCommand() {
+ super("dbsql", "", "DbSqlShell.Option.");
+ }
+
+ public static void main(String[] args) {
+ new DbSqlCommand().execute(args);
+ }
+
+ @Override
+ protected boolean printHelpIfNoOptionsAreProvided() {
+ return false;
+ }
+
+ @Override
+ protected boolean requiresPropertiesFile() {
+ return true;
+ }
+
+ @Override
+ protected boolean executeWithOptions(CommandLine line) throws Exception {
+ BasicDataSource basicDataSource = getDatabasePlatform(false).getDataSource();
+ String url = basicDataSource.getUrl();
+ String user = basicDataSource.getUsername();
+ String password = basicDataSource.getPassword();
+ String driver = basicDataSource.getDriverClassName();
+ Shell shell = new Shell();
+ shell.runTool("-url", url, "-user", user, "-password", password, "-driver", driver);
+ return true;
+ }
+
+
+}
diff --git a/symmetric-server/src/main/deploy/bin/dbsql b/symmetric-server/src/main/deploy/bin/dbsql
new file mode 100644
index 0000000000..a5996d1117
--- /dev/null
+++ b/symmetric-server/src/main/deploy/bin/dbsql
@@ -0,0 +1,50 @@
+#!/bin/sh
+#
+# Run commandline support through DbDump
+#
+
+PRGDIR=`dirname "$0"`
+if [ "$PRGDIR" = "" ]
+then
+ PRGDIR=`echo $0 | sed 's/\/sym//g'`
+fi
+if [ "$PRGDIR" = "" ]
+then
+ PRGDIR="."
+fi
+LIBDIR=$PRGDIR/../lib
+WEBLIBDIR=$PRGDIR/../web/WEB-INF/lib
+LOG4JXML="file:$PRGDIR/../conf/log4j.xml"
+RUNJAVA=java
+
+if [ -n "log4j.xml" -a -f "log4j.xml" ]
+then
+ LOG4JXML="file:$PRGDIR/log4j.xml"
+fi
+
+if [ -x "$JAVA_HOME/bin/java" ]
+then
+ RUNJAVA="$JAVA_HOME/bin/java"
+fi
+
+CLASSPATH=../patches
+SEP=:
+
+if uname | grep -i cygwin > /dev/null
+then
+ SEP=";"
+fi
+
+for jar in $LIBDIR/*
+do
+ CLASSPATH=${CLASSPATH}${SEP}${jar}
+done
+
+for jar in $WEBLIBDIR/*
+do
+ CLASSPATH=${CLASSPATH}${SEP}${jar}
+done
+
+#echo $CLASSPATH
+
+exec "$RUNJAVA" -Duser.language=en -Djava.io.tmpdir=../tmp -Dsym.keystore.file="$PRGDIR/../security/keystore" -Djavax.net.ssl.trustStore="$PRGDIR/../security/cacerts" -Dsun.net.client.defaultReadTimeout=1800000 -Dsun.net.client.defaultConnectTimeout=1800000 -Dlog4j.configuration=$LOG4JXML -cp $CLASSPATH org.jumpmind.symmetric.DbSqlCommand "$@"
diff --git a/symmetric-server/src/main/deploy/bin/dbsql.bat b/symmetric-server/src/main/deploy/bin/dbsql.bat
new file mode 100644
index 0000000000..adc085be71
--- /dev/null
+++ b/symmetric-server/src/main/deploy/bin/dbsql.bat
@@ -0,0 +1,14 @@
+@echo off
+
+set PRGDIR=%~dp0
+set HOMEDIR=%PRGDIR%..
+set CONFDIR=%HOMEDIR%\conf
+set CLASSPATH=%HOMEDIR%\patches
+
+for %%i in ("%HOMEDIR%\lib\*.jar") do call "%PRGDIR%cpappend.bat" %%i
+
+for %%i in ("%HOMEDIR%\web\WEB-INF\lib\*.jar") do call "%PRGDIR%cpappend.bat" %%i
+
+rem echo CLASSPATH=%CLASSPATH%
+
+java -Duser.language=en -Djava.io.tmpdir=../tmp -Dsym.keystore.file="%HOMEDIR%\security\keystore" -Djavax.net.ssl.trustStore="%HOMEDIR%\security\cacerts" -Dlog4j.configuration="file:%CONFDIR%\log4j.xml" -Dsun.net.client.defaultReadTimeout=1800000 -Dsun.net.client.defaultConnectTimeout=1800000 org.jumpmind.symmetric.DbSqlCommand %1 %2 %3 %4 %5 %6 %7 %8 %9
\ No newline at end of file