2011年12月27日 星期二

新建的MSSQL無法用SA登入

今天測試MS SQL時,一直無法順利登入,應該沒打錯呀..

檢查:
1. 使用Windows Authentication 登入,發現sa 圖示有向下箭頭,按右鍵屬性改為Enable.
2. 再試仍無法登入,錯誤為:Login failed for user 'sa'. (Microsoft SQL Server, Error: 18456)
Search 登入失敗的錯誤訊息,發現是MS SQL ->Server 屬性-> Security -> Server Authentication 的地方,指定使用"Windows Authentication mode",改為"SQL Server and Windows Authentica mode" 即可.

2011年12月18日 星期日

2011 台北富邦馬拉松(2011-12-18)

2011 台北富邦馬拉松: 超多人

隨手拍了一些特別的..


穿著原民服飾的超熱情加油者
據說是某日企老闆.. 雖然天氣涼爽, 但是穿著密不通風的忍者裝, 也著時讓人佩服..
 感謝台灣人對日本東北及311地震捐助的大和女子
穿什麼鞋最好呢? Nike / Addias ... NO!  穿室內拖最厲害..
超有元氣的靓妹加油團
 靓妹加油團二

 靓妹加油團三

2011年12月14日 星期三

LotusScript 與Formula結合時,| (Vertical bar) 發揮大功用.

每當純用LotusScript 來做類似@DBColumn 或@DBLookup動作時就覺得很不好寫..

比如:
       Search "Ref001" view的第一個Column 的動作

要先Search 出所有Document,取得第一筆, 取出第一個Column的欄位值到暫存列, 過慮是否重複,再取下一筆, 最後再排序.... ,往往一行@DBColumn 的動作,就要寫很久..

但其實 LotusScript 是可以結合 Formula 的, 只要透過Evaluate 及 | (Vertical bar) .

Formula 寫法如下: @DbColumn("":"NoCache";"":"";"REF001";1)
在 LotusScript 寫時, 一行只能出現兩個雙引號("), 如果套用有些語言處理雙引號的方法是在前面加上反斜線( \ ), 這會讓閱讀性大幅降低.

以LotusScript的作法是使用 | 來夾 ,經由 | 夾起來後, 不管多少個雙引號都視為字串, 可方便的加上變數.

Formula 的寫法改寫為LotusScript 也只要兩~三行即可完成:
 Dim vrColumn As Variant , tmpstr as string
  tmpstr = mailto:%7C@DbColumn(%22%22:%22NoCache";"| +db.Server+ |":"|+Ct_Replace(db.FilePath,"\","file://%22)+%7c%22;%22ref001%22;1/)|
  varColumn = Evaluate(tmpstr)

排序也只要在@Sort 加到@DBColumn前即可.

有的人堅持LotusScript 就是要只用LotusScript , 寫Formula 就是 Low,  但我覺得方便性及可讀性最重要..不一定寫的最多行就是最厲害.

2011年12月11日 星期日

Sharepoint 2010 的"要求存取(Request access)"在那兒改?

Sharepoint 2010 針對您沒權限時, 延續已往提供的"要求存取(Request Access)"功能, 可以很方便的以E-Mail 方式通知網站管理者, 預設網站管理者為"主要管理員", 一般是設administrator , 因此Email 通知會是 mailto:administrator@%3Cdomain name>, 但是通常管理網站權限的是"次要管理員", 這時就需要變更"要求存取"的通知對象:
登入網站 Site => 網站動作(Site Actions)=>網站設定(Site Settings)=>網站權限(Site Permissions)=>設定=>存取要求(Manage Access Requests)=>勾選"允許存取申請"(Allow requests for access)並修正傳送存取的Email Address.

2011年11月28日 星期一

PowerPoint Web App 時發生錯誤。請稍後再試。

Sharepoint 2010 於網頁瀏覽檔案時,點選"Edit in Browser"時,出現「PowerPoint Web App 時發生錯誤。請稍後再試。」的錯誤訊息。
查找的結果如下,須安裝Hotfix 套件:
http://support.microsoft.com/kb/2553919/zh-tw

但我先在測試環境測試結果,出現英文的錯誤訊息如下:「PowerPoint Web App encountered an error. Please try again.」,經測試環境的驗證發現,是Powerpoint 的Service Application Pool & Proxy 未建立。
依照下面參考文件(http://technet.microsoft.com/en-us/library/hh269604.aspx)的:

End users cannot view or edit Office 2010 documents in the browser 階段的說明進行設定,即可排除問題:

    • 1. 確認 Excel Calculation Services,PowerPoint Service, and Word Viewing Service exist and are startedService 已啟動: Central Administration Web site => Application Management =>  Manage services on server.
    • 2. 確認 Office Web Apps service applications and proxies 已建立。
      1. Application Management => Manage service applications. => 確認applications已存在:
        1. Excel Services Application Web service application 
        2. PowerPoint service application 
        3. Word Viewing service application 

    • 3. 確認三個依存的Proxy group 已存在。
    • 4. 確認存取權限,參閱說明。

2011年11月16日 星期三

Lync 跨Domain Federation 的設定方法

Lync 跨Domain 需有幾個條件:
1. 部屬Edge Server:與其他Domain 界接
2. 外部DNS 有SRV Record: _sipfederationtls._tcp.<domain name> 為 <edge server fqdn>, port 5061
3. 與公眾Provider (MAN/Yahoo等)界接,需花錢更換Edge Server的憑證為外部合法的憑證
4. 購買合法的License

測試環境說明:
1. 兩個沒有Trust 的Domain:domainA.com 及domainB.com
2. Edge Server FQDN為:Exedge-sip.domainA.com 及exedge-sip.domainB.com
3. DNS SVR Record :
DomainA的SVR Record : _sipfederationtls._tcp.domainA.com 為exedge-sip.domainA.com
DomainB的SVR Record : _sipfederationtls._tcp.domainB.com 為exedge-sip.domainB.com
4. 雙方Root CA憑證

步驟:
1. 將Root CA憑證安裝到對方Domain 的Edge Server上:登入Exedge-sip.domainA.com =>mmc=>新增崁入式單元:"憑證Certificate"=>增加My user account & Computer account (local) => 匯入另一個Domain 的Root CA,出現在Certificates-Current user 的Intermediate Certificate Authorities -> Certificates內=> Copy到 Certificate(Local Computer)的Trusted Root Certification Authorities->Certificates內。
2. 另一個DomainB的Exedge-sip.domainB.com 匯入DomainA的Root CA。
3. 設定Feredated Domains : 於DomainA 的Front End Server 上開啟Lync Server Control Panel => External User Access => 1) External Access Policy : Enable communications with federated user. 2)Access  Edge Configuration : Enable federation & Enable partner domain discovery. 3)Federated Domains : New => Allowed domain => Domain name : domainB.com => Access Edge Service : exedge-sip.domainB.com.
4. 同樣的,DomainB 也設定DomainA的Exedge-sip.domainA.com 為domainA.com 的 Edge Server .

未能正常連線的測試:
1. 驗證是否能正確查詢對方的SRV:
1) nslookup - 8.8.8.8
2) set type=srv
3) _sipfederationtls._tcp.domainA.com

2. 啟用Lync Client 的Log機制:
1) lync 選項=>一般=>紀錄=>勾選:在Lync中開啟紀錄
2) Lync重新啟動=>登入
3) 輸入另一個Domain 的Uuser : user1@domainA.com
4) 檢查Log : C:\Documents and Settings\<user name>\Tracing\Communicator-uccapi-0.uccapilog
5) 查詢 "ms-diagnostics",確認"reason"的錯誤原因。

相關參考文件:
1. http://ucworld.blog.51cto.com/811917/499165
2. 用Google 查ms-diagnostics的錯誤訊息
3. http://www.shudnow.net/2011/02/01/lync-2010-edge-utilizing-windows-server-2008-r2-federation-tls-issues/

