JDBC Step - Problem Connecting
Good Afternoon,
I'm attempting to connect to Microsoft SQL Server. I've downloaded the correct sqljdbc4.jar library and have tried doing this with both Groovy and the JDBC Request with no success so far. For reference, I'll include both the Groovy script and credentials for the JDBC Request below.
Groovy Script syntax:
import groovy.sql.Sql
class GroovySQLTest{
static void main(String[] args) {
def db_url = "jdbc:sqlserver://SERVERNAME:1433;DatabaseName=DATABASENAME"
def db_username = "USERNAME"
def db_password = "PASSWORD"
def db_driver = "com.microsoft.jdbc.sqlserver.SQLServerDriver"
def sql = Sql.newInstance(db_url,db_username,db_password,db_driver)
sql.execute "Select Top 1 * From TABLE"
}
}
JDBC Request syntax:
Driver: MSSQL(MicrosoftDriver)/com.Microsoft.sqlserver.jdbc.SQLServerDriver
Host: SERVERNAME
Port: 1433
User: USERNAME
Password: PASSWORD
Database: DATABASENAME
For the Groovy script, does anything stand out as incorrect for the syntax? I've tried fully qualifying the table name (server.database.table) in the script's sql.execute command, but this hasn't worked.
For the JDBC Request, everything looks to be fairly simple as far as what credentials I should supply. Again, does the database name have to be fully qualified?
At a loss here as to what I'm doing wrong. Any help would be greatly appreciated.
Thanks,
Tyler