Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Starting MS SQL Server 2000 from VB.NET application?

Posted on 2004-10-04
8
Medium Priority
?
286 Views
Last Modified: 2010-04-17
I want to start the MS SQL Server from my VB.NET application. By starting i mean like if i first open the servers SERVIVE MANAGER TOOL and then starting the server by the RUN button.
0
Comment
Question by:ascendit
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
8 Comments
 
LVL 42

Accepted Solution

by:
frodoman earned 500 total points
ID: 12221199
shell ("net start mssqlserver",AppWinStyle.Hide,False)
0
 
LVL 4

Assisted Solution

by:cavehop
cavehop earned 500 total points
ID: 12221322
If you are running the VB.NET application on the server, then you can use the Shell command to start and stop the service.  For example:

Dim intProcID As Integer
intProcID = Shell("net start mssqlserver", AppWinStyle.NormalFocus)

If you want to make sure that the command is completed before continuing in your code:
intProcID = Shell("net start mssqlserver", AppWinStyle.NormalFocus, True)

--Lance--
0
 
LVL 15

Expert Comment

by:deepaknet
ID: 12234323
You can use the Interop of SQLDMO to manage and control the servers:

Check out this URL:
http://www.15seconds.com/issue/010618.htm

deepak
0
 
LVL 4

Expert Comment

by:cavehop
ID: 12505164
All three answers, frodoman's, deepaknet's, and mine, are effective solutions to the problem (frodoman's and mine are substantially the same, though he beat me to the punch by a few minutes).

--Lance--
0
 
LVL 42

Expert Comment

by:frodoman
ID: 12505207
I agree - recommend split frodoman / cavehop

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Simple Linear Regression

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question