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

SQL SERVER

DBCC
Transact-SQL ±à³ÌÓïÑÔÌṩ DBCC Óï¾ä×÷Ϊ Microsoft® SQL Server™ 2000 µÄÊý¾Ý¿â¿ØÖÆ̨ÃüÁî¡£ÕâЩÓï¾ä¶ÔÊý¾Ý¿âµÄÎïÀíºÍÂß¼­Ò»ÖÂÐÔ½øÐмì²é¡£Ðí¶à DBCC Óï¾äÄܹ»¶Ô¼ì²âµ½µÄÎÊÌâ½øÐÐÐÞ¸´¡£
Êý¾Ý¿â¿ØÖÆ̨ÃüÁîÓï¾ä±»·ÖΪÒÔÏÂÀà±ð¡£
Óï¾ä·ÖÀà Ö´ÐÐ
ά»¤Óï¾ä ¶ÔÊý¾Ý¿â¡¢Ë÷Òý»òÎļþ×é½øÐÐά»¤µÄÈÎÎñ¡£ 
ÔÓÏîÓï¾ä ÖîÈçÆôÓÃÐм¶Ëø¶¨»ò´ÓÄÚ´æÖÐɾ³ý¶¯Ì¬Á´½Ó¿â (DLL) µÈÔÓÏîÈÎÎñ¡£
״̬Óï¾ä ״̬¼ì²é¡£
ÑéÖ¤Óï¾ä ¶ÔÊý¾Ý¿â¡¢±í¡¢Ë÷Òý¡¢Ä¿Â¼¡¢Îļþ×顢ϵͳ±í»òÊý¾Ý¿âÒ³µÄ·ÖÅä½øÐеÄÑéÖ¤²Ù×÷¡£
SQL Server 2000 µÄ DBCC Óï¾äʹÓÃÊäÈë²ÎÊýºÍ·µ»ØÖµ¡£ËùÓÐ DBCC Óï¾ä²ÎÊý¶¼¿ÉÒÔ½ÓÊÜ Unicode ºÍ DBCS ×ÖÃæÖµ¡£
ʹÓà DBCC ½á¹û¼¯Êä³ö
Ðí¶à DBCC ÃüÁî¿ÉÒÔ²úÉú±í¸ñ¸ñʽµÄÊä³ö£¨Ê¹Óà WITH TABLERESULTS Ñ¡Ï¡£¸ÃÐÅÏ¢¿É×°Ôص½±íÖÐÒԱ㽫À´Ê¹Óá£ÒÔÏÂÏÔʾһ¸öʾÀý½Å±¾£º
-- Create the table to accept the results
CREATE TABLE #tracestatus (
   TraceFlag INT,
   Status INT
   )
-- Execute the command, putting the results in the table
INSERT INTO #tracestatus
   EXEC ('DBCC TRACESTATUS (-1) WITH NO_INFOMSGS')
-- Display the results
SELECT *
from #tracestatus
GO
ά»¤Óï¾ä
DBCC DBREINDEX --Öؽ¨Ö¸¶¨Êý¾Ý¿âÖбíµÄÒ»¸ö»ò¶à¸öË÷Òý¡£
DBCC DBREPAIR --³ýÈ¥Ë𻵵ÄÊý¾Ý¿â¡£
DBCC INDEXDEFRAG --ÕûÀíÖ¸¶¨µÄ±í»òÊÓͼµÄ¾Û¼¯Ë÷ÒýºÍ¸¨ÖúË÷ÒýËéƬ¡£
DBCC SHRINKDATABASE --ÊÕËõÖ¸¶¨Êý¾Ý¿âÖеÄÊý¾ÝÎļþ´óС¡£
DBCC SHRINKFILE  --ÊÕËõÏà¹ØÊý¾Ý¿âµÄÖ¸¶¨Êý¾ÝÎļþ»òÈÕÖ¾Îļþ´óС¡£
DBCC UPDATEUSAGE --±¨¸æºÍ¸üÕý sysindexes ±íµÄ²»ÕýÈ·ÄÚÈÝ£¬¸ÃÄÚÈÝ¿ÉÄܻᵼÖÂͨ¹ý sp_spaceused ϵͳ´æ´¢¹ý³Ì²úÉú²»ÕýÈ·µÄ¿Õ¼äʹÓñ¨±í¡£
ÔÓÏîÓï¾ä
DBCC dllname (FREE)
DBCC HELP
DBCC PINTABLE
DBCC ROWLOCK
DBCC TRACEOFF
DBCC TRACEON
DBCC UNPINTABLE
״̬Óï¾ä
DBCC PINTABLE
DBCC OPENTRAN
DBCC OUTPUTBUFFER
DBCC PROCCACHE
DBCC SHOWCONTIG
DBCC SHOW_STATISTICS
DBCC SQLPERF
DBCC TRACESTATUS
DBCC USEROPTIONS
ÑéÖ¤Óï¾ä
DBCC CHECKALLOC
DBCC CHECKCATALOG
DBCC CHECKCONSTRAINTS
DBCC CHECKDB
DBCC CHECKFILEGROUP
DBCC CHECKIDENT
DBCC CHECKTABLE
DBCC NEWALLOC
----------------------------------


