![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Add Some Spring to Your Oracle JDBC Access | iBot | Oracle Updates (RSS) | 0 | 04-06-2008 06:10 AM |
| Script runs fine on UNIX Server...Not through MSK Tool kit on Windows Server | madhunk | UNIX for Dummies Questions & Answers | 5 | 01-31-2008 01:30 PM |
| MSSQL JDBC Driver Single Sign On Auth from Unix 0.1 (Default branch) | iBot | Software Releases - RSS News | 0 | 01-12-2008 07:10 AM |
| Transfer file from local unix server to remote server | indira | Shell Programming and Scripting | 2 | 05-03-2007 07:35 AM |
| postgresql-jdbc on Suse | marina | SuSE | 0 | 09-15-2005 03:32 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Unix to Sql Server via JDBC
I am trying to connect SQL SERVER VIA JDCB. Following is something I tried and will appreciate any help what I am doing wrong
Here’s what I did, I tried several variations, but I keep getting this error: Exception in thread "main" java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Unable to connect. Invalid URL I tried: Driver d = (Driver)Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance(); Connection con = DriverManager.getConnection("jdbc:microsoft:sqlserver://133.5.144.155/:1433/IE;selectMethod=cursor", "jdbc123", "test1456"); replacing ://133.5.144.155 with \\IP my classpath is : voyager->whseuser: echo $CLASSPATH /apps/twhse/scripts/jen:/apps/twhse/scripts/jen/mssqlserver/lib/msutil.jar:/apps/twhse/scripts/jen/mssqlserver/lib/mssqlserver.jar:/apps/twhse/scripts/jen/mssqlserver/lib/msbase.jar and it’s not giving me a classpath error, so I think my classpath is right. import java.sql.*; //import oracle.jdbc.*; public class HelloWorldApp { public static void main(String[] args) throws Exception { System.out.println("Hello World!"); // Display the string. Driver d = (Driver)Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance(); Connection con = DriverManager.getConnection("jdbc:microsoft:sqlserver://133.5.144.155/:1433/IE;selectMeth od=cursor", "jdbc123", "test456"); } } I have never tried this on a sqlserver before, only in oracle. will appreciate any response at cqldba@gmail.com thanks sam |
|
|||||
|
Quote:
Quote:
jdbc:<client>:mssqlserver4:<instancename>@<ip/dns>:<port> Munging the data in your supplied URL would produce: jdbc:microsoft:sqlserver:IE@133.5.144.155:1433 You'd probably do better looking at your client config manual for the exact config file syntax to use. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|