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
Ïà¹ØÎĵµ£º
ÍÐÁ˼¸ÌìµÄÄÑÌ⣬ÖÕÓÚ½â¾öÁË¡£ÌØ·ÖÏíÒ»ÏÂ
ÒÔÏÂÊÇÒ»¸ö´æ´¢¹ý³Ì
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 ......
¿Î³ÌÉè¼ÆµÄµÚÒ»²½£º
Óû§µÇ½ģ¿é:¾ÍÕâ¸öСģ¿é°ÑÎÒÕûËÀÁË£¬³öÏÖµÄÎÊÌâÒ»¸ö½Ó×ÅÒ»¸ö£¬×îÖ÷ÒªµÄ¾ÍÊÇÊý¾Ý¿âÁ¬½Ó.
question1.
java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
Òì³£ÔÒò£ºÃ»Óе¼Èëµ¼Çý¶¯°üsqljdbc.jar.
question2.
......
Sql ServerµÄ´æ´¢¹ý³ÌÊÇÒ»¸ö±»ÃüÃûµÄ´æ´¢ÔÚ·þÎñÆ÷ÉϵÄTransacation-SqlÓï¾ä¼¯ºÏ,ÊÇ·â×°Öظ´ÐÔ¹¤×÷µÄÒ»ÖÖ·½·¨,ËüÖ§³ÖÓû§ÉùÃ÷µÄ±äÁ¿¡¢Ìõ¼þÖ´ÐкÍÆäËûÇ¿´óµÄ±à³Ì¹¦ÄÜ¡£
´æ´¢¹ý³ÌÏà¶ÔÓÚÆäËûµÄÊý¾Ý¿â·ÃÎÊ·½·¨ÓÐÒÔϵÄÓŵ㣺
&nbs ......
jdbcÅäÖÃÓï¾äΪ: jdbc:microsoft:sqlserver://server_name:1433
ÈçÔËÐгÌÐòʱ³öÏÖ "Error establishing socket" ´íÎó,ÔòÓ¦½øÐÐÈçϵ÷ÊÔ:
1 ¼ì²éSQL SERVER ÊÇ·ñÔÊÐíÔ¶³Ì·ÃÎÊ.¾ßÌå²½Öè:
1)´ò¿ª"ÆóÒµ¹ÜÀíÆ÷",´ò¿ª¿ØÖÆ̨¸ùĿ¼>SQL Server ×é>Êý¾Ý¿â
2)ÔÚÏàÓ¦"Êý¾Ý¿â"Éϵ¥»÷ÓÒ¼ü,Ñ¡Ôñ"ÊôÐÔ"
3)Ñ¡Ôñ"Á¬½Ó"Ñ ......
ÈçºÎÔÚSqlserverÖдÓÍⲿXMLÎļþÖжÁÈ¡ÅäÖÃÐÅÏ¢ÄØ£¿¸ÃÎÊÌâÔ´×ÔÒ»¼ÒÆóÒµµÄ±ÊÊÔÐÅÏ¢ÓиС£
Ò»xmlÎļþÄÚÈÝ£º
<?xml version="1.0" encoding="utf-8"?>
<root>
<db name="ClientDB1" datasize="512MB" datagrowth="100MB" logsize="100MB" loggrowth ="50MB">
</db>
<db ......