sqlserver ÖÐʹÓóÌÐò¼¯Assembly
**ÔÚsqlserverÖÐÈç¹ûҪʹÓÃÒ»¸ö³ÌÐò¼¯Ò»°ãÓÐÈçÏÂ×¢ÒâÊÂÏî
Ò»£º´ò¿ªsqlserver µÄCLRÖ§³Ö
--ÔÚSql ServerÖÐÖ´ÐÐÕâ¶Î´úÂë¿ÉÒÔ¿ªÆôCLR
exec sp_configure 'show advanced options', '1';
go
reconfigure;
go
exec sp_configure 'clr enabled', '1'
go
reconfigure;
exec sp_configure 'show advanced options', '1';
go
¶þ£ºÊÇ·ñÐèÒª·ÃÎÊÍⲿ×ÊÔ´£¬Èç¹ûÐèÒª·ÃÎÊÍⲿ×ÊÔ´»¹ÐèÒªÖ´ÐÐÏÂÃæµÄ
--´ò¿ªÊý¾Ý¿âµÄTRUSTWORTHY ÊôÐÔ
ALTER DATABASE DB_Name set TRUSTWORTHY on;
**ÔÚsqlserverÖÐÈç¹ûҪʹÓÃÒ»¸ö³ÌÐò¼¯Ò»°ãÓÐÁ½ÖÖ·½·¨
·½·¨Ò»£ºÍ¨¹ýT-SQLÊÖ¶¯½«¸Ã³ÌÐò¼¯·ÅÈëµ½SQL Server Æä²½ÖèÈçÏÂ
Ò»£º´´½¨½«ÒªÊ¹ÓõijÌÐò¼¯.dll
³ÌÐòÉÏûʲôϡÆæµÄ£¬¸úÆÕͨµÄado.netµÄ³ÌÐò²î²»¶àÖ÷Òª¾ÍÊÇ·½·¨ÉϼÓÁËÒ»¸öÊôÐÔ (<System.Data.Sql.SqlProcedure(name:="WriteHashedPassword")>)
¶þ£º²¿Êð³ÌÐò¼¯µ½sqlserver
a´ò¿ªsqlserverÖÐclrÖÐÏà¹ØµÄÖ§³Ö£¨·½·¨ÈçÉÏ£©
bÌí¼Ó³ÌÐò¼¯µ½sqlserver
Ïà¹ØÎĵµ£º
SQL Serverµ¼³ö±íµ½EXCELÎļþµÄ´æ´¢¹ý³Ì:
¡¡¡¡*--Êý¾Ýµ¼³öEXCEL
¡¡¡¡µ¼³ö±íÖеÄÊý¾Ýµ½Excel,°üº¬×Ö¶ÎÃû,ÎļþΪÕæÕýµÄExcelÎļþ
¡¡¡¡,Èç¹ûÎļþ²»´æÔÚ,½«×Ô¶¯´´½¨Îļþ
¡¡¡¡,Èç¹û±í²»´æÔÚ,½«×Ô¶¯´´½¨±í
¡¡¡¡»ùÓÚͨÓÃÐÔ¿¼ÂÇ,½öÖ§³Öµ¼³ö±ê×¼Êý¾ÝÀàÐÍ
¡¡¡¡---*/
¡¡¡¡/**//*--µ÷ÓÃʾÀý
¡¡¡¡p_exporttb @tbname='µØÇø ......
ÍÐÁ˼¸ÌìµÄÄÑÌ⣬ÖÕÓÚ½â¾öÁË¡£ÌØ·ÖÏíÒ»ÏÂ
ÒÔÏÂÊÇÒ»¸ö´æ´¢¹ý³Ì
CREATE PROCEDURE deleteAccountAll
@id int
AS
SET XACT_abort ON
BEGIN DISTRIBUTED TRAN
delete from AccountCapital where accountid = @id
delete from logininfo where username = @id
delete from CapitalRecord where accountid ......
1. ΪºÎʹÓÃÓα꣺
ʹÓÃÓαê(cursor)µÄÒ»¸öÖ÷ÒªµÄÔÒò¾ÍÊǰѼ¯ºÏ²Ù×÷ת»»³Éµ¥¸ö¼Ç¼´¦Àí·½Ê½¡£ÓÃSQLÓïÑÔ´ÓÊý¾Ý¿âÖмìË÷Êý¾Ýºó£¬½á¹û·ÅÔÚÄÚ´æµÄÒ»¿éÇøÓòÖУ¬ÇÒ½á¹û
ÍùÍùÊÇÒ»¸öº¬Óжà¸ö¼Ç¼µÄ¼¯ºÏ¡£Óαê»úÖÆÔÊÐíÓû§ÔÚSQL serverÄÚÖðÐеطÃÎÊÕâЩ¼Ç¼£¬°´ÕÕÓû§×Ô¼ºµÄÒâÔ¸À´ÏÔʾºÍ´¦ÀíÕ ......
Óα꣨Cursor£©ÊÇ´¦ÀíÊý¾ÝµÄÒ»ÖÖ·½·¨£¬ÎªÁ˲鿴»òÕß´¦Àí½á¹û¼¯ÖеÄÊý¾Ý£¬ÓαêÌṩÁËÔÚ½á¹û¼¯ÖÐÒ»´ÎÒÔÐлòÕ߶àÐÐÇ°½ø»òÏòºóä¯ÀÀÊý¾ÝµÄÄÜÁ¦¡£ÎÒÃÇ¿ÉÒÔ°ÑÓα굱×÷Ò»¸öÖ¸Õ룬Ëü¿ÉÒÔÖ¸¶¨½á¹ûÖеÄÈκÎλÖã¬È»ºóÔÊÐíÓû§¶ÔÖ¸¶¨Î»ÖõÄÊý¾Ý½øÐд¦Àí¡£
1.ÓαêµÄ×é³É
......
jdbcÅäÖÃÓï¾äΪ: jdbc:microsoft:sqlserver://server_name:1433
ÈçÔËÐгÌÐòʱ³öÏÖ "Error establishing socket" ´íÎó,ÔòÓ¦½øÐÐÈçϵ÷ÊÔ:
1 ¼ì²éSQL SERVER ÊÇ·ñÔÊÐíÔ¶³Ì·ÃÎÊ.¾ßÌå²½Öè:
1)´ò¿ª"ÆóÒµ¹ÜÀíÆ÷",´ò¿ª¿ØÖÆ̨¸ùĿ¼>SQL Server ×é>Êý¾Ý¿â
2)ÔÚÏàÓ¦"Êý¾Ý¿â"Éϵ¥»÷ÓÒ¼ü,Ñ¡Ôñ"ÊôÐÔ"
3)Ñ¡Ôñ"Á¬½Ó"Ñ ......