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

¹ØÓÚsql¸ü¸Ä¼ÆËã»úÃûºÍ·þÎñÆ÷ÃûÒ»Ö»ò"´íÎó 18483

½ñÌìÔÚÅäÖÃÊý¾Ý¿â·¢²¼ºÍ·Ö·¢Ê±×ÜÊDZ¨³öÏÖ 18483 ´íÎó
Ìáʾ˵£º´íÎó 18483:δÄÜÁ¬½Óµ½·þÎñÆ÷ "XXX"£¬ÒòΪ 'distributor_admin'δÔڸ÷þÎñÆ÷É϶¨ÒåΪԶ³ÌµÇ½¡£
Îҵķ¢²¼ºÍ·Ö·¢ÊÇͬһ¸ö·þÎñÆ÷£¬"XXX" ΪÎҵĻúÆ÷Ãû£¬·Ö·¢Êý¾Ý¿âÊÇĬÈϵÄÃû³Æ£¬¶øÎÒÔÚÁíÍâһ̨»úÆ÷ÉÏ×öʱ¾ÍÕý³£¡£
1¡¢ÉèÖù²Ïí¸´ÖÆĿ¼:
      \\computer_machine\C$...\..Èç¹û·þÎñÆ÷È¡Ïû¹ýĬÈϵĹ²Ïí£¨$)Ôò»áʧ°Ü£»´Ëʱн¨Ò»¸öĿ¼£¬²¢¸³ÓèȨÏÞ£¬Ä¿Â¼¸ÄΪ£º\\computer_machine\¹²ÏíĿ¼Ãû
