question

KiritkumarBaraiya-6957 avatar image
0 Votes"
KiritkumarBaraiya-6957 asked Cathyji-msft commented

Want block dynamic query or on the go user written query

Hi All,

Is there any way where I can block dynamic SQL query or on the go user written SQL query in SQL Server.

Is there any way, please provide me the solution.

sql-server-generalsql-server-transact-sql
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @KiritkumarBaraiya-6957,

Block SQL query? Cancel the query execution? Kill the SQL query? What did you real mean? Could you describe your requirement more clearly to make us better understand.

0 Votes 0 ·

HI ,

Any update for this thread?

0 Votes 0 ·

1 Answer

TomZika avatar image
0 Votes"
TomZika answered ErlandSommarskog commented

Prevent dynamic and ad-hoc queries from users by not giving them permissions in the first place.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

If that is your sole concern, just revoke their access to the database. Or the entire server.

I guess there something more to it, but rather than trying to read your mind, I think it is better that you gives us more details.

0 Votes 0 ·