ÈçºÎ½â¾ö SQL Server 2000 ÖеÄÁ¬½ÓÎÊÌâ
ÈçºÎ½â¾ö SQL Server 2000 ÖеÄÁ¬½ÓÎÊÌâ
Chris Tull, Microsoft Help and Support
ÕâһƪÎÄÕÂÄÜ°ïÖúÄã½â¾ö΢Èí SQL ËźòÆ÷ 2000 µÄÁ¬½ÓÐÔÎÊÌâ¡£ÕâһƪÎÄÕ°üº¬ÄãÄÜÄðïÖú½â¾öÄãµÄÁ¬½ÓÐÔÎÊÌâµÄͨ³£Á¬½ÓÐÔÎÊÌâºÍ²½ÖèµÄÃèÊö¡£
SQL ServerµÄÀýÖ¤ºÍ¿Í»§¶ËÉêÇëÖ®¼äµÄ¹µÍ¨µÄ SQL Server 2000 Ö§³ÖһЩ·½·¨¡£Èç¹ûÄãµÄ¿Í»§ÉêÇëºÍSQL ServerµÄÀýÖ¤ÔÚÏàͬµÄ¼ÆËã»úÉÏס, Microsoft Windows ´¦ÀíÖ®¼äµÄ¹µÍ¨ (IPC) ³É·Ý£¨ÏñÊǵ±µØµÄÃüÃû¹Ü»òÕß±»·ÖÏíµÄ¼ÇÒä¼Ç¼£©ÓÃÀ´¹µÍ¨¡£ È»¶ø, µ±¿Í»§¶ËÉêÇëºÍSQL ServerµÄÀýÖ¤ÔÚ²»Í¬µÄ¼ÆËã»ú£¬ÍøÂçIPC£¨ÏñÊÇTCP/IPÉÏסµÄʱºò»òÕßÃüÃû¹ÜµÀ£©ÓÃÀ´¹µÍ¨¡£
SQL Sever 2000 ʹÓÃÍøÂç¿Ø¼þ¿â£¨Ò»¸öDLL£©ÓëÒ»¸öÌرðµÄÍøÂç¼Ç¼¹µÍ¨¡£ һ˫ÏàÅäÍøÂç¿Ø¼þ¿âÒ»¶¨ÔÚ¿Í»§¼ÆËã»úºÍ·þÎñÆ÷¼ÆËã»úÉÏÊÇ»îÔ¾µÄÖ§Ô®ÄãÏëҪʹÓõÄÍøÂç¼Ç¼¡£ ¾ÙÀýÀ´Ëµ£¬Èç¹ûÄãÏëҪʹһ¸ö¿Í»§ÉêÇëÄܹ»Óëͨ¹ýTCP/IPµÄÒ»¸ö SQL ServerµÄÌض¨ÀýÖ¤¹µÍ¨, ¿Í»§TCP/IPÌ×½Ó×ÖÍøÂç¿Ø¼þ¿â (Dbnetlib.dll) Ò»¶¨ÅäÖóÉÔÚ¿Í»§¼ÆËã»úÉ϶ÔËźòÆ÷Á¬½Ó¡£ ͬÑùµØ, ·þÎñÆ÷TCP/IPÌ×½Ó×ÖÍøÂç¿Ø¼þ¿â (Ssnetlib.dll) Ò»¶¨ÔÚËźòÆ÷¼ÆËã»úÉÏÌý¡£ ÔÚÕâÒ»¸öÇé½ÚÖÐ, TCP/IPÐÒé¶ÑÕ»Ò»¶¨ÊÇ×°ÖÃÔÚ¿Í»§¼ÆËã»úºÍ·þÎñÆ÷¼ÆËã»ú¡£
ÔÚÄã°²×°SQL Server 2000 Ö®ºó£¬ÄãÄÜÅäÖÿͻ§¶ËÍøÂçµÄÌØÐÔʹÓÿͻ§¶ËÍøÂ繫ÓóÌÐòµÄÍøÂç¿âÊôÐÔ¡£ÄãÄÜÅäÖ÷þÎñÆ÷ÍøÂçµÄÌØÐÔʹÓ÷þÎñÆ÷ÍøÂ繫ÓóÌÐò(Svrnetcn.exe)µÄÍøÂç¿Ø¼þ¿âÊôÐÔ¡£ÔÚ°²×° SQL Server °²×°³ÌÐòÖеķþÎñÆ÷¹¤¾ßÆڼ䣬·þÎñÆ÷µÄÍøÂç¿âÒ²±»Í¬Ê±°²×°ÁË¡£È»¶ø£¬Ò»Ð©·þÎñÆ÷µÄÍøÂç¿â¿ÉÄܲ»ÊǼ¤»îµÄ¡£Èç´Ë£¬SQL Server 2000 ÆôÓò¢ÕìÌý TCP/IP¡¢ÃüÃû¹ÜµÀºÍ¹²ÏíÄÚ´æ¡£Òò´Ë£¬ÈÃÒ»¸ö¿Í»§¶Ë¶ÔÒ»²¿·þÎñÆ÷¼ÆËã»úÁ¬½Ó£¬¿Í»§¶ËÒ»¶¨Ê¹ÓÃÒ»¸ö¿Í»§¶ËÍøÂç¿â£¬¸ÃÍøÂç¿âÆ¥ÅäÓëSQL ServerʵÀýÕýÔÚʹÓõķþÎñÆ÷ÍøÂç¿âÖ®Ò»¡£
¶ÔÓÚ¹ØÓÚSQL ServerͨѶ²¿¼þºÍÍøÂç¿âµÄÆäËüÐÅÏ¢£¬Çë²Î¼û“SQL Server ÔÚÏ߲ο¼Êé”ÖеÄÏÂÁÐÖ÷Ì⣺
• ͨÐŲ¿¼þ
• ¿Í»§¶ËºÍ·þÎñÆ÷ÍøÂç¿â
• ¹ÜÀí¿Í»§¶Ë
½â¾öÁ¬½ÓÎÊÌâ
ÔÚ SQL Server 2000 Öдó¶àÊýÁ¬½ÓÎÊÌâÄã¿ÉÄÜ»á×¢Òâµ½µÄ¶¼ÊÇÓÉ TCP/IP µÄÎÊÌâ»ò Windows Éí·ÝÈÏÖ¤µÄÎÊÌâÒýÆ𣬻òÕßÁ½Õß¹²Í¬×éºÏÒýÆð¡£
ÖØҪ˵Ã÷£ºÄ㿪ʼ½â¾ö SQL Server 2000 µÄÁ¬½ÓÎÊÌâ֮ǰ£¬È·¶¨MSSQLServer ·þÎñÒÑÔÚÔËÐÐ SQL Server µÄ¼ÆËã»úÉÏÆô¶¯¡£
ÑéÖ¤ DNS ÉèÖÃ
ÓòÃûϵͳ (DNS)µÄÃû³Æ½âÎö¹ý³Ì±»ÓÃÓÚ½
Ïà¹ØÎĵµ£º
ϵͳ»·¾³£ºWindows 7
Èí¼þ»·¾³£ºVisual C++ 2008 SP1 +SQL Server 2005
±¾´ÎÄ¿µÄ£º±àдһ¸öº½¿Õ¹ÜÀíϵͳ
ÕâÊÇÊý¾Ý¿â¿Î³ÌÉè¼ÆµÄ³É¹û£¬ËäÈ»³É¼¨²»¼Ñ£¬µ«ÊÇ×÷ΪÎÒÓÃVC++ ÒÔÀ´±àдµÄ×î´ó³ÌÐò»¹ÊÇ´«µ½ÍøÉÏ£¬ÒÔ¹©²Î¿¼¡£ÓÃVC++ ×öÊý¾Ý¿âÉè¼Æ²¢²»ÈÝÒ×£¬µ«Ò²²»ÊDz»¿ÉÄÜ¡£ÒÔÏÂÊÇÎҵijÌÐò½çÃ棬ºóÃæ ......
Çå³ýSQLÊý¾Ý¿âÈÕÖ¾Îļþ
/*--ѹËõÊý¾Ý¿âµÄͨÓô洢¹ý³Ì
ÓÐÁ½ÖÖ·½·¨ Ò»ÊÇѹËõÈÕÖ¾£¬¶þÊÇɾ³ýÈÕÖ¾¡£
Ò»¡¢Ñ¹ËõÈÕÖ¾¼°Êý¾Ý¿âÎļþ´óС
ÒòΪҪ¶ÔÊý¾Ý¿â½øÐзÖÀë´¦Àí
ËùÒÔ´æ´¢¹ý³Ì²»ÄÜ´´½¨ÔÚ±»Ñ¹ËõµÄÊý¾Ý¿âÖÐ
/*--µ÷ÓÃʾÀý
exec p_compdb 'test'
--*/
use master --×¢Òâ,´Ë´æ´¢¹ý³ÌÒª½¨ÔÚmasterÊý¾Ý¿âÖÐ
go ......
±ÈÈçij¸öÊý¾Ý¿â϶ÔSQL SERVERµÄÊý¾Ý¿â½øÐÐÁËÿÌìµÄ±¸·Ý£¬ÏÖÔÚÒª±£Áô7ÌìÒÔÄڵģ¬ÆäËûµÄɾ³ýµô£¬ÓÃASP¿ÉÒÔʵÏÖÁË£¬µ«ÒªÓõ½filesystemobject£¬²»´óˬ
Ê×ÏÈдһ¸öjsÎļþclearDatabaseBackup£¬ÄÚÈÝÈçÏÂ
function deleteBackupFile(beforedays) {
var fso = new ActiveXObject ......
ʲôÊÇÅÅÐò¹æÔò£¨collation£©
¹ØÓÚSQL ServerµÄÅÅÐò¹æÔò£¬¹À¼Æ´ó¼Ò¶¼²»Ä°Éú£¬ÔÚ´´½¨Êý¾Ý¿âʱÎÒÃǾ³£ÒªÑ¡ÔñÒ»ÖÖÅÅÐò¹æÔò£¨conllation£©£¬Ò»°ãÎÒÃÇ»áÁôÒ⵽ÿһÖÖÓïÑÔµÄÅÅÐò¹æÔò¶¼ÓÐÐí¶àÖÖ£¬±ÈÈç±ê×¼´ó½¼òÌåÖÐÎÄChinese_PRCµÄÅÅÐò¹æÔò¾ÍÓÐÊýÊ®ÖÖÖ®¶à
ÕâЩÅÅÐò¹æÔòÓÐʲô×÷ÓÃÄØ£¿ÈÃÎÒÃÇÏÈÀ´¿´¿´MS¹Ù·½µÄ½âÊÍ£º
ÅÅÐò¹æÔ ......
sql server ¸ü¸Ä±íµÄËùÊôÓû§µÄÁ½¸ö·½·¨
--¸ü¸Äij¸ö±í
exec sp_changeobjectowner 'tablename','dbo'
--´æ´¢¸ü¸ÄÈ«²¿±í
CREATE PROCEDURE dbo.User_ChangeObjectOwnerBatch
@OldOwner as NVARCHAR(128),
@NewOwner as NVARCHAR(128)
AS
DECLARE @Name as NVARCHAR(128)
DECLARE @Owner as NVARCHAR(128)
D ......