Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connection Woes
Message
From
31/10/2005 09:19:07
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01062794
Message ID:
01063518
Views:
9
From SQL books online as is:
"Windows Authentication
When a user connects through a Windows NT 4.0 or Windows 2000 user account, SQL Server revalidates the account name and password by calling back to Windows NT 4.0 or Windows 2000 for the information.

SQL Server achieves login security integration with Windows NT 4.0 or Windows 2000 by using the security attributes of a network user to control login access. A user's network security attributes are established at network login time and are validated by a Windows domain controller. When a network user tries to connect, SQL Server uses Windows-based facilities to determine the validated network user name. SQL Server then verifies that the person is who they say they are, and then permits or denies login access based on that network user name alone, without requiring a separate login name and password.

Login security integration operates over any supported network protocol in SQL Server.

Note If a user attempts to connect to an instance of SQL Server providing a blank login name, SQL Server uses Windows Authentication. Additionally, if a user attempts to connect to an instance of SQL Server configured for Windows Authentication Mode by using a specific login, the login is ignored and Windows Authentication is used.

Windows Authentication has certain benefits over SQL Server Authentication, primarily due to its integration with the Windows NT 4.0 and Windows 2000 security system. Windows NT 4.0 and Windows 2000 security provides more features, such as secure validation and encryption of passwords, auditing, password expiration, minimum password length, and account lockout after multiple invalid login requests."

See "Authentication Modes" in SQL books online.
Cetin

>So how does 'Trusted_Connection work? Does it try to match
>the SQL user against the person logged into Windows?
>
>
>
>
>>IMHO that's the secure one and you should have whenever possible. SQL authentication (username and password) is not the recommended one but still yet the most seen in examples.
>>Cetin
>>
>>>Is there any reason to not have 'Trusted_connection=yes' in my
>>>connection string by default?
>>>
>>>
>>>
>>>>>I'm creating connections to 2 databases, each on different servers.
>>>>>
>>>>>The first connection works. The second errors with:
>>>>>Connectivity error: [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'sa'.
>>>>>Reason: Not associated with a trusted SQL Server connection.
>>>>>
>>>>>When I look at login 'sa' in the Enterprise Manager, the password is filled in
>>>>>with a 10 character string.
>>>>>
>>>>>I did not set it, so I'm not sure whats going on.
>>>>>
>>>>>I'd like it to take the Windows login info.
>>>>>
>>>>>Can someone point me in the right direction?
>>>>>
>>>>>Thanks
>>>>
>>>>Kevin,
>>>>It means you set SQL server to use windows authentication only and the server you're connecting to doesn't trust the windows account you use.
>>>>
>>>>Can you connect with this?
>>>>
>>>>lnHandle = SQLStringConnect('Driver=SQL server;server=servername;Trusted_connection=yes')
>>>>? m.lnHandle
>>>>SQLDisconnect(m.lnHandle)
>>>>
>>>>Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform