Solved

Login Failed to Newly Created SQL Database

Posted on 2016-10-19
4
22 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 12

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 12

Accepted Solution

by:
Dustin Saunders earned 500 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

910 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now