× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Has anyone used Scott's utility to connect to a MS SQL Server instance that has the same port number as another instance? I've requested a separate port number for the additional instance, but am still waiting on it.

Two SQL Server instances on one server:
SQLREP1 (default)
SQLREP1\MSSQL2008R2 (additional instance)

In these cases, both have the default port, 1433.

I've tried two different approaches.

1. Spell out the server-instance-database in the format it appears on this site:
http://msdn.microsoft.com/en-us/library/ms378428.aspx
serverDB = "SQLREP1// MSSQL2008R2/database"
(I also tried it as "SQLREP1/ MSSQL2008R2/database"
serverPath = 'jdbc:jtds:sqlserver://' + serverDB;
// Establish the connection to the server.
gConnection = JDBC_Connect( 'net.sourceforge.jtds.jdbc.Driver':
%trim( serverPath ): %trim( userid ):
%trim( password ) );
Exception in thread "main" java.sql.SQLException: Unknown server host name 'SQLREP1\\MSSQL2008R2'.
at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:401)
at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:184)
Caused by: java.net.UnknownHostException: SQLREP1\\MSSQL2008R2
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:207)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:377)
at java.net.Socket.connect(Socket.java:539)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at net.sourceforge.jtds.jdbc.SharedSocket.createSocketForJDBC3(SharedSocket.java:307)
at net.sourceforge.jtds.jdbc.SharedSocket.<init>(SharedSocket.java:257)
at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:311)
... 1 more

2. I also tried using properties, while referencing the properities page
http://msdn.microsoft.com/en-us/library/ms378988.aspx
prop = JDBC_Properties();
JDBC_setProp(prop: 'userName': %trim( userID ) );
JDBC_setProp(prop: 'password': %trim( password ) );

// Set the instance
If instance <> *blanks;
JDBC_setProp(prop: 'instanceName': %trim( instance ) );
EndIf;

// Set the database
If db <> *blanks;
JDBC_setProp(prop: 'databaseName': %trim( db ) );
EndIf;

Address = 'SQLREP1';
gConnection = JDBC_ConnProp( 'net.sourceforge.jtds.jdbc.Driver':
'jdbc:jtds:sqlserver://' + %trim( address ):
prop );

JDBC_freeProp( prop );

The java error for this (note: the userid and password both have legit values):
Exception in thread "main" java.sql.SQLException: Single-Sign-On is only supported on Windows. Please specify a user name.
at net.sourceforge.jtds.jdbc.TdsCore.sendMSLoginPkt(TdsCore.java:1878)
at net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:588)
at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:345)
at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:184)

Thanks,
Kurt Anderson
Sr. Programmer/Analyst
CustomCall Data Systems

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.