Sql server 2000 µÄµÈ´ýÏìӦʱ¼ä
Ç°Ò»¶Îʱ¼äÔÚά»¤Ò»¸öÀÏÏîÄ¿µÄʱºò·¢ÏÖ£¬ÔÚÖ´ÐÐÒ»¸ö½Ï´óµÄ´æ´¢¹ý³Ìʱ£¬×ÜÊDZ¨“³£¹æÍøÂç´íÎó£¬Çë¼ì²éÄúµÄÍøÂçÎĵµ”¡£ÔÚºóÐøµÄά»¤¼ì²éÖз¢ÏÖ£¬ÊÇÊÂÎﳬʱµ¼ÖÂÖ´ÐÐÖÐÖ¹µÄ¡£
ÏÂÃæÊǵ÷Õû¹ý³Ì£º
Ò»¡¢°ÑSQL SERVERµÄµÈ´ýÏìӦʱ¼äµ÷µ½×î´óÖµ
show advanced options Ñ¡Ï
show advanced options Ñ¡ÏîÓÃÀ´ÏÔʾ sp_configure ϵͳ´æ´¢¹ý³Ì¸ß¼¶Ñ¡Ïî¡£
µ±ÉèÖà show advanced options Ϊ 1 ʱ£¬²Å¿ÉÒÔʹÓà sp_configure Áгö¸ß¼¶Ñ¡Ïî¡£
ĬÈÏֵΪ 0¡£¸ÃÉèÖÃÁ¢¼´ÉúЧ£¨ÎÞÐèÍ£Ö¹²¢ÖØÐÂÆô¶¯·þÎñÆ÷£©¡£
Ö´ÐÐSQLÓï¾ä
sp_configure 'show advanced options', 1
GO
RECONFIGURE
GO
query wait Ñ¡Ï
query wait Ñ¡Ïî¿ÉÒÔÉ趨һ¸ö²éѯÔÚ³¬Ê±Ç°µÈ´ýËùÐè×ÊÔ´µÄʱ¼ä
£¨ÒÔÃëΪµ¥Î»£¬·¶Î§´Ó 0 µ½2147483647£©¡£
Èç¹ûʹÓÃĬÈÏÖµ –1 »òÖ¸¶¨ –1£¬Ôò³¬Ê±Ê±¼äͨ¹ý¼ÆËãµÃµ½£¬ÊÇÔ¤¼Æ²éѯ³É±¾µÄ 25 ±¶¡£
¡¡¡¡¡¡Ö´ÐУӣѣÌÓï¾ä
¡¡¡¡¡¡sp_configure 'query wait', 2147483647
¡¡¡¡¡¡GO
¡¡¡¡¡¡RECONFIGURE
¡¡¡¡¡¡GO
¡¡¡¡¶þ¡¢Èç¹ûÔÚ.NETÖе÷Óô洢¹ý³ÌµÄ»°£¬Èç¹ûÄãÖ»ÊÇÉÏÃæµÄÖµÉèÖÃһϵĻ°£¬ÔÚ.NETÖÐÒ²ÒªÔÙÐÞ¸Äһϣ¬²Å¿ÉÒÔ£¬²»È»ÔÚ.NETÖÐĬÈϺÃÏñÊÇ30Ã룬µ±ÄãµÄ´æ´¢¹ý³ÌÖ´Ðг¬¹ýÕâ¸öʱ¼äµÄʱºò¾Í»á±¨´í¡£ºÃÏñ¿´µ½ÍøÂçÉϱðÈË˵ÉèÖÃΪ0£¬Ëü¿ÉÒÔ×î´óÖµ£¬µ«ÎÒÉèÖúÃÏñûЧ¹û£¬Ö»ÄܸøËüÒ»¸ö¹»´óµÄÖµ¾Í¿ÉÒÔÁË¡£ÈçÔÚ.NETÖе÷ÓÃNBAÕâ¸ö´æ´¢¹ý³Ì¡£ÉèÖÃËüµÄ×î´óʱ¼ä´úÂëÈçÏ£º &n
Ïà¹ØÎĵµ£º
SQL Server Êý¾Ý¿â¹ÊÕÏÐÞ¸´¶¥¼¶¼¼ÇÉÖ®Ò»
2010-04-26 10:37:52 À´Ô´:TechTargetÖйú ÎÒÒªÊÕ²Ø
SQL Server 2005 ºÍ 2008 Óм¸¸ö¹ØÓڸ߿ÉÓÃÐÔµÄÑ¡ÏÈçÈÕÖ¾´«Êä¡¢¸±±¾ºÍÊý¾Ý¿â¾µÏñ¡£ËùÓÐÕâЩ¼¼Êõ¶¼Äܹ»×÷Ϊά»¤Ò»¸ö±¸Ó÷þÎñÆ÷µÄÊֶΣ¬Í¬Ê±Õâ¸öÊý¾Ý¿â¿ÉÒÔÔÚÄãÔÏȵÄÖ÷Êý¾Ý¿â³öÎÊÌâʱÉÏÏß²¢×÷ΪеÄÖ÷·þÎñÆ÷¡£È»¶ø£¬Äã± ......
osql ʵÓù¤¾ß
osql ʵÓù¤¾ßʹÄúµÃÒÔÊäÈë Transact-SQL Óï¾ä¡¢ÏµÍ³¹ý³ÌºÍ½Å±¾Îļþ¡£¸ÃʵÓù¤¾ßͨ¹ý ODBC Óë·þÎñÆ÷ͨѶ¡£
Óï·¨
osql
[-?] |
&nb ......
ʹÓÃSQLÓï¾ä
SQLÓïÑÔ°üÀ¨Êý¾Ý²éѯÓïÑÔ(SELECT)¡¢Êý¾Ý²Ù×ÝÓïÑÔ(INSERT¡¢UPDATE¡¢DELETE)¡¢ÊÂÎñ¿ØÖÆÓïÑÔ(COMMIT¡¢ROLLBACK¡¢SAVEPOINT)¡¢Êý¾Ý¶¨ÒåÓïÑÔ(CREATE TABLE¡¢ALTER TABLE¡¢DROP)¡¢Êý¾Ý¿ØÖÆÓïÑÔ(GRANT¡¢REVOKE)µÈÎå¸ö²¿·Ö¡£
µ±±àдPL/SQLÓ¦ÓóÌÐòʱ£¬Ö»ÄÜÖ±½ÓǶÈëSELECT ......
ÊÓͼ
SET¡¡NOCOUNT ON;
SET Northwind;
GO
IF OBJECT_ID('dbo.ViewName') IS NOT NULL
DROP VIEW dbo.ViewName;
GO
CREATE VIEW dbo.Viewname
AS
SELECT * from customer AS C
WHERE EXISTS
(SELECT * from dbo.Orders AS O
WHERE O.CustomerI ......
SQL Server ϵͳȫ¾Ö±äÁ¿
@@CONNECTIONS
·µ»Ø×ÔÉÏ´ÎÆô¶¯ÒÔÀ´Á¬½Ó»òÊÔͼÁ¬½ÓµÄ´ÎÊý¡£
@@CURSOR_ROWS
·µ»ØÁ¬½ÓÉÏ×îºó´ò¿ªµÄÓαêÖе±Ç°´æÔڵĺϸñÐеÄÊýÁ¿(·µ»Ø±»´ò¿ªµÄÓαêÖл¹Î´±»¶ÁÈ¡µÄÓÐЧÊý¾ÝÐеÄÐÐÊý)
@@DATEFIRST
·µ»ØÿÖܵÚÒ»ÌìµÄÊý×Ö
@@ERROR
·µ»Ø×îºóÖ´ÐеÄSQL Óï¾äµÄ´íÎó´úÂë¡£
@@FETCH_STATUS
·µ»Ø ......