?
Solved

Windows 2000 Login for SQL Server 2000

Posted on 2004-11-10
17
Medium Priority
?
179 Views
Last Modified: 2013-12-04
I have an application that was developed using VB 6 and uses SQL Server 2000 as the database.  I am using SQL Server authentication in my code to access the data and the SQL Server user is setup and has the correct rights to the tables and stored procedures.  The Windows 2000 Server running SQL Server is part of a workgroup, not a domain.  I am running the application from computers on a seperate domain. I can connect to the SQL Server fine if the login on the computer running the application is the same login name and password, as on the Windows 2000 Server.  If the user's login doesn't exist or the password is different then I cannot connect to the SQL server in my application.  Is there a way to work around this security issue.  I'm confused because I assumed that if the SQL Server authentication user is setup on the SQL Server I should be able to get to the data reguardless of who the Windows login is.

Thanks,
Scott
0
Comment
Question by:sborchers
  • 8
  • 8
17 Comments
 
LVL 21

Expert Comment

by:marc_nivens
ID: 12555186
It sounds like the application itself is sending the logged in credentials.  If that is the case you will need to code it to pass credentials the user supplies, not the credentials of the logged on user.
0
 
LVL 7

Expert Comment

by:msice
ID: 12558291
Are you sure that your SQL server is not in mixed authentication mode?
0
 

Author Comment

by:sborchers
ID: 12559280
msice,
Yes my server is in mixed authentication mode.  I am passing the SQL Server user name and password to access the database.  If the a user tries to access the data with a username and password that are the same as a username and passoword setup on the Windows Server running the SQL Server then I can connect to the SQL Server. If the username and password do not exist on the Windows Server running the SQL Server then I can't connect to the SQL Server.
0
Threat Trends for MSPs to Watch

See the findings.
Despite its humble beginnings, phishing has come a long way since those first crudely constructed emails. Today, phishing sites can appear and disappear in the length of a coffee break, and it takes more than a little know-how to keep your clients secure.

 

Author Comment

by:sborchers
ID: 12559371
marc nivens,

I am passing the correct credentials to access SQL Server using SQL Server authentication.  The only way I know how to pass the correct credentials to the Windows server is by mapping a drive in code, but I'm not sure I want to do that becuase I have over 50 pc's with different mapped drives.
0
 
LVL 7

Expert Comment

by:msice
ID: 12559666
Have you thought about using SQL Server only authentication.
0
 

Author Comment

by:sborchers
ID: 12560087
The only two authentication modes are SQL Server and Windows or Windows only.
0
 
LVL 7

Expert Comment

by:msice
ID: 12560090
Are you using an ODBC connection?
0
 

Author Comment

by:sborchers
ID: 12560100
Yes, I am using an ODBC connection.
0
 
LVL 7

Expert Comment

by:msice
ID: 12560182
If you connect through ODBC, in the ODBC Administrator, choose SQL Server authentication when you configure the data source.
0
 
LVL 7

Expert Comment

by:msice
ID: 12560284
"I'm confused because I assumed that if the SQL Server authentication user is setup on the SQL Server I should be able to get to the data reguardless of who the Windows login is." - Yes you should. In the ADO connection string, where you include the parameters "UID" and "PWD" when you use ODBC, and "User ID" and "Password" when you use the SQLOLEDB provider set it to the sa user and pass for all and work backwards from there.
0
 

Author Comment

by:sborchers
ID: 12560302
I am doing that currently.  I am using SQL Server Authentication in my ODBC, but if I don't have the username and password setup on the Windows 2000 Server for the user of the computer that is trying to run the application then I receive an error.  I'm not sure if the problem is because I'm trying to run the application in a domain and the WIndows/SQL Server is in a seperate workgroup, but it is a problem.
0
 

Author Comment

by:sborchers
ID: 12560314
Good thought, I'll try that.  And yes I thought I should be able to connect regardless of the windows user.
Thanks
0
 
LVL 7

Accepted Solution

by:
msice earned 2000 total points
ID: 12560321
0
 

Author Comment

by:sborchers
ID: 12560407
Client OS we are working with currently is Windows 200 Pro, but when live we will be using Win95,98 and 200Pro.  The sa user still did not work.  I think I'm going to chase the named pipes IPC issue.
0
 

Author Comment

by:sborchers
ID: 12560523
The Guest account wan't enabled.  I enabled it and the connection worked.  Exactly what I was looking for.  I new there had to be something with the NT security.
Thanks,
Scott
0
 
LVL 7

Expert Comment

by:msice
ID: 12560525
Yes and take a look at the 98/95 issues as well they will require attention.
0
 
LVL 7

Expert Comment

by:msice
ID: 12560574
Cool glad to help and that you got it working.
Thank You for the points and the grade.
0

Featured Post

 The Evil-ution of Network Security Threats

What are the hacks that forever changed the security industry? To answer that question, we created an exciting new eBook that takes you on a trip through hacking history. It explores the top hacks from the 80s to 2010s, why they mattered, and how the security industry responded.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SHARE your personal details only on a NEED to basis. Take CHARGE and SECURE your IDENTITY. How do I then PROTECT myself and stay in charge of my own Personal details (and) - MY own WAY...
Recently, I read that Microsoft has analysed statistics for their security intelligence report. It revealed: still, the clear majority of windows users do their daily work as administrator. An administrative account is a burden, security-wise. My ar…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question