Click here to Skip to main content
15,885,366 members
Home / Discussions / Database
   

Database

 
AnswerRe: memory leak - a basic misunderstanding Pin
S. Senthil Kumar6-Sep-05 7:44
S. Senthil Kumar6-Sep-05 7:44 
GeneralRe: memory leak - a basic misunderstanding Pin
Christian Graus6-Sep-05 11:48
protectorChristian Graus6-Sep-05 11:48 
QuestionHowTo: Get Column Detault Value in ADO.NET Pin
wolver-hampton-wanderer6-Sep-05 2:49
wolver-hampton-wanderer6-Sep-05 2:49 
AnswerRe: HowTo: Get Column Detault Value in ADO.NET Pin
miah alom6-Sep-05 9:20
miah alom6-Sep-05 9:20 
GeneralRe: HowTo: Get Column Detault Value in ADO.NET Pin
wolver-hampton-wanderer7-Sep-05 13:53
wolver-hampton-wanderer7-Sep-05 13:53 
Questionrestore an in used SQL Database Pin
i-p-g-i5-Sep-05 22:41
i-p-g-i5-Sep-05 22:41 
AnswerRe: restore an in used SQL Database Pin
Frank Kerrigan5-Sep-05 22:57
Frank Kerrigan5-Sep-05 22:57 
AnswerRe: restore an in used SQL Database Pin
miah alom6-Sep-05 9:26
miah alom6-Sep-05 9:26 
Its easy to achieve this using SQL DMO. You can expllicitly kill all the existing connections.
But if you are using SQL script then use the following SP

se master
go
--Type procedure
--author mak mak_999@yahoo.com
--date written 4/19/2000
--project maintenance
--objective procedure to kill process for a given database

create procedure usp_killprocess @dbname varchar(128) as
set nocount on
set quoted_identifier off
declare @kill_id int
declare @query varchar(320)
declare killprocess_cursor cursor for
select a.spid from sysprocesses a join
sysdatabases b on a.dbid=b.dbid where b.name=@dbname
open killprocess_cursor
fetch next from killprocess_cursor into @kill_id
while(@@fetch_status =0)
begin
set @query = "kill "+ convert(varchar,@kill_id)
exec (@query)
fetch next from killprocess_cursor into @kill_id
end
close killprocess_cursor
deallocate killprocess_cursor

--usage
--exec usp_killprocess "mydatabasename"


Source: http://www.killersites.com/mvnforum/mvnforum/viewthread?thread=2240
Questiondatagrid titel ... Pin
Anonymous5-Sep-05 21:14
Anonymous5-Sep-05 21:14 
AnswerRe: datagrid titel ... Pin
Frank Kerrigan5-Sep-05 22:54
Frank Kerrigan5-Sep-05 22:54 
AnswerRe: datagrid titel ... Pin
miah alom6-Sep-05 8:19
miah alom6-Sep-05 8:19 
Questionw can User observe his private information Pin
mostafa_h5-Sep-05 10:22
mostafa_h5-Sep-05 10:22 
AnswerRe: w can User observe his private information Pin
Colin Angus Mackay5-Sep-05 20:53
Colin Angus Mackay5-Sep-05 20:53 
GeneralRe:I want to know how a user can observe Pin
mostafa_h6-Sep-05 1:57
mostafa_h6-Sep-05 1:57 
GeneralRe:I want to know how a user can observe Pin
Christian Graus6-Sep-05 11:51
protectorChristian Graus6-Sep-05 11:51 
QuestionConnection Via DSN in VB.Net Pin
MODI_RAHUL5-Sep-05 3:20
MODI_RAHUL5-Sep-05 3:20 
AnswerRe: Connection Via DSN in VB.Net Pin
Andy Brummer5-Sep-05 4:05
sitebuilderAndy Brummer5-Sep-05 4:05 
GeneralRe: Connection Via DSN in VB.Net Pin
miah alom6-Sep-05 9:44
miah alom6-Sep-05 9:44 
GeneralRe: Connection Via DSN in VB.Net Pin
Andy Brummer6-Sep-05 12:18
sitebuilderAndy Brummer6-Sep-05 12:18 
GeneralRe: Connection Via DSN in VB.Net Pin
Anonymous7-Sep-05 3:23
Anonymous7-Sep-05 3:23 
QuestionPlease help me,,(MySql Front Installation) Pin
Jeeva Mary Varghese4-Sep-05 18:38
Jeeva Mary Varghese4-Sep-05 18:38 
QuestionUser And Password with ... Pin
mostafa_h4-Sep-05 8:58
mostafa_h4-Sep-05 8:58 
AnswerRe: User And Password with ... Pin
Colin Angus Mackay4-Sep-05 9:50
Colin Angus Mackay4-Sep-05 9:50 
QuestionUser And Password Pin
mostafa_h4-Sep-05 2:57
mostafa_h4-Sep-05 2:57 
AnswerRe: User And Password Pin
Colin Angus Mackay4-Sep-05 4:48
Colin Angus Mackay4-Sep-05 4:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.