Solved

How to kill all connections in sql server from visual basic application ???

Posted on 2004-08-26
4
299 Views
Last Modified: 2013-12-25
I tried to use SQLDMO from vb but it caused some errors is there any better solution for killing all connection sql server, I need to do it before database restore
Thanks
0
Comment
Question by:Pkrol1
[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
4 Comments
 
LVL 29

Expert Comment

by:leonstryker
ID: 11904659
What errors?

Leon
0
 
LVL 29

Accepted Solution

by:
leonstryker earned 500 total points
ID: 11904683
Take a look at this:

http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/Q_21088898.html

You can create this procedure and then execute it with ADO.

Leon
0
 
LVL 15

Expert Comment

by:jdlambert1
ID: 11908337
You should run it from SQL Server, rather than SQLDMO, because it will try to kill SQLDMO's connection.
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

730 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