2011年11月8日 星期二

Sharepoint 啟動網站流量分析

Sharepoint 網站流量分析是滿好用的,有很多圖表及檢視角度。
啟用步驟如下:
1. 需有一個Web Analytics Service Application(Go to Central Administration -> Application Management -> Manage service applications=> new => Web Analytics Service Application),過程中建立一個Web Pool及兩個DB(staging & reporting DB)
2. 啟用兩個Server Serivces : Web Analytics Data Processing Service/ Web Analytics Web Service (Central Administration -> Application Management -> Manage service on server )
3. 啟用 Web Analytics Service 應用程式的流量記錄
  1. 確認執行此程序的使用者帳戶是伺服器陣列管理員群組的成員。
  2. 在管理中心首頁上,按一下 [監視]
  3. 在 [監視] 頁面上,按一下 [報告] 區段中的 [設定 Usage and Health Data Collection]
  4. 在 [設定 Usage and Health Data Collection] 頁面的 [使用狀況資料收集] 區段中,選取 [啟用使用狀況資料收集] 核取方塊。
  5. 在 [事件選擇] 區段中,選取 [要記錄的事件] 清單內事件旁的核取方塊,以選取您要記錄的事件。確定至少已選取下列事件:
    1. 頁面要求
    2. 搜尋查詢使用情況
    3. 網站庫存使用狀況
    4. 分級使用量
  6. 在 [使用狀況資料收集設定] 區段的 [記錄檔位置] 方塊中,輸入您要寫入使用狀況和狀況資訊的目標資料夾路徑。所有伺服器陣列的伺服器上必須存在您指定的路徑。
  7. 在 [記錄檔大小上限] 方塊中,以 GB 為單位 (從 1 到 20 GB) 輸入記錄檔的磁碟空間上限。
  8. 按一下 [確定] 儲存設定並啟用流量記錄。

2011年10月31日 星期一

Sharepoint 2010 啟用 Office Web Apps

最近研究Sharepoint 的共同編輯(Co-author),發現Word / PowerPoint 都可以共同編輯,唯讀 Excel 不行,是沒裝好嗎?

發現不是,目前Excel 2010 並不支援共同編輯,必需採用Browser的方式才能共同編輯。
MS的說明如下:
http://technet.microsoft.com/en-us/library/ff718249.aspx
The Excel 2010 client application does not support co-authoring workbooks in SharePoint Server 2010. However, the Excel client application does support non-real-time co-authoring workbooks stored locally or on network (UNC) paths by using the Shared Workbook feature. Co-authoring workbooks in SharePoint is supported by using the Microsoft Excel Web App, included with Office Web Apps. Office Web Apps is available to users through Windows Live and to business customers with Microsoft Office 2010 volume licensing and document management solutions based on Microsoft SharePoint 2010 Products. 

安裝Office Web Apps 除了裝好後,還需By Site 啟動Feature,步驟如下:
http://technet.microsoft.com/en-us/library/ff431687.aspx

