Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange experience in SQL 2008 when connecting
Message
From
29/06/2009 13:32:26
Peter Wagner
Point Informática Ltda.
Limeira, Brazil
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
Application:
Desktop
Miscellaneous
Thread ID:
01408945
Message ID:
01409139
Views:
75
I tried this, but it shows an error message and then the SQL connection prompt form, if I just click the OK button in the SQL connection prompt form, the connection is established.

It's very strange, I'm not changing anything, just clik the OK button, why it can't pass direct without showing the error and the SQL connection prompt form like when I make a connection defining "Server=BOSS2000\SQL10"

I realy like to know what I'm missing here.

The error message returned is:
---------------------------
Microsoft SQL Server Login
---------------------------
Connection failed:
SQLState: '08004'
SQL Server Error: 4060
Server rejected the connection; Access to selected database has been denied
Connection failed:
SQLState: '28000'
SQL Server Error: 18456
[Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user 'sa'.





>A named instance is configured by default to use a dynamic port assigment. As result, you cannot use a port # in the connection string unless you change change the port # for the instanv=ce to a permanent one.
>Try
>
>cStringConnect =("Driver={SQL Server Native Client 10.0}; Server=192.168.1.2\SQL10; UID=sa; PWD=zqtzip1ploc; 
>Database=AdventureWorks; Network Library=DBMSSOCN")
>nID = SQLStringConnect(cStringConnect)
>?nid
>
>>I have SQL 2008 installed in a instance called: 'SQL10'
>>
>>IF I use this connection string all workks fine
>
>>cStringConnect =("Driver={SQL Server Native Client 10.0}; Server=BOSS2000\SQL10; UID=sa; PWD=zqtzip1ploc; 
>Database=AdventureWorks; Network Library=DBMSSOCN")
>nID = SQLStringConnect(cStringConnect)
>?nid
>
>>But if I try to connect using this string, it fails
>>
>>cStringConnect =("Driver={SQL Server Native Client 10.0};SERVER=192.168.1.2\SQL10; Address=192.168.1.2,1433; UID=sa; PWD=zqtzip1ploc; 
>DATABASE=AdventureWorks")
>>nID = SQLStringConnect(cStringConnect)
>>?nid
>>
>>Returns this error message:
>>---------------------------
>>Microsoft SQL Server Login
>>---------------------------
>>Connection failed:
>>SQLState: '08004'
>>SQL Server Error: 4060
>>Server rejected the connection; Access to selected database has been denied
>>
>>Connection failed:
>>SQLState: '28000'
>>SQL Server Error: 18456
>>[Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user 'sa'.
>>
>>Why if I can connect to the database in the first connection string?
>>Returns the same error when I remove the \SQL10 when I try to connect using IP
>>Any advice:?
>>
>>TIA
>>
>>Peter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform