开发者

Change the Access Mode of a database

开发者 https://www.devze.com 2023-02-08 18:31 出处:网络
My need is to make a access mode of a p开发者_C百科articular database to Single for data movement from one database to another database by using an application on which website is running so that at t

My need is to make a access mode of a p开发者_C百科articular database to Single for data movement from one database to another database by using an application on which website is running so that at the time of no other user can modify that database.

This all thing i like to do through C# Code i.e. before running Insert/Update queries I like to execute query for making the destination database not usable by any other user. If there is any connection available with that database then I like to close it.


Check out SQL Management Objects, it allows you to control the meta data of the DB server in an OO way. You can do things like Backup, killing connections, etc. You could also issue the relevant SQL commands over a connection to do what you want.

0

精彩评论

暂无评论...
验证码 换一张
取 消