ÔÚ²»Í¬sqlserver·þÎñÆ÷¼ä£¬´´½¨ÏàͬÊý¾Ý¿â¶ÔÏó¡£
·ÖÁ½ÖÖÇé¿ö£º
1¡¢Í¨¹ý½Å±¾·½Ê½£¬2¡¢µ¼Èëµ¼³ö·½Ê½
µ«²»Í¬°æ±¾µÄSqlServer,ÔÚÕâ·½Ãæ²¢²»Ïàͬ¡£
sql2000¶ÔÊý¾Ý¿â¶ÔÏóÖ´ÐÐÉú³É½Å±¾Ê±£¬¾¡¹Ü¶¼Ñ¡Éϸ÷¸öÌõ¼þ£¬µ«¶ÔÓÚ±í¶ÔÏó²¢²»ÄÜ´´½¨Ö÷¼ü
¿ÉÒÔͨ¹ýµ¼Èëµ¼³ö·½Ê½£¬ÔÚµ¼ÈëÄ¿±êÑ¡ÔñÄ¿±êsqlserverºó£¬Ñ¡ÔñÖ»µ¼³ö¶ÔÏó½á¹¹¾ÍºÃÁË¡£
sql2005¶ÔÊý¾Ý¿â¶ÔÏóÖ´ÐÐÉú³É½Å±¾Ê±£¬¿ÉÒÔ´´½¨Ö÷¼ü¡£
¿ÉÊÇËüÔÚµ¼Èëµ¼³öʱ£¬È´Ã»µ¼³öÓГֻ¶ÔÏó½á¹¹”Ñ¡Ïî¡£·´¶øÖ»ÄÜͨ¹ýÉú³É½Å±¾·½Ê½´´½¨ÏàͬµÄ¶ÔÏó¡£
Ïà¹ØÎĵµ£º
·½Ê½Ò»£º
select top 200 * from view_OrganResource
where 1=1 and OrganID = 57 and
(OrderID not in(select top 1000 OrderID from tb_OrganResource
where 1=1 and OrganID = 57 order by uploadtime desc))
order by uploadtime desc --5858 1980
·½Ê½¶þ£º
select top 200 * from
vi ......
/*
*SQLServerÌí¼Ó²Ù×÷ʵÏÖ
*/
void CMFCSQLDlg::OnButton2()
{
// TODO: Add your control notification handler code here
CString strsql;
CString strnum="mynum3";
CString strage="myage3";
HRESULT hResult;
_variant_t RecordsAffected;
CoInitialize(NULL);
_ConnectionPtr m_pAppConn;
hResul ......
ÈçºÎ»ñµÃsqlserverÊý¾Ý¿âÖÐÕ¼ÓøßcpuÓû§µÄ»î¶¯ÄÚÈÝ
1¡¢´Ó΢ÈíÕ¾µãÉÏÏÂÔØqslice_setup.exe
2¡¢´ò¿ªQuery Analyzer£¬ÔËÐÐÒÔÏÂÓï¾ä£º
declare @a int
while (1<2)
begin
select @a=1
end
½«»á·¢ÏÖcpuÂíÉÏ´ïµ½100%
3¡¢´ò¿ªqlice.exe£¬½«·¢ÏÖsqlserver.exeµÄcpuÕ¼ÓÃÂʺܸߣ¬Ë«»÷½øÈ룬³öÐÐsqlserver.exeÖоßÌåÏß³ ......