Solved

Users cannot access a specific table within their Microsoft SQL Server database

Posted on 2016-11-04
6
56 Views
Last Modified: 2016-11-09
Users on a daily bases works with a database but have problems with one specific table within the database.  Yet, administrator users don’t have problem with the specific table, only non-admin users.  Both users and admin-users have Windows Server username/password and SQL username/password.

How can we fix this?
0
Comment
Question by:rayluvs
  • 4
  • 2
6 Comments
 
LVL 28

Accepted Solution

by:
Pawan Kumar earned 500 total points
ID: 41875075
What is the schema of that table ?

dbo or something else? Try below -

CREATE USER [UserNamePawan] FROM LOGIN [LoginNamePawan]
GRANT SELECT ON SCHEMA::SchemaName TO [UserNamePawan]
GRANT UPDATE ON SchemaName.TableName TO [UserNamePawan]
GRANT DELETE ON SchemaName.TableName TO [UserNamePawan]
GRANT INSERT ON SchemaName.TableName TO [UserNamePawan]

Open in new window

0
 

Author Comment

by:rayluvs
ID: 41875122
It's dbo; ran scripts, problem persist.
0
 

Author Comment

by:rayluvs
ID: 41875124
No, wait, the schema didn't do it... Will proceed and let u know.
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 28

Expert Comment

by:Pawan Kumar
ID: 41875134
Yes I shall wait.
0
 

Author Comment

by:rayluvs
ID: 41875615
Wasn't successful.

The connection strings tried were:

  • Provider=SQLOLEDB; Initial Catalog=DATABASENAME; Data Source=SERVERNAME; integrated security=SSPI; persist security info=True;

  • Provider=sqloledb;Data Source=SERVERNAME;Initial Catalog=DATABASENAME;User ID=sa;Password=BLAHBLAH;

  • Provider=sqloledb;Data Source=SERVERNAME;Initial Catalog=DATABASENAME;User ID=USERNAME;Password=BLAHBLAH;

The only one that worked was the 2nd one.

The problem with that is that we have to hard-code the sa password and for obvious reason is not an optimal choice.
0
 

Author Closing Comment

by:rayluvs
ID: 41881473
The problem hasn't reoccurred.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Suggested Solutions

Audit has been really one of the more interesting, most useful, yet difficult to maintain topics in the history of SQL Server. In earlier versions of SQL people had very few options for auditing in SQL Server. It typically meant using SQL Trace …
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

733 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