Solved

Login Failed to Newly Created SQL Database

Posted on 2016-10-19
4
26 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 13

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 13

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

752 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