2¡¢½¨Á¢ÓÃÓÚ·¢²¼Ó¦ÓõÄwindowsÕ˺Å
3¡¢ÔÚÅäÖ÷ַ¢·þÎñÆ÷ʱÔâÓöÁË ´íÎó18483 ÌáʾÒòΪdistributor_adminδÔڸ÷þÎñÆ÷É϶¨ÒåΪԶ³ÌµÇ½,¹ÊÎÞ·¨´´½¨
½â¾ö·½·¨£º(ÔËÐÐÒÔϳÌÐò£©
USE master
GO
--ÉèÖÃÁ½¸ö±äÁ¿
DECLARE @serverproperty_servername  varchar(100),
 @servername    varchar(100)
--È¡µÃWindows NT ·þÎñÆ÷ºÍÓëÖ¸¶¨µÄ SQL Server ʵÀý¹ØÁªµÄʵÀýÐÅÏ¢
--¾ßÌå¿ÉÒÔ¿´Áª»ú´ÔÊé"SERVERPROPERTY"
SELECT @serverproperty_servername = CONVERT(varchar(100), SERVERPROPERTY('ServerName'))
--·µ»ØÔËÐÐ Microsoft® SQL Server™ µÄ±¾µØ·þÎñÆ÷Ãû³Æ
--¾ßÌå¿ÉÒÔ¿´Áª»ú´ÔÊé@@SERVERNAME
SELECT @servername = CONVERT(varchar(100), @@SERVERNAME)
--Èç¹û@serverproperty_servernameºÍ@servername²»Í¬(ÒòΪÄã¸Ä¹ý¼ÆËã»úÃû×Ö),ÔÙÔËÐÐÏÂÃæµÄ
--ɾ³ý´íÎóµÄ·þÎñÆ÷Ãû
EXEC sp_dropserver @server=@servername
--Ìí¼ÓÕýÈ·µÄ·þÎñÆ÷Ãû
EXEC sp_addserver @server=@serverproperty_servername, @local='local'
2:×Þ½¡´ð¸´µÄ:
--³öÏÖÕâÖÖÎÊÌâ,Ó¦¸ÃÊÇÄãÔø¾­¸ü¸Ä¹ý¼ÆËã»úÃû
--Ö´ÐÐÏÂÃæµÄÓï¾ä,Íê³ÉºóÖØÐÂÆô¶¯SQL·þÎñ
if serverproperty('servername') <> @@servername
begin
declare @server sysname
set @server = @@servername
exec sp_dropserver @server = @server
set @server = cast(serverproperty('servername') as sysname)
exec sp_addserver @server = @server , @local = 'LOCAL'
end
µ«ÊÇÎÒÖ´ÐÐÍêÉÏÃæµÄSQL,ÖØÆô·þÎñÒÔºó,»¹ÊDZ¨Í¬ÑùµÄ´íÎó.×îºó³¢ÊÔ×Å°Ñ×¢²áÃûÊÖ¶¯¸ü¸ÄµÄºÍ¼ÆËã»úÃûÒ»ÖÂ,½á¹û¾ÍOKÁË.


Ïà¹ØÎĵµ£º

sql server³öÏÖÑ¡¶¨µÄÓû§ÓµÓжÔÏó¶øÎÞ·¨É¾³ýµÄ´¦Àí


sql server³öÏÖÑ¡¶¨µÄÓû§ÓµÓжÔÏó¶øÎÞ·¨É¾³ýµÄ´¦Àí
2006-4-5 19:50:00
·½·¨Ò»
Ê×ÏÈÄãÐèÒª×öµÄµÚÒ»¼þÊÂ
ÆóÒµ¹ÜÀíÆ÷-¡µÑ¡Ôñ·þÎñÆ÷-¡µÊô***-¡µ·þÎñÆ÷ÉèÖÃ-¡µÌôÉÏÔÊÐí¶ÔϵͳĿ¼¡£¡£¡£-¡µÈ·¶¨
µÚ¶þ²½
ÕÒµ½ÄãµÄÊý¾Ý¿âÕÒµ½sysusers±íÄÇÄãÒÔÇ°µÄÓû§É¾³ý
µÚÈý²½»ØÈ¥°ÉÊô***Öµ¸Ä»ØÀ´
µÚËIJ¿Öؽ¨Óû§¼´¿É
·½·¨¶þ
¶ ......

Ö´Ðлº´æÒÔÓÅ»¯SQL ServerµÄÄÚ´æÕ¼ÓÃ

×÷Õߣºsuperhasty
  2007-11-29
ÔÚÂÛ̳Éϳ£¼ûÓÐÅóÓѱ§Ô¹£¬ËµSQL ServerÌ«³ÔÄÚ´æÁË¡£ÕâÀï±ÊÕ߸ù¾Ý¾­Ñé¼òµ¥½éÉÜÒ»ÏÂÄÚ´æÏà¹ØµÄµ÷ÓÅ֪ʶ¡£Ê×ÏÈ˵Ã÷Ò»ÏÂSQL
ServerÄÚ´æÕ¼ÓÃÓÉÄļ¸²¿·Ö×é³É¡£SQL ServerÕ¼ÓõÄÄÚ´æÖ÷ÒªÓÉÈý²¿·Ö×é³É£ºÊý¾Ý»º´æ(Data
Buffer)¡¢Ö´Ðлº´æ(Procedure Cache)¡¢ÒÔ¼°SQL ServerÒýÇæ³ÌÐò¡£S ......

oracle sql tuning

alert index mem_ct monitoring usage;
desc v$object_usage;
set linesize 190
select * from v$object_usage;
SQL>SET AUTOTRACE ON;
¡¡¡¡*autotrace¹¦ÄÜÖ»ÄÜÔÚSQL*PLUSÀïʹÓÃ
¡¡¡¡ÆäËûһЩʹÓ÷½·¨£º
¡¡¡¡2.2.1¡¢ÔÚSQLPLUSÖеõ½Óï¾ä×ܵÄÖ´ÐÐʱ¼ä
¡¡¡¡SQL> set timing on;
2.2.2¡¢Ö»ÏÔʾִÐмƻ®--(»áÍ¬Ê ......

SQL ÕÒ³ö¶à¸ö×Ö¶ÎÂú×ãÆäÖÐÒ»¸ö×ֶεÄÐÂд·¨

ÕÒ³öTABLE1ÖÐ
Column1 Âú×ãvalue1
»òÕß
Column2 Âú×ãvalue2
»òÕß
Column3 Âú×ãvalue3
µÄ¼Í¼
SELECT top 10 * from TABLE1
WHERE
CASE WHEN COLUMN1='value1' THEN 1
ELSE
(CASE WHEN COLUMN2='value2' THEN 1
ELSE
(CASE WHEN COLUMN3=value3 THEN 1 ELSE 0 END)
END)
END =1 ......

SQL Server 2005 ϵͳÊý¾Ý½éÉÜ£ºsys.dm_exec_requests







Õë¶Ô SQL Server ÄÚÕýÔÚÖ´ÐеÄÿ¸öÇëÇó·µ»ØÒ»ÐС£sys.dm_exec_connections
¡¢sys.dm_exec_sessions
 ºÍsys.dm_exec_requests
 ·þÎñÆ÷·¶Î§¶¯Ì¬¹ÜÀíÊÓͼӳÉäµ½ sys.sysprocesses
 ÏµÍ³ÊÓͼ£¨ÏÈǰΪϵͳ±í£©¡£
×¢Ò⣺
ÈôÒªÖ´ÐÐÔÚ SQL Server ÒÔÍâµÄ´úÂ루ÀýÈ磬À©Õ¹´æ´¢¹ý³ÌºÍ·Ö ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