Quick question about running SQLServer scripts from a remote machine using JDBCs. I have a script that starts out as follows:
USE MASTER
GO
IF EXISTS(SELECT * FROM SYS.SYSDATABASES WHERE NAME = 'MockData')
DROP DATABASE MockData
GO
CREATE DATABASE MockData
GO
USE MockData
GO
...
On the local machine I log in as my user and if I open this script file and execute it, it runs just fine. However, if I am on a different machine and connect using the Java JDBC driver (logged in as the same user) I get the following exception.
Error executing: GO
com.microsoft.sqlserver.jdbc.SQLServerException: Could not find stored procedure 'GO'.
Does anyone know why this would fail over JDBC but not on the local machine? Thanks