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

SQLServer 2008¿çÊý¾Ý¿âʵÀýÊÂÎñ´¦Àí

 ÍÐÁ˼¸ÌìµÄÄÑÌ⣬ÖÕÓÚ½â¾öÁË¡£ÌØ·ÖÏíÒ»ÏÂ
ÒÔÏÂÊÇÒ»¸ö´æ´¢¹ý³Ì
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 = @id
delete from [Trade]..[order] where accountid = @id
delete from account where id = @id
if @@error<>0
rollback tran
else
  commit tran
GO
ÆäÖÐorder±íÓëÆäËû¼¸¸ö±í²»ÔÚͬһ¸öÊý¾Ý¿âʵÀý£¬ÈôÏëʵÏÖÊÂÎñ²Ù×÷£¬¾ßÌåҪעÒâÁ½µã£º
1.´ò¿ªMSDTC·þÎñ£¬¼´ set XACT_abort on £¬Èô±¾»úûÓÐÆô¶¯£¬ÔòÔËÐÐ net start msdtc
2.¶Ô²»Í¬Êý¾Ý¿âʵÀýµÄ·ÃÎÊҪעÒâÓÃ[Êý¾Ý¿âʵÀýÃû]..[±íÃû]


Ïà¹ØÎĵµ£º

sqlServer ÖÐ »ñÈ¡ºº×Ö×Ö´®µÄÆ´ÒôÉùĸ

 CREATE        function fGetPy(@str varchar(500)='')
returns varchar(500)
as
begin
    declare @strlen int,@return varchar(500),@ii int
    declare @c nchar(1),@chn nchar(1)
    select @strlen=len(@str),@retur ......

SqlServer´óÅúÁ¿µ¼Èëµ¼³öÊý¾Ý

BULK INSERT
¡¡¡¡ÔÚSQL ServerÖУ¬BULK INSERTÊÇÓÃÀ´½«ÍⲿÎļþÒÔÒ»ÖÖÌض¨µÄ¸ñʽ¼ÓÔص½Êý¾Ý¿â±íµÄT-SQLÃüÁî¡£¸ÃÃüÁîʹ¿ª·¢ÈËÔ±Äܹ»Ö±½Ó½«Êý¾Ý¼ÓÔص½Êý¾Ý¿â±íÖУ¬¶ø²»ÐèҪʹÓÃÀàËÆÓÚIntegration ServicesÕâÑùµÄÍⲿ³ÌÐò¡£ËäÈ»BULK INSERT²»ÔÊÐí°üº¬Èκθ´ÔÓµÄÂß¼­»òת»»£¬µ«Äܹ»ÌṩÓë¸ñʽ»¯Ïà¹Øµ ......

SQLSERVERÐÞ¸´Ð¡ÖªÊ¶

ÔÚÓëÊý¾Ý¿â´ò½»µÀµÄ¹¤×÷ÖÐʱ³£»áÅöµ½Ò»Ð©Êý¾Ý¿âµÄ´íÎó£¬Õâ¾ÍÉæ¼°µ½ÁËÐÞ¸´µÄ¹ý³Ì£¬ÒÔÏÂ֪ʶµã¶¼ÊÇ´ÓÍøÉÏÊÕ¼¯¶øÀ´:
1¡¢dbcc checkdb
Õâ¸öÃüÁî¿ÖÅÂÊÇÎÒÃÇ×î³£ÓõÄÁË£¬´ø¼ì²éºÍÐÞ¸´¹¦ÄÜ
Óï·¨¸ñʽ£º
DBCC CHECKDB
[
[ ( database_name | database_id | 0
[ , NOINDEX
| , { REPAIR_ALLOW_DATA_LOS ......

sqlserver°²×°ÎÊÌâ×ܽᣨSqlServer2000/2005)

 SQL Server 2000
Installing SQL Server 2000 (EÎÄ)
http://msdn.microsoft.com/en-us/library/aa299042(SQL.80).aspx
SQL Server 2000²¹¶¡
Microsoft SQL Server 2000 Service Pack 3a
http://www.microsoft.com/downloads/details.aspx?displaylang=zh-cn&FamilyID=90DCD52C-0488-4E46-AFBF-ACACE536 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