2015年3月27日 星期五

Oracle connection數上限 - 查詢

--The number of sessions the database was configured to allow

SELECT name, value 
  FROM v$parameter
 WHERE name = 'sessions';

--The number of sessions currently active

SELECT COUNT(*)
  FROM v$session;

2014年12月30日 星期二

解決:ORA-01000: maximum open cursors exceeded

先看看目前可用的數量是多少 show parameter open_cursors; 進行修改 alter system set open_cursors=1000 scope=both sid='*'; Oracle建議值為500

2014年8月8日 星期五

改win7的預設動態tcp port範圍

用netsh這個命令,可以從命令中的help得到用法 netsh interface ipv4 set dynamicportrange tcp 10000 10000

2014年7月4日 星期五

Batch file to delete files older than N days

forfiles -p "C:\what\ever" -s -m *.* -d <number of days> -c "cmd /c del @path"
See forfile documentation for more details.
For more goodies refer to An A-Z Index of the Windows XP command line

If you don't have forfiles installed on your machine, copy it from any Windows 2003 Server to your Windows XP machine at %WinDir%\system32\ This is possible since the EXE is fully compatible between Win2003 and WinXP.

Later versions of Windows and Windows Server have it installed by default.

Update Win7: Syntax has changed a little therefore the updated command is:
forfiles -p "C:\what\ever" -s -m *.* /D -<number of days> /C "cmd /c del @path"
ref from stackoverflow

2013年10月7日 星期一

啊~不小心把eclipse專案裡的程式碼給砍了

今天不小心把eclipse專案裡的程式碼給砍了,
一開始用Undelete之類的軟體,用了一個免費但很爛的,氣個半死...
而且已經有檔案被蓋掉了  Orz...
過了3秒,冷靜下來之後想到用eclipse內建的Local History功能,它有暫存沒commit的檔案在它的神秘目錄裡面,可以去裡面慢慢挖,把檔案救回來!
路徑如下:
workspace的目錄/.metadata/.plugins/org.eclipse.core.resources/.history/

ref from eclipse的wiki

2013年8月20日 星期二

MySQL的中文問題

--可以修改某個Schema的編碼
alter database 死雞碼 character set utf8;

--可以修改某Table的編碼
alter table 表格名稱 convert to character set utf8;