»ñÈ¡SQL Server ¶Ë¿ÚºÅºÍIPµØÖ·
ÔÚƽʱµÄ¹¤×÷¹ý³ÌÖУ¬×÷ΪDBA½ÇÉ«¹ÜÀíÊý¾Ý¿â£¬Í·ÄÔÖеÄÓ¡ÏóÍùÍùÊÇÊý¾Ý¿âʵÀýÃû³Æ£¬¶ø²»»áÈ¥¹ØÐÄServerµÄIP£¬¶ø×÷ΪDeveloperµÄ½ÇÉ«£¬ËûÃÇÍùÍùÏëÖªµÀÖªµÀServer IpºÍ¶Ë¿ÚºÅ¡£ËùÒÔ£¬DBA»á¾³£±»Îʼ°µ½£ºXXXʵÀýµÄIPºÍ¶Ë¿ÚºÅÊÇʲô£¿
Õâ¸öÎÊÌ⣬µ±È»ÎÒÃÇ¿ÉÒÔLoginµ½OS²é¿´IP¡¢Ê¹ÓÃÅäÖƹÜÀí¹¤¾ß»ñÈ¡µ½¶Ë¿ÚºÅ¡£µ«ÊÇ£¬Õâ¸ö·½·¨·Ç³£µÄÂé·³£¬´ï²»µ½DBA¸ßЧ¿ìËÙ·´Ó¦µÄÒªÇó¡£
ÄÇô£¬ÕâƪÎÄÕ¾ÍÊÇΪÁ˽â¾öЧÂÊÎÊÌ⣬ʹÓÃÏÂÃæµÄSQL Script¿ÉÒÔÇáËɵĻñÈ¡µ½SQLServer IpºÍ¶Ë¿ÚºÅ¡£
USE master
GO
DECLARE @tcpEndport VARCHAR(20)
,@regeditKey VARCHAR(100)
/**Enable xp_cmdshell
EXEC sp_configure 'show advanced options', 1
RECONFIGURE WITH OVERRIDE
EXEC sp_configure 'xp_cmdshell', 1
RECONFIGURE WITH OVERRIDE
**/
--SQLServer 2000
IF @@VERSION LIKE 'Microsoft SQL Server 2000%'--SQLServer 2000
BEGIN
SET @regeditKey= N'SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\SuperSocketNetLib\Tcp'
EXEC master.dbo.xp_regread
@rootkey='HKEY_LOCAL_MACHINE'
,@key= @regeditKey
,@value_name='TcpPort'
,@value=@tcpEndport OUTPUT
END
/*
SQLServer 2005 and SQLServer 2008
*/
ELSE
BEGIN
IF @@Servicename='MSSQLSERVER'--Default instance
BEGIN
SET @regeditKey='SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\SuperSocketNetLib\Tcp'
END
ELSE
BEGIN
SET @regedi
Ïà¹ØÎĵµ£º
exists £¨sql ·µ»Ø½á¹û¼¯ÎªÕ棩
not exists (sql ²»·µ»Ø½á¹û¼¯ÎªÕ棩
ÈçÏ£º
±íA
ID NAME
1 A1
2 A2
3 A3
±íB
ID AID NAME
1 1 B1
2 & ......
Ò»£®WITH ASµÄº¬Òå
WITH AS¶ÌÓҲ½Ð×ö×Ó²éѯ²¿·Ö£¨subquery factoring£©£¬¿ÉÒÔÈÃÄã×öºÜ¶àÊÂÇ飬¶¨ÒåÒ»¸öSQLƬ¶Ï£¬¸ÃSQLƬ¶Ï»á±»Õû¸öSQLÓï¾äËùÓõ½¡£ÓеÄʱºò£¬ÊÇΪÁËÈÃSQLÓï¾äµÄ¿É¶ÁÐÔ¸ü¸ßЩ£¬Ò²ÓпÉÄÜÊÇÔÚUNION ALLµÄ²»Í¬²¿·Ö£¬×÷ΪÌṩÊý¾ÝµÄ²¿·Ö¡£
Ìرð¶ÔÓÚUNION ALL±È½ÏÓÐÓá£ÒòΪUNION ALLµÄÿ¸ö²¿·Ö¿ÉÄÜÏàͬ£¬µ ......
ADO.net£¬Linq to SQLºÍEntity FrameworkÐÔÄÜʵ²â·ÖÎö
¡¡¡¡×î½üÎĵµÐ´Á˲»ÉÙ£¬µ¼ÖÂWordºÍExcelµÄʹÓÃÄÜÁ¦·ÉÒ»°ã³É³¤¡£¿¼Âǵ½ÏîÄ¿ÖжÁдÊý¾Ý¿âµÄ·½·¨´æÔÚЧÂʲ»¸ß£¬ÒÔÖÂÓ°ÏìÓû§ÌåÑéµÄÎÊÌ⣬¾ö¶¨²âÊÔÒ»ÏÂMicrosoftÐÂÍÆÐеÄLinqºÍEFÄܲ»ÄÜÔÚЧÂÊÉÏÓÐËù¸Ä½ø¡£
¡¡¡¡²âÊÔ»·¾³µ±È»¾ÍÊÇÎÒÕą̂±Ê¼Ç±¾ÁË£¬ÊÜÏÞÓëÓ²ÅÌתËÙ£¬ÔËÐÐÆð ......
weblogic8.1ûÓдøSQL Server 2005µÄJDBCÇý¶¯£¬ÐèҪȥ΢ÈíÍøÕ¾ÏÂÔØ¡£
µØÖ·£ºhttp://msdn.microsoft.com/vstudio/express/sql/download/
Æô¶¯ SQL Server Configuration manager£¬Õ¹¿ªSQL Server 2005
ÍøÂçÅäÖ㬵¥»÷“MSSQLSERVERµÄÐÒé&rdqu ......