Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Login Failed to Newly Created SQL Database

Posted on 2016-10-19
4
Medium Priority
?
31 Views
Last Modified: 2016-10-19
Hello,
Running SQL Express 2012 and have created a database "Admin_Data".
Using ODBC connection I can connect to the system databases but get an error on the "Admin_Data"

Attempting connection
[Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Login failed for user 'DOMAIN\username'.
[Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Cannot open database "Admin_Data" requested by the login. The login failed.
Disconnecting from server

TESTS FAILED!

I cannot see what the difference is between the 2..

Any help gratefully received
Iain
0
Comment
Question by:iainmacleod
  • 2
  • 2
4 Comments
 
LVL 14

Expert Comment

by:Dustin Saunders
ID: 41850506
Did you do the installation in Mixed Mode?

If you connect as SA and go to the database security, do domain users have permission?

This is an assumption, but did you change 'DOMAIN\Username' for security purposes or is that what it shows the login tried as?
0
 

Author Comment

by:iainmacleod
ID: 41850540
Dustin, thanks for your reply.
Have tried mixed mode as well as Windows. I finally managed to get access by adding my Domain username into the logins section.
Ideally I wanted to give all DOMAIN USERS access to this database (With restrictions) . Hopefully to give some stability and control via AD.
DOMAIN\username was for security.
Although reasonably ok with AD etc I am new to SQL so would be interested if I am going about this in the best way.
Thanks
Iain
0
 
LVL 14

Accepted Solution

by:
Dustin Saunders earned 2000 total points
ID: 41850592
Yes, you can set your connection to use the integrated security and then assign domain groups/users to the database via the Security drop down.

databasePermission.png
You can set their permission level there (such as data reader or data writer) for the group/user.
0
 

Author Closing Comment

by:iainmacleod
ID: 41851507
Dustin, Thank you very much. Works a treat...
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I have a large data set and a SSIS package. How can I load this file in multi threading?
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

926 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