2011/12/30

MSDTC 問題集錦

最近處理了 MSDTC 的問題,一定要寫一篇記錄下來,黑大真的太強了啊!!!

 

第一步:MSDTC 是否安裝及設定成功?

a.設定(含防火牆)

MSDTC on Windows 2003 SP1的注意事項

http://blog.darkthread.net/blogs/darkthreadtw/archive/2006/03/07/msdtc-on-windows-2003-sp1.aspx

心得:上面這一篇,超級超級超級重要,一定要有耐心看完!!

====我是小抄=====

Enable network DTC access(Win2003 程式集)

MSDTC Security Configuration :Allow Inbound , Allow Outbound , No Authentication Required , Enable XA Transactions

=================

b.安全性設定

心得:不小心遇到了需要做 sc sdshow msdtc 及 sc sdset msdtc <權限> 記得要非常非常小心,最好在做 sdshow 時,直接下這樣子的指令存到一個文字檔中來修改。

sc sdshow msdtc > msdtc-sec.txt 這樣子比較保險一點。

 

【茶包射手專欄】奧妙的MSDTC咒語

http://blog.darkthread.net/blogs/darkthreadtw/archive/2008/04/17/transactionscope-web-access-denied.aspx

 

第二步:確認發生關係的主機,互相都認得?

 

在主機上使用 Ping 主機名稱就知道囉!!

 

KB-MSDTC cross different domains

http://blog.darkthread.net/blogs/darkthreadtw/archive/2007/02/12/kb-msdtc-cross-different-domains.aspx

 

還有遇到多網卡的問題,要確定【發動主機->配合主機】的網路路線,要跟【配合主機->發動主機】的網路路線相同,否則可能出現時好時不好的狀況。

 

第三步:拿MSDTC 除錯工具來驗證

測試DTC設定-使用Mini C# Lab

http://blog.darkthread.net/blogs/darkthreadtw/archive/2009/02/22/test-dtc-with-csharplab.aspx

 

 

 

SQL 2008 / Windows 2008 之 MSDTC 注意事項

http://blog.darkthread.net/post-2010-11-12-msdtc-2008.aspx

 

 

Oracle

【茶包射手專欄】錯怪Oracle~~

http://blog.darkthread.net/blogs/darkthreadtw/archive/2007/08/31/1011.aspx

Distributed Transaction With MS OLEDB Provider For Oracle

http://blog.darkthread.net/blogs/darkthreadtw/archive/2007/11/07/distributed-transaction-with-ms-oledb-provider-for-oracle.aspx

 

MSDTC 除錯工具

測試DTC設定-使用Mini C# Lab

http://blog.darkthread.net/blogs/darkthreadtw/archive/2009/02/22/test-dtc-with-csharplab.aspx

 

 

 

.NET分散式交易程式開發FAQ

http://blog.darkthread.net/blogs/darkthreadtw/archive/2008/05/09/distributed-transactoin-with-dotnet-faq.aspx

2011/12/14

SQL Reporting Service 虛擬化時複製機器的小技巧

虛擬化的好處就是機器可以快速的複製,Windows 系統上,用 sysprep 就可以進行更換 newid ,但是 Reporting Service 就會出現錯誤:

The report server cannot decrypt the symmetric key. Most likely, the service account or password has changed. To continue, run rsconfig.exe to update the report server account information.

由於直接複製,所以 SSRS 的 InstallationID 都會一樣,建立 Reporting Service Cluster 時就會相衝,有以下小技巧可以進行,不用重新安裝:

 

STEP 1:

修改 C:\Program Files\Microsoft SQL Server\<SSRS Instance ID>\Reporting Services\ReportServer\rsreportserver.config 中的 InstallationID,換新的 Guid

 

   1:  <Configuration>
   2:      <Dsn>......</Dsn>
   3:      <ConnectionType>Default</ConnectionType>
   4:      <LogonUser></LogonUser>
   5:      <LogonDomain></LogonDomain>
   6:      <LogonCred></LogonCred>
   7:      <InstanceId>MSRS10_50.MSSQL2008</InstanceId>
   8:      <InstallationID>{12345-f89c-4c11-ae78-52117dafbcc2}</InstallationID>
   9:      <Add Key="SecureConnectionLevel" Value="0"/>
  10:      <Add Key="CleanupCycleMinutes" Value="10"/>
  11:      <Add Key="MaxActiveReqForOneUser" Value="20"/>
  12:      <Add Key="DatabaseQueryTimeout" Value="120"/>
  13:      <Add Key="RunningRequestsScavengerCycle" Value="60"/>
  14:      <Add Key="RunningRequestsDbCycle" Value="60"/>
  15:      <Add Key="RunningRequestsAge" Value="30"/>
  16:      <Add Key="MaxScheduleWait" Value="5"/>
  17:      <Add Key="DisplayErrorLink" Value="true"/>
  18:      <Add Key="WebServiceUseFileShareStorage" Value="false"/>
  19:  </Configuration>

 

STEP 2:

Restore Key (SSRS Key 一定要備份出來,否則連線帳密、設定等資訊都沒有辦法再恢復,等於要重新安裝資料庫,非常重要!!)

延伸閱讀

Configuring a VMWare clone for SSRS disaster recovery

http://www.pertell.com/sqlservings/archive/2011/07/configuring-a-vmware-clone-for-ssrs-disaster-recovery/

SQL Server 的版本編號

Release

Report server

Report server database

SQL Server 2008 R2

10.50.nnnn.nn

n/a

SQL Server 2008 Service Pack 1 (SP1)

10.0.2531.00

C.0.9.45

SQL Server 2008

10.0.1600.00

C.0.9.45

SQL Server 2005 Reporting Services Service Pack 3 (SP3)

9.0.4035.00

C.0.8.54

SQL Server 2005 Reporting Services Service Pack 2 (SP2)

9.0.3042.00

C.0.8.54

SQL Server 2005 Express with Advanced Services

9.0.3042.00

C.0.8.45

SQL Server 2005 Reporting Services Service Pack 1 (SP1)

9.0.2049.00

C.0.8.43

SQL Server 2005 Reporting Services

9.0.1399.01

C.0.8.40

SQL Server 2000 Reporting Services Service Pack 2 (SP2)

8.00.1038

C.0.6.54

SQL Server 2000 Reporting Services Service Pack 1 (SP1)

8.00.0878

C.0.6.51

SQL Server 2000 Reporting Services

8.00.0743

C.0.6.43