2013年4月30日 星期二

50 音.平假片假

  a i u e o
  あ、ア い、イ う、ウ え、エ お、オ
ka ki ku ke ko
か、カ き、キ く、ク け、ケ こ、コ
sa shi su se so
さ、サ し、シ す、ス せ、セ そ、ソ
ta chi tsu te to
た、タ ち、チ つ、ツ て、テ と、ト
na ni nu ne no
な、ナ に、イ ぬ、ヌ ね、ネ の、ノ
h ha hi fu he ho
h は、ハ ひ、ヒ ふ、フ へ、ヘ ほ、ホ
ma mi mu me mo
ま、マ み、ミ む、ム め、メ も、モ
y ya   yu   yo
y や、ヤ   ゆ、ユ   よ、ヨ
ra ri ru re ro
ら、ラ り、リ る、ル れ、レ ろ、ロ
wa       wo
わ、ワ       を、ヲ
n        
ん、ン        

2013年4月25日 星期四

expend BDC 2000 records limit

using powershell command.

$bdcProxy = Get-SPServiceApplicationProxy | where {$_.GetType().FullName -eq ('Microsoft.SharePoint.BusinessData.SharedService.' + 'BdcServiceApplicationProxy')} 


$dbRule = Get-SPBusinessDataCatalogThrottleConfig -Scope Database -ThrottleType Items -ServiceApplicationProxy $bdcProxy  



$dbRule
you will see default setting like below.

Scope: Database
ThrottleType: Items
Enforced: True
Default : 2000
Max: 1000000



#Default and Maximum must be provided together. This increases the limit for external lists to 3000. Set-SPBusinessDataCatalogThrottleConfig -Identity $dbRule -Maximum 1000000 -Default 3000
#This disables a throttling rule. Notice the “:” instead of a space. Set-SPBusinessDataCatalogThrottleConfig -Identity $dbRule -Enforced:$false
#This enables a throttling rule. Set-SPBusinessDataCatalogThrottleConfig -Identity $dbRule -Enforced:$true



reference
http://blogs.msdn.com/b/bcs/archive/2010/02/16/bcs-powershell-introduction-and-throttle-management.aspx
 



 

2013年4月23日 星期二

Kill informix process


onstat -g ses
onstat -g sql
onstat -u

make not of session id and use onmode to kill the session:
onmode -z <session_id>

2013年4月21日 星期日

sp_addlinkedserver 用法.(ODBC OLEDB)


EXEC sp_addlinkedserver
@server = 'ERP',
@srvproduct = '',
@provider = 'MSDASQL',
@datasrc = 'TIPTOP' --//System DSN

EXEC sp_addlinkedserver
@server = 'ERP_DS2',
@srvproduct = '',
@provider = 'MSDASQL',
@datasrc = 'TIPTOP_DS2' --//System DSN

 EXEC sp_addlinkedserver 
 @server = 'WEB1', --Server Name 
 @srvproduct = 'MS SQL',  
 @datasrc = '10.10.10.2' , --Server IP 
 @provider = 'SQLOLEDB'

 --Add Login User and Password 
 EXEC sp_addlinkedsrvlogin 
 @rmtsrvname = 'ERP' , --Server Name 
 @useself = 'false' , 
 @locallogin = NULL , 
 @rmtuser = 'informix' , --User 
 @rmtpassword = 'mypassword' --Password
 EXEC sp_addlinkedsrvlogin 
 @rmtsrvname = 'ERP_DS2' , --Server Name 
 @useself = 'false' , 
 @locallogin = NULL , 
 @rmtuser = 'informix' , --User 
 @rmtpassword = 'mypassword' --Password
 --Add Login User and Password 
 EXEC sp_addlinkedsrvlogin 
 @rmtsrvname = 'WEB1' , --Server Name 
 @useself = 'false' , 
 @locallogin = NULL , 
 @rmtuser = 'sa' , --User 
 @rmtpassword = 'mypassword' --Password

補充:
select * from master.dbo.sysservers   <= 查出所有 已設的連線
exec sp_dropserver 'SPL', 'droplogins';  <=刪除連線

