Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

·ÀÖ¹SQL SERVERµÄʼþ̽²éÆ÷¸ú×Ù³ÌÐòÖÐSQL½Å±¾

ÈçºÎ·ÀÖ¹³ÌÐòÖÐSQL½Å±¾±»SQL SERVERµÄʼþ̽²éÆ÷¸ú×Ù£¬±£ÕÏ×Ô¼ºµÄÈí¼þ²»±»ËûÈË·ÖÎö£¿
ÏÂÃæÊÇÒ»¸öÍ£Ö¹ËùÓÐSQLSERVERµÄ¸ú×ÙÆ÷µÄ½Å±¾(Á½ÖÖ·½·¨µÄÔ­ÀíÏàͬ)£º
µÚÒ»ÖÖ·½·¨£º
procedure SQLCloseAllTrack;
const
sql = 'declare @TID integer ' +
'declare Trac Cursor For ' +
'SELECT Distinct Traceid from :: fn_trace_getinfo(default) ' +
'open Trac ' +
'Fetch Next from Trac into @TID ' +
'while @@fetch_status=0 ' +
'begin ' +
' exec sp_trace_setstatus @TID,0 ' +
' exec sp_trace_setstatus @TID,2 ' +
' Fetch Next from Trac into @TID ' +
'end ' +
'Close Trac ' +
'deallocate Trac';
begin
//Í£Ö¹ËùÓÐSQLSERVERµÄ¸ú×ÙÆ÷,ÒÔ·ÀÖ¹³ÌÐò±»別È˸ú×Ù
ExecSql(sql);
end;
µÚ¶þÖÖ·½·¨£º
with faq1 do
begin
Close;
sql.Clear;
sql.add('declare @t_count int');
sql.add('set @t_count=1');
sql.add('while exists(SELECT * from ::::fn_trace_geteventinfo(@t_count))');
sql.add('begin');
sql.add('exec sp_trace_setstatus @t_count,0');
sql.add('set @t_count=@t_count+1');
sql.add('end');
try
execSQL;
except;
end;
close;sql.Clear;
end;
end;


Ïà¹ØÎĵµ£º

SQL Server 2005/2008Êý¾Ý¿âÓʼþ

Æô¶¯Êý¾Ý¿âÓʼþ¹¦ÄÜ
 
sp_configure 'show advanced', 1;
GO
RECONFIGURE;
GO
sp_configure 'Database Mail XPs', 1;
GO
RECONFIGURE;
GO
 
 
 
 -- ÅäÖÃÊý¾Ý¿âÓʼþ
 -- Ìí¼ÓÓʼþÕË»§
execute msdb.dbo.sysmail_add_account_sp
    @account_name = 'ÓÊÏäÕ ......

SQL Server 2005 ExpressÊý¾Ý¿âΪ¡°Ö»¶Á¡±

×ÊÁÏÒýÓÃ:http://www.knowsky.com/339654.html
ÎҵIJÙ×÷ϵͳΪWindows 2003 Server , ÎļþϵͳNTFS, ÔÚSQL Server 2005 Express Éϸ½¼Ó(Attach)´ÓÁíÍâһ̨µçÄÔCopy¹ýÀ´µÄÊý¾Ý¿âºó£¬Êý¾Ý¿âΪ“Ö»¶Á”¡£ÈçÏÂͼ£º
½â¾ö°ì·¨£º
´ò¿ª SQL Server Configuration Manager, ´ò¿ªSQL Server SQLEXPRESS µÄÊôÐÔ£¬ÈçÏÂͼ£º ......

¼Ç¼¼¸Ìõ¸Ð¾õ²»´íµÄsqlÓï¾ä

SELECT id,ip,from_unixtime(last_task_request_time) t1, from_unixtime(last_task_finish_time) t2
from yq_nodemanage
WHERE node_type=1
ORDER BY t1 DESC;
SELECT sum(unix_timestamp(gather_time)-unix_timestamp(publish_time))/(count(*)*60) from yq_bbs_docinfo
WHERE unix_timestamp(publish_time)>un ......

mysqlºÍsql server

ÔÚÐÔÄÜÉÏ£¬mysqlÊÇÏ൱³öÉ«µÄ£¬×ÀÃæ¸ñʽmyisamÊý¾Ý¿âÓë´ÅÅ̷dz£µØ¼æÈݶø²»Õ¼Óùý¶àµÄcpuºÍÄڴ棬mysqlÄÚ²¿ºÜ¶àʱºò¶¼Ê¹ÓÃ64λÕûÊý´¦Àí¡£yahoo¾ÍʹÓÃmysqlºǫ́Êý¾Ý¿â¡£
µ«mysqlȱÉÙһЩ¸½¼Ó¹¦ÄÜ£¬Ã»ÓÐSqlServerÈ«Ãæ¡£
sqlserverÎȶ¨ÐÍÇ¿£¬µ«±ØÐëÔö¼Ó¶îÍ⸴ÔÓ²Ù×÷£¬´ÅÅÌ´æ´¢£¬ÄÚ´æËðºÄµÈ£¬¶ÔÓ²¼þÈí¼þÒªÇ󶼺ܸߡ£
ÕâÁ½¸öÊý ......

sqlÖÐÑ­»·²åÈë´óÁ¿²âÊÔÊý¾Ý

declare @a int
set @a = 1  
while @a<1000000  
begin
    insert into Test(name) values(@a)  
    set @a = @a + 1  
end ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