2012年4月10日 星期二

Microsoft SQL Server 2012 configuring Firewall ports and protocols


隨著Microsoft發表了最新一代的資料庫 SQL Server 2012,在做新的BI資料庫部屬及安裝常常會用到設定 Windows 2008 R2 的防火牆設定,當我們遵循 Microsoft 所發表的 KBhttp://support.microsoft.com/kb/968872/en-us 去操作時會發現目前KB是使用 “netsh firewall” 指令,而Windows Server 2008 R2 卻是使用新的 “netsh advfirewall firewall”指令,所以我將指令從新編寫為新的格式: 


@echo =========  SQL Server Ports  ===================
@echo Enabling SQLServer default instance port 1433
netsh advfirewall firewall add rule name="SQL Server" dir=in action=allow protocol=TCP localport=1433
@echo Enabling Dedicated Admin Connection port 1434
netsh advfirewall firewall add rule name="SQL Admin Connection" dir=in action=allow protocol=TCP localport=1434
@echo Enabling conventional SQL Server Service Broker port 4022
netsh advfirewall firewall add rule name="SQL Service Broker" dir=in action=allow protocol=TCP localport=4022
@echo Enabling Transact-SQL Debugger/RPC port 135
netsh advfirewall firewall add rule name="SQL Debugger/RPC" dir=in action=allow protocol=TCP localport=135
@echo =========  Analysis Services Ports  ==============
@echo Enabling SSAS Default Instance port 2383
netsh advfirewall firewall add rule name="SQL Analysis Services" dir=in action=allow protocol=TCP localport=2383
@echo Enabling SQL Server Browser Service port 2382
netsh advfirewall firewall add rule name="SQL Browser TCP" dir=in action=allow protocol=TCP localport=2382
@echo Enabling port for SQL Server Browser Service's 'Browse' Button
netsh advfirewall firewall add rule name="SQL Browser UDP" dir=in action=allow protocol=UDP localport=1434
@echo =========  Misc Applications  ==============
@echo Enabling HTTP port 80 netsh advfirewall firewall add rule name="HTTP" dir=in action=allow protocol=TCP localport=80
@echo Enabling SSL port 443
netsh advfirewall firewall add rule name="SSL" dir=in action=allow protocol=TCP localport=443
@echo Allowing multicast broadcast response on UDP (Browser Service Enumerations OK)
netsh advfirewall set currentprofile settings unicastresponsetomulticast enable


啟用通訊協定

在SQL Server中必須先確認 TCP/IP 通訊協定是否為啟用的狀態,開啟 『SQL Server 組態管理員』→『SQL Server 網路組態』→『MSSQLServer的通訊協定』→『TCP/IP』為已啟用. 


2011年1月14日 星期五

Make Portable for microsoft office 2010

準備之前:
  1. 安裝乾淨的Windows作業系統,請勿安裝任何更新與軟體
  2. NET Framework 3.5 SP1 (dotnetfx35.exe)
  3. VMware Thinapp 4.6 安裝程式
  4. 4. Office 2010 安裝程式
開始安裝:

1. 先裝Microsoft .NET Framework 3.5 SP1
2. 接著安裝VMware Thinapp

3.    到程式集開啟 ”ThinApp Setup Capture”

4.   一開始Thinapp將會先掃描安裝軟體前的登錄檔組態,在Advanced Scan Locations可以選擇想要掃描的登錄檔位置


5.  由於安裝OFFICE需要掃描機碼(如果是免安裝則不必)所以必須確定三個機碼均有勾選

6.  在按下Prescan掃描完後,Thinapp會告訴你說可以安裝軟體了,在安裝軟體的過程中請勿關閉這個視窗,Internet Explorer選項可以決定Thinapp是否要把IE的相關項目包含進去,預設是排除。
7. 開啟Office 2010安裝程式,選擇要安裝的產品,接著就等他安裝好。


P.S.:如果有序號,請在安裝完後啟用,如此一來就可以將授權一併寫入進去
P.S.:”Visual Basic for Applicaions”為必選的選項
8.    回到Thinapp畫面,按一下Postscan進行安裝後掃描
9.      出現偵測到的應用程式,想要新增或排除程式就在這裡做設定

10.  接著是權限設定,如果要將程式透過AD發送,請選擇"Only the following Active Directory groups",一般使用者就選擇"Everyone"即可

11.  Isolation Mode有兩種,Merged isolation modeWriteCopy isolation mode,以存檔或是開啟檔案為例,選項一預設都是以"我的文件"或是一些主要目錄為主,選項二則是排除"我的文件"目錄,可能是C:根目錄或使用者帳戶資料夾為主,詳細請到官網查詢

12.  選擇沙盒的位置

13.  客戶經驗回報

14.  輸入專案名稱與專案存放位置
15.  包裝程式的製作選項,除了建立DAT檔外,還可以建立MSI檔與壓縮產生的虛擬檔。
16.  如果在複製完後有出現狀況,則會列出清單警告
17.  最後準備進行包裝,不過對於Office 2010來說還有一個東西要設定,按一下Edit Package.ini
18.  "OptionalAppLink=plugins\*.exe" ”;” 註解拿掉
19.   最後按一下Build進行包裝。

20.  封裝時需要一些時間,封裝完後按一下Finish結束Thinapp,攜式的Office 2010就這樣完成了
21.  完成封裝的檔案都放在 "bin" 資料夾中