#可在server上安裝 新加 Microsoft.ACE.OLEDB.12.0 後直接連到 txt, excle , access 等等
OLE DB link
[範例] 連接到 Microsoft Access 2002-2003
 EXEC sp_addlinkedserver
   @server = 'SEATTLE Mktg',
  @provider = 'Microsoft.Jet.OLEDB.4.0',
  @srvproduct = 'OLE DB Provider for Jet',
  @datasrc = 'C:\MSOffice\Access\Samples\Northwind.mdb'
?Web=1

#可連到Sharepoint 清單.我還沒試出來
EXEC sp_addlinkedserver
 @server='SPL'
 ,@srvproduct='ACE 12.0'
 ,@provider='Microsoft.ACE.OLEDB.12.0'
 ,@datasrc='http://bbs2.goodwill.com.tw/sites/bonus/China2013/'
 ,@location=null
 ,@provstr='WSS;IMEX=0;RetrieveIds=Yes;LIST={B00081E7-25CE-4140-B4B8-C1840C1428A6}'    --;LIST={0FE42179-B98C-49DB-AF41-48A340BA9154}
 ,@catalog=null
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'SPL',@useself=N'False',@locallogin=null,@rmtuser=N'g05xxx',@rmtpassword='Fxxxxxxxxx

2013年4月17日 星期三

修改 sharepoint account display name

在使用 FBA 的方式, 在sharepoint 中顯示 username 為以以下的格式來顯示.
 i:0#.f|providername|username
由於這種格式鬼才看的懂.所以只能自己下command 一個一個去改
以下為這個 powershell 的指令下法.

Set-SPuser -identity "i:0#.f|ldapmembership|g0114 " -DisplayName "金小姐" -web http://spcenter

2013年4月16日 星期二

此儲存格內的數字其格式為文字或開頭為單引號 去除 Excel ' 單引號的文字數值



excel 中我們可以用(單引號)  '100 強制把數字視為文字形態. 由於我這次使用 Sharepoint export to excel 所轉出來的 .iqy 檔案在excel 中所有 數值形態的欄位都有一個警告

"此儲存格內的數字其格式為文字或開頭為單引號" 由於欄位太多了.要一個一個設回來會很累.



(圖一)

作法.

1.先在EXCEL 空白處(I1)  輸入1.

2.選擇I1 後再按 CTRL+C (複製

3.選擇有誤資料的範圍(A1 ~ F5) (圖二).

4.MOUSE 右鍵, 選擇性貼上->選擇性貼上 (圖二)

5.在運算中選用 乘 . (圖三)

6.完成. 這方式不會改變文字欄位的值. 不過日期形態在轉完後可能還要去設定.儲存格式.


(2)


(3)

2013年4月14日 星期日

在測試東西時常常會因為一些原因重寫, 再重寫時名稱通常會一樣. 所以很有可能會出現以下的錯誤.

「無法部署方案。 與方案中功能'FeatureID'關聯的目 "DirName" 由安裝在伺服器陣列中的功能 "FeatureID" 所使用。 所有功能必須有專屬的目錄,以避免覆寫檔案。」 若已安裝與 SharePoint 方案產生器所部署之功能同名的功能,則可能會發生此情況

解決方案: 使用所產生的方案中之新功能的名稱,或從 SharePoint 伺服器刪除原始的方案。

指令如下.

他會列出己存在的feature ID(xxxx-xxxx-xxxx 為ID) 請使用下列指令來移除.

stsadm -o uninstallfeature -id xxxx-xxxx-xxxx -force

資料參考MSDN
http://technet.microsoft.com/en-us/library/cc262976(v=office.12).aspx


或是去修改vs.net 中專案內該 Feature 名稱. 由 xxx.Feature1 改成 xxx.Feature001 (自己設)





2013年4月9日 星期二

今天在作 sharepoint 2013 BDC , 其中用到 informix CSDK 中的 .net provider 可是在 build 時都會一直出現..
" '無法載入檔案或組件 'IBM.Data.Informix, Version=XXXX, Culture=neutral, PublicKeyToken=7c307b91aa13d208' 或其相依性的其中之一。 系統找不到指定的檔案.."

這是因為 IBM CSDK 不支援 .net framework 3.0 或以上的版本所以 我們無法在 .net framework 4.0 中去使用他. 所以現在我要改用 IBM DATA SERVER. 內有新的 .net provider .可是他只支援  informix 11.10 以後的... 殘念~~~ 所以我只好改用最強的 ODBC來連了.