sql server 2008 permissions for user connecting from another machine on same network not as sysadmin

Posted on 2014-11-06
Last Modified: 2014-11-16
I have 2 machines and 2 users for MS SQL server 2008 R2
Both machines belong to the same domain network.

machine A is a windows 7 pro pc trying to setup an odbc connection to machine B ( sql server)running
machine B windows 2008 r2 server running sql server

I am setting up an odbc on machine a to access machine b
       If i setup the connection as "sa" the connection works fine.
       If i setup the connection as "myuser" i cant connect to the server getting error

As a suggestion i tried adding "sysadmin" role to "myuser" and i am able to connect ok, but i dont think this is the right way to do it. Looking to see what actually needs to be setup for myuser to be able to connect not as a sysadmin.
Question by:Extreme66
  • 6
  • 4

Expert Comment

by:Beth Kludt
ID: 40427456
Did you grant "myuser" access to the target database in addition to creating its login?

Author Comment

ID: 40427570
Yes, thanks
LVL 47

Expert Comment

by:Vitor Montalvão
ID: 40428525
What's the message error?
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.


Author Comment

ID: 40428565
I should have put that in already, thanks
Connection failed:
SQLState: '28000'
SQL Server Error: 18456
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'myuser'.

I am able to login to enterprise manager with the myuser id however and see my databases.
LVL 47

Expert Comment

by:Vitor Montalvão
ID: 40428575
Enterprise Manager?
Shouldn't be Management Studio?
Enterprise Manager is from SQL Server 2000 and can't connect to superior versions of SQL Server.

Author Comment

ID: 40428814
Sorry had old terminology in my head, yes its Microsoft SQL Management Studio
LVL 47

Expert Comment

by:Vitor Montalvão
ID: 40432563
The error appears when you create the DSN in ODBC?
And which permissions has that user in the SQL Server instance?

Author Comment

ID: 40432677
Do you mean sql server permissions or windows permissions?
server roles -> public
user mapping -> db_datareader and public
status grant and enabled
no securables
LVL 47

Expert Comment

by:Vitor Montalvão
ID: 40432907
Apparently you have it well configured.
Can't figure out from here. Sorry.

Accepted Solution

Extreme66 earned 0 total points
ID: 40435392
thanks for the help but i actually figured it out, after server hardening appearantly i needed to add this final grant.


Author Closing Comment

ID: 40445430
Hopefully this solution finds others, as it would have saved me TONS of time due to an non descriptive error

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
DTS Connection Failed 7 66
Need some help to cast ntext to nvarchar SQL 2000 7 31
Whitelisting applications 2 20
Dropbox in Windows Server 2008 4 28
New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
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 set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

786 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