Yes Look into SQL-DMO. that's what Enterprise manager's core is. I had a
database being stubborn and going into single user mode every Sunday/early
Monday during a maintenance job that for some reason stays in single user
mode. But not any more =) I have a task that fires about 3 hours after
maintenance plans. What it does is check the databases, if one is in single
user mode then it gets kicked back to normal use and send me a mail letting
me know that the database is in single user mode. I must say, its a real
timesaver considering the first 2 times I had gotten a wakeup call 3 hours
before I normally get!
Dave