_覓 | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁 |
FrontPage › ServiceBroker螳
|
|
[edit]
1 螳 #Service Broker SQL Server 2005 襦蟆 覲伎 DBMS 蠍磯 譴 襦 觜蠍 覃讌 豌襴襯 襦蠏碁 弰企 . Service Broker 覿 襦蠏碁 覓朱 一危磯伎 語ろ伎 伎 襦蠏碁 觜蠍 襦蠏碁覦 誤手 . Service Broker襯 危危る れ螻 螳 伎 危願 . 企ゼ 危危覃 覿覿 危危 蟆朱 覺 .
[edit]
2 Conversations() #Conversation企 螳 願, 谿企, 觜蠍一 覃讌 ′企. 覦 Dialog Conversation螻 Monolog Conversation 企蟆 螳讌 覦 , Dialog Conversation 螳 覦 覃讌 ′願, Monolog Conversation 1:れ 螳 覃讌 ′ 螳ロ 覦企. SQL Server 2005 Service Broker Dialog Conversation襷 讌.
(Reliable)
[edit]
3 Message(覃讌) #Message Conversation 蟲 覲( 一危)企. 覃讌 蟲譟磯 れ螻 螳.
覃讌 る 覦 覃讌 伎 . ° 覃讌 XML 螻, JPG . 覃讌 企 襦 るジ 一危 (Collation)襦 蟲焔 一危磯伎り 覃讌襦 ° 朱襦 覃讌 る 伎 一危 . 蠏碁覩襦 覓語 狩 覈 殊貅 .
覃讌 伎 焔 蟆 . 覿覿 覃讌 蠍磯蓋朱 XML 蟠ロ. 讌襷 XML 煙 覿螳 譟伎覩襦 旧朱 伎 蟆曙 蟆 旧 蟆 覦讌 蟆企. 覃讌 誤 覲企 sys.service_message_types .
[edit]
4 Contracts(螻) #Contracts 螳 曙企. Service Broker 螻曙 螳 蠍 覓語, 襯 豌襴 襦蠏碁 豌襴 企 覃讌 讌 蟆企手 . 曙 ろ 蠍 伎, 覯 螻曙 焔覃 覃讌 覈襦 覲蟆渚 . 狩 覦覯 螻曙 蟆企. 螳 企 れ螻 螳.
SELECT C.name Contract , M.name MessageType , CASE WHEN is_sent_by_initiator = 1 AND is_sent_by_target = 1 THEN 'ANY' WHEN is_sent_by_initiator = 1 AND is_sent_by_target = 0 THEN 'INITIATOR' WHEN is_sent_by_initiator = 0 AND is_sent_by_target = 1 THEN 'TARGET' END SentBy FROM sys.service_message_types AS M INNER JOIN sys.service_contract_message_usages AS U ON M.message_type_id = U.message_type_id INNER JOIN sys.service_contracts AS C ON C.service_contract_id = U.service_contract_id ORDER BY 1, 2 [edit]
5 Queues() #覃讌螳 覃讌螳 ル 螻褐 Queue手 . Service Broker 覃覈襴 譟伎 蟆 螻, ろ( 企) ル. 蠏碁覩襦 覃讌螳 朱 . Queue螳 譟伎蠍 覓語 蟆壱(Loose Coupling)襯 伎手鍵 . Loose Coupling 蠍磯 螻 蠍磯 曙 螳 螳螳 襦 蟆 螳ロ 襷.
Service Broker 螳豢一 企 企 覃, 襷 蠍 ろる襯 . 企朱 螳豢一 企 覩襦 覈轟 牛 Queue襯 譟一 . CREATE QUEUE 覈轟朱 Queue襯 燕 FileGroup 讌 Internal Table 豺襯 讌 . 襷 覃讌 豌襴 ろ 蟲 蟆曙磯朱 Filegroup 讌 牛 H/W 焔レ 襦 企 .
SELECT Q.name QueueName , I.name AS InternalName FROM sys.service_queues AS Q INNER JOIN sys.internal_tables AS I ON Q.object_id = I.parent_object_id 襷 Queue 伎 覲願 矩る SELECT覃 . Service Broker Queue 螳 企朱 觀磯ゼ 燕蠍 覓語 譟壱螳 螳ロ. 譟壱 Service Broker 蠍 至鍵 覓語 WITH (NOLOCK) 蟆 蟠螻.
[edit]
6 Service(觜) #Service 企 觜れ 企朱 覈覈. 蠏碁覩襦 れ 覩碁ゼ 螳讌 朱 Service SQL Server 讌 企 詩 訖企. Queue 企 蠏碁襦 Service 企 讌 伎 朱Μ 襴曙 覓語企. 讀, 覓朱Μ 蟲煙 る 螳 觜 企朱 襦蠏碁 覦壱 蠍 覓語企.
觜れ 覲企 sys.services 谿場 覲 朱, 觜れ 螻所螻 sys.service_contract_usages 谿場 覲 .
--螻所螻 SELECT S.name AS Service , Q.name AS Queue , C.name AS Contract FROM sys.services AS S INNER JOIN sys.service_queues AS Q ON S.service_queue_id = Q.object_id INNER JOIN sys.service_contract_usages AS U ON S.service_id = U.service_id INNER JOIN sys.service_contracts AS C ON U.service_contract_id = C.service_contract_id [edit]
7 Conversation Group(蠏碁9) #Conversation Group 覃讌 谿 豌襴襯 旧企. 襯 れ, Message1, Message2, Message3螳 襦 豌襴伎朱 碁 ろ螳 , 覃 磯 蟆曙 螳螳 磯螳 覃讌襯 豌襴 Message2螳 Message3覲企 襾殊 豌襴る 企 覃讌 襯 覦( 蠏碁 谿瑚) 蟆企. 蠏碁9 企 覓語 願屋 譴.
Conversation Group れ螻 螳 .
BEGIN DIALOG @handle FROM SERVICE InitiatorService TO SERIVE 'TargetService' ON CONTRACT 'TestContract' WITH RELATED_CONVERSATION = @related_conversation_handle [edit]
8 Service Broker vs MSMQ #Microsoft 觜蠍 豌襴 襭 MSMQ. Service Broker 譯 MSMQ 觜蟲, 企ゼ 襴覃 螳.
[edit]
9 2008覯? #2008覯 Service Broker 一襯 襷り幻 蠍磯リ骸 讌蟲襯 螻牛. 一 れ螻 螳 CREATE BROKER PRIORITY 覓語朱 れ . 1 10蟾讌 覯襦 一襯 れ 朱 襦 一螳 .
CREATE BROKER PRIORITY InitiatorAToTargetPriority FOR CONVERSATION SET ( CONTRACT_NAME = SimpleContract , LOCAL_SERVICE_NAME = InitiatorServiceA , REMOTE_SERVICE_NAME = N'TargetService' , PRIORITY_LEVEL = 3 ); 觜蠍 豌襴 覈磯 曙 Microsoft ssbdiagnose朱 碁Μ磯ゼ 螻牛 Service Broker 讌 譴. 2008覯 Dialog Conversation 讌 蟆朱 豈 一.
鏤
|
螳 蟾 螻褐 襷 語 企伎. (螳 企) |