Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL SERVER Service Programmatically Startup

Status
Not open for further replies.

smoothcoder

Programmer
Sep 24, 2002
19
RO
Hi there,
does anyone know how could I programmatically start SQL SERVER Service from VC++ (MFC)

(I write a custom MSDE Setup application and I want to start the service once the setup completes)

Thanks in advance!
 
From Books Online

Command prompt

Start an instance of SQL Server or the SQL Server Agent service from a command prompt by typing:
net start mssqlserver or sqlservr, or net start SQLServerAgent or by running SQLSERVR.EXE. If you are referring to a named instance of SQL Server, you must specify mssql$instancename or SQLAgent$instancename.

There are several other methods available. I would suggent you look at BOL.
 
You can use the sqldmo.dll.

--------------------------------------
"We are star-stuff. We are the universe made manifest trying to figure itself out."
-- Delenn in Babylon 5 - "A Distant Star"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top