SELECT permission was denied on the Notes object, in the Sticky database, in the dbo schema,

He appears here:

SyncAdapter notesSyncAdapter = notesBuilder.ToSyncAdapter(); ((SqlParameter)notesSyncAdapter.SelectIncrementalInsertsCommand.Parameters["@sync_last_received_anchor"]).DbType = System.Data.DbType.Binary; ((SqlParameter)notesSyncAdapter.SelectIncrementalInsertsCommand.Parameters["@sync_new_received_anchor"]).DbType = System.Data.DbType.Binary; 

The user has all permissions for the table, schema, and database. Any idea what this might make this exception?

more details: SQLiteConnectionStringBuilder builder = new SQLiteConnectionStringBuilder ();

builder ["Data Source"] = "achernar"; builder ["User ID"] = "sbbf974"; builder ["Password"] = "whatever"; builder ["Integrated Security"] = false; builder ["Home directory"] = "sticky";

+4
source share
3 answers

The problem was with the user, as Abe suggested. The user was dbo, which means that although he should have all permissions, this is not the case. So I did this to create another login, which I gave the following roles in the database: public, db_datareader, db_datawriter. He is working now.

+2
source

Are you absolutely sure that your code and database are synchronized correctly? If you can recommend that one of your colleagues check the following. Sometimes a fresh set of eyes can catch something you don’t notice ...

  • You mean the correct database in your code (as opposed to the development database)
  • You are connecting as the user you think in your code.
  • This user has permissions in the DB to which you are connecting to

I know this probably seems obvious, but I would say it's worth someone else checking you twice. I know that I was caught this before ...

+1
source

Who is the user? I really trust SQL Server, which clearly states that the current connection does not have permission. The synchronization structure goes through several levels through IIS and ISAPI until it reaches the database, so you better understand what credentials are used. Is there an impersonation at the IIS level? Limited delegation? Does the synchronization environment client authenticate using IIS with (NTLM / Digest / Basic / Nothing)?

0
source

All Articles