Using ApplicationIntent=ReadOnly in C# with stored procedures which modfies data to temp/non temp tables

Annapurna Seelam 21 Reputation points

I'm using SSMS 18 and using a connection with ApplicationIntent=ReadOnly parameter in C# AppConfig for executing some stored procedures, these procs are inserted in local db and this is my question: stored procedures which insert data into temp or non temp table can still insert, update, delete records even though connection is with ApplicationIntent=ReadOnly ?

A set of technologies in the .NET Framework for building web applications and XML web services.
3,317 questions
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,389 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sasuke Uchiha 76 Reputation points

    Hi, I'm assuming that you're trying to not insert the data with Application Intent as only read? If so, that would still insert records to your temp table as its the default feature of the program. I assume non-temp table you've mentioned is a table? Then you should technically do restrict, however there are bugs within .NET which allows CRUD operations through and still insert, update, delete etc a record. OR if it finds any primary primary server (assuming you're making application intent read-only to secondary replica of real time server) then it'll auto connect to that and do the operations.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Maxwell McGraw 1 Reputation point

    Despite the Application Intent as Only read, the data would still be manipulated and can effect records.

    0 comments No comments