hi
is there way by code to stop the sql server service and deattach a database and then restard the service
thanks
You can detach a database with code but SQL Server service must be running because if it is not running, you cannot access anything in SQL Server. Try the link below for details about attach and detach database in SQL Server. Hope this helps.
http://msdn2.microsoft.com/en-us/library/ms187858.aspx
|||thanks , but do u know how can i stop the sql server service|||Yep here is some sample code from Microsoft to get you started. Hope this helps.
http://msdn2.microsoft.com/en-us/library/ms162139.aspx
|||thanx a lot
No comments:
Post a Comment