SQL Server 2008 - Permission Issue

Posted on 2012-09-11
Medium Priority
Last Modified: 2012-09-21
Good evening experts:

I'm having some issues with what appears to be permission issues while attempting to insert records from a .NET application.  The strange this with this issue is that it is limited to two specific tables, and only occurs when inserting records.

Using the same user credentials, I have no issue with inserting data into many of the other tables utilized in the .net application.

When attempting to execute the INSERT stored procedure, I receive the following exception:

Cannot find the object 'tblVendor' because it does not exist or you do not have permissions.

If I execute a SELECT query against tblVendor with the same credentials, I am able to retrieve all the records from this table.

This situation applies to two tables in the database, and any help would be much appreciated.

Using SQL SERVER 2008 R2
Question by:escheider
  • 2

Author Comment

ID: 38389452
okay .. just narrowed it down .. the two stored procedures I am attempting to execute truncate the table before inserting records ..

So evidently, the account must have the ability to truncate the tables.
LVL 53

Accepted Solution

Vitor Montalvão earned 2000 total points
ID: 38391729
For TRUNCATE TABLE operations you need to give ALTER TABLE permission to user.
If you don't want to give that permission, you can create stored procedure with EXECUTE AS clause:
CREATE PROCEDURE dbo.usp_Example
SELECT columnName FROM tableName

Open in new window


Author Closing Comment

ID: 38421649
apologize for the delay .. it was a few weeks before I was able to get back to the client.   Appreciate the input .. this takes care of the problem.

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

864 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