Quote Originally Posted by halidziya
Because I want to take snapshot of complete disk . To make it cosistent I have to stop DB to write disk. It can work on memory to accessibility.

I don't now really how database working or what is transaction. There is Documantation about this here : http://www.microsoft.com/technet/pro...sqlwriter.mspx

They write a lot of thing but nothing about code.
The MS SQL engine is always writing to either the transaction log or the database itself. You would almost need to detach the DB from the service to halt all that I/O so that the "disk image" software you want to develop can function.

The preferred method is to have the MS SQL engine create a BACKUP file (.BAK) - this is done while users are on-line and really captures the "snapshot" of that moment in time. When you restore from that .BAK any "transaction" that were in process and not yet committed are rolled back automatically - thus making it a truly hot backup.

Commercial backup tools have SQL agents that assist the backup in handling the always open database and transaction files.