Getting "select permission denied" when using LINQ but my account is a sysadmin

Posted by Wayne M on Stack Overflow See other posts from Stack Overflow or by Wayne M
Published on 2009-09-03T00:57:17Z Indexed on 2010/04/04 10:03 UTC
Read the original article Hit count: 243

Filed under:
|

I have a console app that's geared to be automatically ran as a Scheduled Task. I use LINQ to SQL to pull some data out of the database, format it into a CSV and email it to a client. All of a sudden I am getting the error "SELECT permission denied for table", but the account I'm using to connect to the database (specified in my app.config file) has the "sysadmin" server role (bad programmer, I know; I'll get around to changing it to a better account later but I want to make sure it works first).

I can connect directly to the SQL database using that very same account and query the table in question without a problem, it only seems to be when using the LINQ code. Any idea what would be causing this?

© Stack Overflow or respective owner

Related posts about LINQ

Related posts about sql-server