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

SQL Server CLRÈ«¹¦ÂÔÖ®Ò»

      Microsoft SQL Server ÏÖÔھ߱¸Óë Microsoft Windows .NET Framework µÄ¹«¹²ÓïÑÔÔËÐÐʱ (CLR) ×é¼þ¼¯³ÉµÄ¹¦ÄÜ¡£CLR ΪÍйܴúÂëÌṩ·þÎñ£¬ÀýÈç¿çÓïÑÔ¼¯³É¡¢´úÂë·ÃÎÊ°²È«ÐÔ¡¢¶ÔÏóÉú´æÆÚ¹ÜÀíÒÔ¼°µ÷ÊԺͷÖÎöÖ§³Ö¡£¶ÔÓÚ SQL Server Óû§ºÍÓ¦ÓóÌÐò¿ª·¢ÈËÔ±À´Ëµ£¬CLR ¼¯³ÉÒâζ×ÅÄúÏÖÔÚ¿ÉÒÔʹÓÃÈκΠ.NET Framework ÓïÑÔ£¨°üÀ¨ Microsoft Visual Basic .NET ºÍ Microsoft Visual C#£©±àд´æ´¢¹ý³Ì¡¢´¥·¢Æ÷¡¢Óû§¶¨ÒåÀàÐÍ¡¢Óû§¶¨Ò庯Êý£¨±êÁ¿º¯ÊýºÍ±íÖµº¯Êý£©ÒÔ¼°Óû§¶¨ÒåµÄ¾ÛºÏº¯Êý¡£
ÏÂÃæÁгöÁËÕâÒ»¼¯³ÉµÄÆäÖÐһЩÖ÷ÒªÓŵ㣺
 ¸üºÃµÄ±à³ÌÄ£ÐÍ¡£
 ¸Ä½øÁË°²È«ºÍ°²È«ÐÔ¡£
 Äܹ»¶¨ÒåÊý¾ÝÀàÐͺ;ۺϺ¯Êý¡£
 Í¨¹ý±ê×¼»¯»·¾³¼ò»¯ÁË¿ª·¢¡£
 ¾ß±¸¸ÄÉÆÐÔÄܺͿÉÀ©Õ¹ÐÔµÄDZÁ¦¡£
¼ÈÈ»CLRÕâôÁé»î£¬ÄÇôÎÒÃÇÈçºÎÔÚT-SQLºÍCLRÖ®¼ä×ö³öÑ¡ÔñÄØ£¿Ò»°ãÇé¿öÏ£¬ÎÒÃǵ±ÒÔT-SQLΪÖ÷£¬ÔÚÏÂÃ漸ÖÖÇé¿öÏ£¬Ó¦¸Ã¿¼ÂÇʹÓÃCLR£º
SQLÖÐÉæ¼°´óÁ¿µÄÂß¼­ÅжϺÍÂß¼­ÔËËã¡£±ÈÈçÐèÒªÔÚÊý¾Ý¿â¼¶±ð×Ô¶¨Òå¼ÓÃÜËã·¨£¬½âÃÜËã·¨µÈ¡£
T-SQLÎÞ·¨´¦ÀíÐèÇó¡£±ÈÈçÐèÒªÔÚSQLÖнøÐÐÕý¹æ±í´ïʽµÄÅжϵȡ£
Âß¼­ÅжϹýÓÚ¸´ÔÓ£¬ÐèҪʹÓôóÁ¿Óαê½øÐд¦Àí¡£ÕâÖÖÇé¿öÒ»°ãÒª½øÐвâÊÔ£¬ÒòΪCLR²»Ò»¶¨±ÈÓαê¿ì£¬¹Ø¼üÊÇ¿´ÄãÔõôд¡£
ÏÂÃæ½éÉÜÒ»ÏÂÈçºÎ¿ªÆôCLRºÍÁ½ÖÖ´´½¨CLRµÄ·½·¨¡£¹ØÓÚÈçºÎÔÚVSÖбàдCLR³ÌÐò£¬Çë¿´ºóÐøÕ½ڡ£
¿ªÆôCLR¡£
ÔÚSQL Server2005/2008ÀïÃ棬CLRĬÈÏÊǹرյġ£¿ÉÒÔʹÓÃÈçÏÂSQLÓï¾ä¿ªÆôCLR¡£
sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'clr enabled', 1;
GO
RECONFIGURE;
GO
´´½¨CLR¡£
·½·¨Ò»£ºÊ¹ÓÃDLLÎļþ½øÐд´½¨
CREATE ASSEMBLY AssemblyName from ‘DLLPath’
ÀýÈ磺CREATE ASSEMBLY AssemblyName from ‘c:\hello.dll’
·½·¨¶þ:ʹÓÃÎļþ16½øÖÆÁ÷½øÐд´½¨
CREATE ASSEMBLY AssemblyName from ÎļþÊ®Áù½øÖÆÁ÷
ÀýÈç:CREATE ASSEMBLY AssemblyName from 0x123344……
ÆäÖÐ0x12334……ÊÇÎļþc:\hello.dllµÄÊ®Áù½øÖÆÁ÷¡£¿ÉÒÔʹÓÃUltraEditµÈ±à¼­Æ÷°ÑÏà¹ØdllÎļþµÄÊ®Áù½øÖÆÁ÷copy³öÀ´¡£
Ïà±È½Ï£¬·½·¨Ò»¼òµ¥£¬ÊôÓÚÍⲿÒýÓã¬Í¨¹ý´´½¨¾Í¿ÉÒÔÖªµÀÊÇÄĸöÎļþ¡£µ«ÊÇdllÎļþ·¾¶±ØÐë¿ÉÒÔ±»SQLServerËù·ÃÎÊ£¬ÇÒ²¿ÊðʱdllÒªËæSQLServer±ä»¯¶ø±ä»¯¡£
·½·¨¶þÊÇ°ÑÁ÷д½øSQLServerÖУ¬´ÓÒ»¶¨³Ì¶ÈÉÏÆÁ±ÎÁË´


