Re: Bug with instanceName property?



The doc example is unfortunatelly wrong, it should use ";" instead of "/" to
separate instanceName and user. As far as the last connection string, the
first thing that stands out is that you are specifying a port number (1433).
When you specify a port it will take precedence over the instance name.
(Note, I am actually not sure of the behavior of the beta 2 driver here,
this will be true for the final version shipping this month).

Looking at the connection string another thing stands out. Due to customer
feedback we have decided to rename forwardReadOnlyMethod back to its
previous name, selectMethod. Apparently nobody has any idea of what the new
name meant. You will need to make sure to update this when moving your code
to the final driver. This is important because you _will not_ get an
exception for connection key value pairs that are not understood by the
driver. I am not a big fan of silently ignoring key value pairs but this
change was necesary for certification purposes.

--
Angel Saenz-Badillos [MS] DataWorks
This posting is provided "AS IS", with no warranties, and confers no
rights.Please do not send email directly to this alias.
This alias is for newsgroup purposes only.
I am now blogging: http://weblogs.asp.net/angelsb/




"Wes Clark" <WesClark@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:5C247C15-D945-4D81-A646-B41F20C11F50@xxxxxxxxxxxxxxxx
>I can only get a connection to server with a non-default instance name
>using
> the
> jdbc:sqlserver://ITH\SQLSERVER2005:1433;forwardReadOnlyMethod=direct;databaseName=cc;user=sa;password=123
> syntax. This connection succeeds.
> If I try to use
> jdbc:sqlserver://ITH:1433;instanceName=SQLSERVER2005/user=sa;forwardReadOnlyMethod=direct;databaseName=cc;password=123
> following the example in the docs delivered with the Beta 2, I get
> com.microsoft.sqlserver.jdbc.SQLServerException: Failed
> Logon:com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for
> user
> '(null)'. Reason: Not associated with a trusted SQL Server connection.
>
> If I use the syntax
> jdbc:sqlserver://ITH:1433;instanceName=SQLSERVER2005;user=sa;forwardReadOnlyMethod=direct;databaseName=cc;password=123
> I get
> com.microsoft.sqlserver.jdbc.SQLServerException: Failed
> Logon:com.microsoft.sqlserver.jdbc.SQLServerException: Cannot open
> database
> requested in login 'cc'. Login fails.
>
> Any suggestions?


.



Relevant Pages

  • Re: SQL2005: Cannot connect error 11001
    ... Exception Details: System.Data.SqlClient.SqlException: Login failed for user ... Server connection. ... which trusted connection is meant? ... if you changed the port ...
    (microsoft.public.sqlserver.connect)
  • Re: postgresql dblink not working in FC5
    ... ERROR: could not establish connection ... Is the server running on host "127.0.0.1" and accepting ... TCP/IP connections on port 5432? ... if you're specifying 'hostaddr'. ...
    (Fedora)
  • RE: Cant connect to WME over internet
    ... Hi Clarence, ... Tried specifying the port number (i.e., ... >>connection, but when i try to pull through the media ...
    (microsoft.public.windowsmedia.encoder)
  • Re: Managing transactional replication
    ... if the other part of this thread is still relevant, it's not a login issue - ... the problem was that you couldn't make a connection on port 1433 at all - is ... Paul Ibison SQL Server MVP, ...
    (microsoft.public.sqlserver.replication)
  • RE: [PHP] MSSQL_CONNECT problem
    ... Server connection failed ... is that instance setup to use 1433 as the port? ... default port for MSSQL, but the majority of people change that. ... with and without specifying the port - but both ways don't work.... ...
    (php.general)