Friday, March 9, 2012

MSDE - Insuring that process is up & running

I'm developing a C# application that runs against MSDE. How can I
programatically check whether MSDE is running and, if not, start it up
and set it to "auto-start"?
Thanks in advance!
hi,
"FinallyInSeattle" <lori.pearsall7@.gte.net> ha scritto nel messaggio
news:c987b316.0406241719.46bc434b@.posting.google.c om...
> I'm developing a C# application that runs against MSDE. How can I
> programatically check whether MSDE is running and, if not, start it up
> and set it to "auto-start"?
> Thanks in advance!
as regard then service running test, you coul'd use SQL-DMO object model...
when connecting, you can specify the .Start method instead of .Connect
metodh , and trap the resulting error , if any...
err -2147023840 indicates the instance is already running...
or trying connecti via Ado.Net, setting the connection timeout to a low
value, and, on error, sending a NET START command...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||Thanks Andrea!!
"Andrea Montanari" wrote:

> hi,
> "FinallyInSeattle" <lori.pearsall7@.gte.net> ha scritto nel messaggio
> news:c987b316.0406241719.46bc434b@.posting.google.c om...
> as regard then service running test, you coul'd use SQL-DMO object model...
> when connecting, you can specify the .Start method instead of .Connect
> metodh , and trap the resulting error , if any...
> err -2147023840 indicates the instance is already running...
> or trying connecti via Ado.Net, setting the connection timeout to a low
> value, and, on error, sending a NET START command...
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
> DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
> -- remove DMO to reply
>

No comments:

Post a Comment