Ïà¹ØÎĵµ£º

ʹÓÃSQLServerÄ£°åÀ´Ð´¹æ·¶µÄSQLÓï¾ä

Èç¹ûÄã¾­³£Óöµ½ÏÂÃæµÄÎÊÌ⣬Äã¾ÍÒª¿¼ÂÇʹÓÃSQL ServerµÄÄ£°åÀ´Ð´¹æ·¶µÄSQLÓï¾äÁË£º
SQL³õѧÕß¡£
¾­³£Íü¼Ç³£ÓõÄDML»òÊÇDDL SQL Óï¾ä¡£
ÔÚ¶àÈË¿ª·¢Î¬»¤µÄSQLÖУ¬Ã¿¸öÈ˶¼ÓÐ×Ô¼ºµÄSQLÏ°¹ß£¬Ã»ÓÐÒ»Ì×ͳһµÄ¹æ·¶¡£
ÔÚSQL Server Management StudioÖУ¬ÒѾ­¸ø´ó¼ÒÌṩÁ˺ܶೣÓõÄÏÖ³ÉSQL¹æ·¶Ä£°å¡£
SQL Server Management ......

¶Á¡¶SQL Server 2005¸ß¼¶¹ÜÀí¡·µÄһЩժҪ... Á¬ÔØ5

ÔÚT-SQLÖмàÊÓ½ø³Ì
DBA¸üÔ¸ÒâʹÓÃT-SQLµÄÔ­ÒòÊÇ¿ÉÒԱȓ»î¶¯¼àÊÓÆ÷”¸ü¼ÓÁé»îµØ»ñµÃÐÅÏ¢¡£
1.       sp_whoºÍsp_who2
´æ´¢¹ý³Ìsp_whoÒ²·µ»Øµ±Ç°Á¬½ÓÊý¾Ý¿âʵÀý£¬Ó듻¼àÊÓÆ÷”·Ç³£ÀàËÆ¡£È»¶ø£¬Óû§¿ÉÄÜ·¢ÏÖ×Ô¼º¸üÔ¸ÒâʹÓÃδ¹«¿ªËµÃ÷µÄsp_who2´æ´¢¹ý³Ì£¬ÒòΪËüÌṩ ......

EXCELÊý¾Ýµ¼ÈëSQL µÄÁíÀàÓ÷¨

×ö¿ª·¢¹ý³ÌÖУ¬¾­³£»áÓõ½½«ExcelÖÐÊý¾Ýµ¼³öµ½SQL ServerÖеÄÇé¿ö£¬Äã¿ÉÒÔÀûÓÃSQL SERVER ÖÐ×Ô´øµÄµ¼ÈëÊý¾ÝµÄ·½Ê½£¬µ«ÕâÖÖ·½Ê½£¬ÓÐʱ»á·¢ÏÖÊý¾Ýµ¼Èëºó£¬¿ÉÄÜΪ¿Õ£¬¿ÉÄÜ¿ªÍ·ÉÙ¸öÁ㣬´ËÖÖÇé¿ö¶à³öÏÖÓÚÊýÖµÐ͵ÄÁУ¬½ñÌìÔÚCSDNÉÏÏй䣬ż¶û·¢ÏÖÁËÒ»¸öÌû×Ó£¬½éÉܵÄÒÔÏÂÕâÖÖ·½·¨£¬±¾ÈËÇ¡ÆßÒò×î½ü¹«Ë¾×¼±¸ÉÏÊУ¬Éó¼Æ¾ÖÔÚ×öÉó¼Æ£¬¼¼ ......

SQL SERVER 2005 ¸ß¼¶²éѯ£¨×Ó²éѯ²éѯ£©

--SQL¸ß¼¶³ÌÐòÉè¼Æ£º×Ó²éѯ
use AdventureWorks
GO
SELECT DISTINCT EmployeeID from HumanResources.JobCandidate WHERE EmployeeID IS NOT NULL;
SELECT e.EmployeeID,FirstName,LastName
from HumanResources.Employee e
INNER JOIN Person.Contact c
 ON e.ContactID = c.ContactID
WHERE e.EmployeeID IN ......

phpmyadmin ÐÞ¸ÄÖ´ÐÐsqlÎļþ´óСÏÞÖÆ

phpmyadmin ÐÞ¸ÄÖ´ÐÐsqlÎļþ´óСÏÞÖÆ
´ò¿ªphp.ini
post_max_size = 100M       ; ±íµ¥Ìá½»Îļþ´óСÉÏÏÞ
memory_limit = 128M    ; ÄÚ´æÉÏÏÞ
upload_max_filesize = 100M ; ÉÏ´«Îļþ´óСÉÏÏÞ
ÐÞ¸ÄÒÔÉÏÈýÏ¾Í¿ÉÒÔ½â¾ö¡£ µ«ÊÇ´ËʱPHPMYADMINÖÐ×î´óÏÞÖÆ£º22,528 KB£¬ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