Hi All.

I have some code which backs up a sql express database using the Microsoft.SqlServer.Management.Smo namespace.

For neatness I would like to first check to see if the service is running and stop it, perform my backup, then restart it.

I cant figure this one out. Any ideas my lovelies ?


TIA