Solved

Login Failed to Newly Created SQL Database

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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Join & Write a Comment

Suggested Solutions

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
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, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

760 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

23 Experts available now in Live!

Get 1:1 Help Now