mssqlÊý¾Ý¿â»Ö¸´ÎÊÌ⣬¼±
ÎÒÏëÔÚJspÒ³ÃæÀïÃæ»Ö¸´Êý¾Ý¿â£¬²Î¿¼ÁËһЩ×ö·¨£¬Óô洢¹ý³Ì¶Ï¿ªÊý¾Ý¿âµÄÁ´½Ó¡£
/*
¹Ø±ÕÓû§´ò¿ªµÄ½ø³Ì´¦Àí
*/
use master
go
create proc killspid (@dbname varchar(20))
as
begin
declare @sql nvarchar(500),@temp varchar(1000)
declare @spid int
set @sql='declare getspid cursor for
select spid from sysprocesses where dbid=db_id('''+@dbname+''')'
exec (@sql)
open getspid
fetch next from getspid into @spid
while @@fetch_status < >-1
begin
set @temp='kill '+rtrim(@spid)
exec(@temp)
Ïà¹ØÎÊ´ð£º
ÓÐ沒ÓÐ辦·¨實現£¬從MSSQL2000Æó業¹ÜÀíÆ÷註冊MSSQL2008數據庫£¿
Á¬²»ÉϰÉ
Ã²ËÆ沒Ï£Íû¡£¡£¡£
Ó¦¸ÃÊDz»ÐÐµÄ ¿çÌ«¶àÁË
ÄÇ2000µÄ ......
±íµÄ½á¹¹ÈçÏ£º
±í1£ºtb_big
×ֶΣºfalseIDÖµ£º1£¬2
×ֶΣºbigtype Öµ£ºA£¬B£¨ÓëfalseIDµÄÖµµÄλÖÃÒ»Ò»¶ÔÓ¦£¬¼´1¶ÔÓ¦A£¬2¶ÔÓ¦B£©
±í2£ºtb_small
×ֶΣºfalseID£¨Óëtb_bigµÄfalseID¹ØÁªµÄ ......
Ò»ÕÅ±í£¬×ֶηÖΪid,time1,time2,time3,time4,time5
ÇëÎÊÎÒÓ¦¸ÃÈçºÎÑ¡ÔñIDΪ1µÄÄÇÌõ¼Ç¼ÖÐtimeʱ¼ä×îСµÄֵĨ£¿
UP!
[code=SQL][/code]select min(t) from
(select time1 as t from t1 where id ......
ÈçÌ⣬MYSQLÓÖÔõô»ñÈ¡£¿
ÈçÌâ
Õâ¸ö¹À¼ÆÔÚÈÕÖ¾ÎļþÖвÅÄÜ¿´¼û°É
Õâ¸ö¹À¼ÆÔÚÈÕÖ¾ÎļþÖвÅÄÜ¿´¼û°É
ÒýÓÃ
³ý·ÇÄãÒµÎñÉÏ×ö¼Ç¼£¬·ñÔòÄãÊDz»ÄÜÖªµÀµÄ¡£ÒòΪÈÕÖ¾²»¼Ç¼selectÓï¾äÃüÁî¡£
..
ÄÇÓÐûÓÐϵͳ´ ......