Ïà¹ØÎĵµ£º

[SQL]SQLÓï¾ä´óÈ«£¨·ÖÏí£©

--Óï ¾ä ¹¦ ÄÜ
--Êý¾Ý²Ù×÷
SELECT --´ÓÊý¾Ý¿â±íÖмìË÷Êý¾ÝÐкÍÁÐ
INSERT --ÏòÊý¾Ý¿â±íÌí¼ÓÐÂÊý¾ÝÐÐ
DELETE --´ÓÊý¾Ý¿â±íÖÐɾ³ýÊý¾ÝÐÐ
UPDATE --¸üÐÂÊý¾Ý¿â±íÖеÄÊý¾Ý
--Êý¾Ý¶¨Òå
CREATE TABLE --´´½¨Ò»¸öÊý¾Ý¿â±í
DROP TABLE --´ÓÊý¾Ý¿âÖÐɾ³ý±í
ALTER TABLE --ÐÞ¸ÄÊý¾Ý¿â±í½á¹¹
CREATE VIEW --´´½¨Ò»¸öÊÓͼ
DRO ......

SQL Server 2008 ×èÖ¹±£´æÒªÇóÖØд´½¨±íµÄ¸ü¸Ä


MS SQL Server 2008 ÔÚ½¨Íê±íºó£¬Èç¹ûÒª²åÈëÈÎÒâÁУ¬ÔòÌáʾ£º
µ±Óû§ÔÚÔÚSQL Server 2008ÆóÒµ¹ÜÀíÆ÷Öиü¸Ä±í½á¹¹Ê±£¬±ØÐëÒªÏÈɾ³ýÔ­À´µÄ±í£¬È»ºóÖØд´½¨ÐÂ±í£¬²ÅÄÜÍê³É±íµÄ¸ü¸Ä£¬Èç¹ûÇ¿Ðиü¸Ä»á³öÏÖÒÔÏÂÌáʾ£º²»ÔÊÐí±£´æ¸ü¸Ä¡£ÄúËù×öµÄ¸ü¸ÄÒªÇóɾ³ý²¢ÖØд´½¨ÒÔÏÂ±í¡£Äú¶ÔÎÞ·¨ÖØд´½¨µÄ±ê½øÐÐÁ˸ü¸Ä»òÕßÆôÓÃÁË“× ......

SQLÁÙʱ±í

ÁÙʱ±í¾ÍÊÇÄÇЩÃû³ÆÒÔ¾®ºÅ (#) ¿ªÍ·µÄ±í¡£Èç¹ûµ±Óû§¶Ï¿ªÁ¬½ÓʱûÓгýÈ¥ÁÙʱ±í£¬SQL Server ½«×Ô¶¯³ýÈ¥ÁÙʱ±í¡£ÁÙʱ±í²»´æ´¢ÔÚµ±Ç°Êý¾Ý¿âÄÚ£¬¶øÊÇ´æ´¢ÔÚϵͳÊý¾Ý¿â tempdb ÄÚ¡£
ÁÙʱ±íÓÐÁ½ÖÖÀàÐÍ£º
±¾µØÁÙʱ±í
ÒÔÒ»¸ö¾®ºÅ (#) ¿ªÍ·µÄÄÇЩ±íÃû¡£Ö»ÓÐÔÚ´´½¨±¾µØÁÙʱ±íµÄÁ¬½ÓÉϲÅÄÜ¿´µ½ÕâЩ±í£¬Á´½Ó¶Ï¿ªÊ±ÁÙʱ±í¼´±»É¾³ý ......

sqlȨÏÞ

sqlȨÏÞ:
´´½¨User:
insert into mysql.user(Host,User,Password)
values("localhost","cordev",password("xasoftorg"));
insert into
mysql.user(Host,User,Password)
values("localhost","corhotfix",password("xasoftorg"));
insert into
mysq ......

C#Á¬½ÓACESSʱ£¬sqlÓï¾äÓдí

ÔÚдsqlÓï¾äʱ£¬Ò»°ã¶¼ÊÇÒ»¾ä½â¾ö£¬´ÓÀ´Ã»Ïë¹ý˵£¬°ÑsqlÓï¾ä²ð¿ªÀ´Ð´¡£
ÀýÈçÏÂÃæÕâ¾ä£º  string readstring = "select * from ʵÀý where ʵÀýID='"+eid+"'";
È»ºóÖ´ÐÐ Myconnection();
        DataSet ds = new DataSet();
        OleD ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