以只读模式执行SQL查询 [英] Executing SQL query in ReadOnly mode
本文介绍了以只读模式执行SQL查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
谁能告诉我如何在只读模式下执行sql语句,以便无法执行delete命令.
现在写,我已经创建了一个具有ReadOnly权限的新用户,但是我想办法有一些方法可以使我们以ReadOnly模式执行语句,而无需创建新用户.
所以有人知道吗?
谢谢
Hello everyone,
Can anyone tell me how can I execute sql statements in Readonly mode so that delete command cannot be executed.
Write now I have made a new user with ReadOnly permissions but I herd that there is some way via which we can execute our statements in ReadOnly mode without making a new user.
So is there anyone who is aware of the same.
Thanks
推荐答案
是的.尝试以下命令
Yes it is possible. Try the following command
//Make read only
ALTER DATABASE database-name SET READ_ONLY
//Back to read write
ALTER DATABASE database-name SET READ_WRITE
这篇关于以只读模式执行SQL查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文