測試結果還真的滿陽春的。
第一個標簽頁:File,內含(Open in Excel / Where's the Save Button/ Save As / Download s shapshot/ Download a copy)
第二個標簽頁:Home,含有基本的Cut / Copy/ Paste / 字型/大小/斜體/ Table 的 Insert / delete 等..
第三個標簽頁:Insert,只有 Table / Hyperlink
沒了!

相對於MS Excel Web App SkyDrive 的功能上,至少SkyDrive 的Insert 標簽頁上,尚有函數及各式圖表可用(直條圖/折線圖/圓形圖/橫條圖/區域圖/散佈圖等)

2011年10月13日 星期四

Lync 2010 Edge Server installation information

MS的Lync Edge Servers安裝說明(http://technet.microsoft.com/en-us/library/gg398230.aspx),看似很詳細,但總是有一種無法確定是否真是這樣作的感覺,相對於這篇來說(http://ocsguy.com/2010/11/21/deploying-an-edge-server-with-lync/),這篇就是一步一步說明如何安裝,如何設定NIC。
這篇提到一張Edge只需要一張網卡(http://chandler-bin.blogspot.com/2011/09/lync-2010-edge-server-for-internet.html)
因此我也只用一張網卡,補充說明幾點:
1. 我也只用一張網卡,Internal IP Bind 3 External IP由於同一網段,就不需要下route -p xxx的Command.
Ex:
Edge Server IP :192.168.1.14
Exedge-sip.<domain> IP: 192.168.1.15
Exedge-webconf.<domain> IP: 192.168.1.16
Exedge-av.<domain> IP: 192.168.1.17
2. 安裝好後,Lync Client 於外部連線時,需使用 443 port,因此,測試時需變更登入位址:檔案=>變更登入位址=>進階=>手動設定=>內部伺服器名稱或IP位址改為:exedge-sip.<domain>:443
3. Lync Server Control Panel 的Topology 所顯示的Edge Server Status 為N/A,但功能都是正常的,可能與沒有Joint domain有關。

2011年9月22日 星期四

IRM Client 無法正常開啟文件

如果電腦裝過一些未經合法或驗證的軟體,可能造成IRM Client無法正常開啟受保護文件。
訊息如下:"Microsoft Office 偵測到您的「資訊版權管理」設定發生問題。請連絡您的管理員以取得其他資訊"或"你沒有權限開啟此文件"

下面整理Windows XP 無法連上IRM (AD RMS)Server 的處理方法:
1. 確認RMS Client已正常安裝(RMS SP2-KB917275-Client)
2. 已安裝RMS Client, 如為Office 2003 ,需上Hotfix Office2003-KB978551 
3. 刪除%username%AppData/Local/Microsoft/DRM 目錄
如仍無法使用.
4. 先用IRMCheck Tools檢查
5. 如果IRMCheck 後顯示Operating system 項目的 ntdll.dll not found. ,則需
5-1 Windows 重新安裝XP-SP3
5-2
使用 SFC /scannow 重新確認遺失連結(XP-SP3 Source CD)
6. 如果 Certificates 未出現 GIC/CLC的憑證資訊:
  6-1確認 %username%AppData/Local/Microsoft/DRM/ 是否產生 Cert-Machine.Drm 
    6-2如已產生Cert-Machine.Drm 但仍無法連上IRM Server,此時User Certificate無法下載=> 確認使用AD IRM Server work well.
  6-3清除cookie/temp files

7. 可多利用IRMCheck Tools確認系統狀態,再拿 Error 項目上網搜尋

8. 如果還不行,可用DebugView收集Error Log.

9. 如果是特定軟體影響,大部分都可用IRMCheck Tools發現:

2011年9月12日 星期一

Office 開啟速度很慢..

今天使用者反應Office 2003 的Excel / Word 等的反應速度很慢,查了幾篇文章,提到一個可行的方法:於"檔案類型"之副檔名的"開啟舊檔"屬性下,取消DDE及加上"%1" 的做法。
參考文件如下:
http://blog.xuite.net/andrew2/mrw/27329565
http://forums.techarena.in/ms-office-support/889081.htm


9/20 修正:
關於取消DDM的作法,爬了一下文,部分人士主張不應如此,提到是Office Add-On的元件拖慢開啟的速度。試了一下確認可行,關閉步驟如 下:
Office 2010下於檔案=>選項=>增益集=>管理:點選[COM增益集]=>執行=>新視窗中,取消非Windows 的增益集功能。
之後測試開啟文件速度

2011年8月9日 星期二

How to change Sharepoint display name ?

今天發現Sharepoint 顯示的使用者名稱不對,找到一些解法:

1. 變更單一使用者名稱:
Set-SPUser -Identity 'abc\stanford' -DisplayName '小明' -Web http://sharepoint site name 就可以將 原本 'abc\stanford' 改為'小明'.

2. 顯示網站所有使用者名稱:
Get-SPUser -Web http://sharepoint site name 

3. 整批更正:如果網站資料有多筆需要更正的,可使用下列指令來整批更正
Get-SPUser –Web http://sharepoint site name  | Set-SPUser –SyncFromAD 
將只有某些系統帳號出現錯誤訊息,其他使用者帳號將可被更正。

2011年8月1日 星期一

WSS 升級至Sharepoint Server 2010重點摘要

升級的文章已經有很多,我這次是作[資料庫附加升級]的模式,(講白一點就是,再裝一台新的,將資料庫移轉到新的Server,好處是升級失敗時,舊的環境可立即恢復):
看過很多篇,收集幾篇比較偏操作,且能夠解決遇到問題的文章。
1. 這篇提到實際升級過程中,執行Preupgradecheck 時,預到 feature info 出現 missing 時,該怎麼排除,且有Tool 能直接清掉missing的Feature! 針對移植的系統來說,很多missing的項目很好用。
http://sharepointgeorge.com/2009/upgrading-content-db-sharepoint-2010-part-1-preupgradecheck/

2. 另一個重要的參考文件: MS的[資料庫附加升級的檢查清單] http://technet.microsoft.com/zh-tw/library/ff607663.aspx 詳細說明階段與步驟。

3. 升級前:
升級前,使用Test-SPContentDatabase 進行驗證,必然出現不少問題:
3.1: 語言套件:
    如果之前WSS 安裝中文套件,一定要在新的Server上,安裝Sharepoint Language Pack for 2010 的套件。否則,執行驗證資料庫命令時 --Test-SPContentDatabase ,會出現 MissingSiteDefinition / MissingLanguagepack / ...的錯誤
注意:Fundation 與 Server 的language Pack(LP)不同,且不需先裝Fundation LP再裝Server LP. (and Restart server )

3.2:Template 套件:
    如果之前安裝Template,如ApplicationTemplateCore.wsp,會檢查出新的Server Default的Content DB內缺少舊DB 所需的Feature。如下:

Category        : MissingFeature
Error           : True
UpgradeBlocking : False
Message         : Database [WSS02_Content] has reference(s) to a missing feature: Id = [75a0fea7-cd50-401e-af0e-782f3662a299].

排除方法:用Google 查Feature id是那個Template,再進行安裝。
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=20267

4. 驗證無誤後,可將DB Mount 並更新設計到新Server的Site,用Mount-SPContentDatabase。
 前提記得先將新Site的Content DB卸載。
如果由一台SPS2010 更換DB到另一台SPS2010 ,需注意兩邊的SPS版本必須一樣,查找步驟:System setting => Manage server in this farm.

5. 升級過後的驗證:
5-1.出現: [無法為 "1028/styles/portal.css" 建立不使用快取的 URL,找不到檔案。請確定檔案存在於版面配置目錄之下。]
Ans : C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\1028\STYLES\ 下缺少 portal.css file ,可自行設計或將Core.css 複製後更名為Portal.css。
相同的,如有xxx.js找不到,可到\14下的其他目錄,或舊Server找找,再複製到相對應目錄即可。
5-2. 若無法顯示頁面:
a. 可以直接前往 URL (http:// siteurl/_layouts/settings.aspx) 查看 [網站設定] 頁面。
b. 新版Layout:使用IE8或以上的Browser,至首頁=>網站動作=>視覺更新。

2011年7月26日 星期二

2011 陽明山越野路跑賽

 2011 陽明山越野路跑活動

今天起個大早(03:40),為了去搭劍潭捷運站的接駁車(04:00~04:50),上車才知道,從劍潭站到中山樓需要40分鐘左右,還好搭的早,早點到,準備的時間多。

到的時候天還沒亮,欣賞一下日出吧~

但總是很重的硫磺味圍繞在身邊,轉頭一看,是牛奶湖。揮之不去的硫磺味!!


06:00 準時出發..
起點於 【陽明山中山樓停車場】沿途經過 【湖山路陽金公路岔路口】=> 【陽金公路陽管處遊客中心】 =>【中興路口】=>【竹子湖派出所】=>【百拉卡公路岔路口】=>小油坑地質景觀區】=>【竹子山道路風口段】最後再依原線折返回終點【陽明山中山樓停車場】。

沿途風景:小油坑前

轉進竹子山道前
轉進竹子山道後,才出現5KM的標示牌,還好竹子山道很漂亮..



已經7.5KM左右了,折返點在遠處的山頭再轉過去..

9.5KM了,快到折返點了!
小結:這次的難度不低,21KM 耗時2H32M。

2011年7月18日 星期一

Lotus Notes connector for Microsoft Online meeting 沒有講的事

使用Notes Client 連到Lync Server做預約會議室時,一般都參考MS 提供的Lotus Notes Connector ,它已經設計好 Notes 範本資料庫(7.X/8.X)及 for HttpRequest的web site 元件(conference/livemeeting)
http://archive.msdn.microsoft.com/LotusNotesConnector

其中沒有講到的幾件事:
1. 建構Web Site時,Authorization 需設為[Basic Authorization]並取消[Anonymouse]及[windows authorization]
2. 8.5.1 版本的Notes Template,其中MSOCSBodyDXL 內的Page已經指名Notes Client的使用版本,如果版本不符,於匯入會議室資訊到Calendar 時,會出現 "DXL importer operation failed" 的錯誤訊息。

2011年7月7日 星期四

如何用Logon Script 來更正Office 的 使用者 user name

用Ghost 出來的OS,其Office 使用者為預設值,如果多人開啟同一份File Server的文件時,最常預到的是出現"唯讀"現象,想要要求使用者關閉,確不知是何人最先開啟。

解決辦法是:要求Office使用者設定"使用者"資訊。
Office 2003 : 工具 => 選項 => 一般 => 使用者名稱
Office 2010 : 檔案 => 選項 => 一般 => 使用者名稱

如果有人不合作,不變更設定,豈不是就沒輒了 ??

還是可以用Logon Script 強制更正:


前略
.........

' for Office : start
hDefKey = &H80000001  '
' Connect to registry provider on target machine with current user'
Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
' 將User Name 轉換為 16 進制編碼
iValues = AsciiToHex(objUser.cn)
BinaryValueName = "UserName"
arrHexValues = Split(iValues, ",") ' 分離字串為陣列
aOfficeVersions = Array("14.0","12.0","11.0")  ' 設定更新的Office 版本
' find the Office version(s) installed
For Each sOfficeVersion In aOfficeVersions
  sRegKeyPath = "Software\Microsoft\Office\" & sOfficeVersion & "\Common\UserInfo"  ' Register key path
    If oReg.EnumKey(hDefKey, sRegKeyPath , arrSubKeys) = 0 Then ' 判斷是否有子鍵值
        oReg.SetBinaryValue hDefKey,sRegKeyPath ,BinaryValueName,arrHexValues  ' 更新
    End If
Next 
sRegKeyPath = "Software\Microsoft\Office\Common\UserInfo"    ' Office 2010 有 default User name 位置
If oReg.EnumKey(hDefKey, sRegKeyPath , arrSubKeys) = 0 Then
    oReg.SetBinaryValue hDefKey,sRegKeyPath ,BinaryValueName,arrHexValues
End If
'
Function AsciiToHex(sData)
  ' Turns ASCII string sData into array of hex numerics
  Dim i, aTmp
  For i = 1 To Len(sData)
    If i = 1 Then
      aTmp = "&H" & Hex(Asc(Mid(sData, i))) & ",&H00"
    Else
      aTmp = aTmp & ",&H" & Hex(Asc(Mid(sData, i))) & ",&H00"
    End If
  Next
  ASCIItoHex = aTmp & ",&H00,&H00"
End Function
' --- for office end


更強的寫法,四行搞定:
Set objWord = CreateObject("Word.Application")
objWord.UserName = objUser.cn
objWord.UserInitials = Left(objUser.cn, 1) & Left(objUser.SN, 1)
objWord.Quit