2012年5月17日 星期四

使用Data Dictionary Creator

如果是重度使用SQL Server Extended Property來記錄額外的欄位資訊者
那 Data Dictionary Creator 這個工具一定要下載來用.
方便你建立額外的自定義屬性例如中文名稱,備註,tooltips等等


他預設會顯示MS_Description這個屬性, 如果你有一些自定義屬性也要顯示,
則在Advanced Setting頁籤中,指定這些額外屬性名稱,如下圖,多個屬性用逗點隔開


接著在DocumentDatabase頁籤中,就會出現這些額外屬性的定義了.如下圖:


真方便.

select a.name,b.column_id,b.name,d.value,d.name
 ,c.name,c.xtype,b.max_length,b.is_nullable
  from  sys.tables a inner join  sys.columns b
    on a.object_id = b.object_id inner join sys.systypes c
    on b.system_type_id = c.xusertype left outer join  sys.extended_properties d   
   on a.object_id = d.major_id and b.column_id = d.minor_id
 order by a.name,b.column_id

 這樣也是可以讀取到所有的欄位及屬性

2012年5月10日 星期四

informix onlog

想要查看某段時間內某使用者的DB記錄. 借助onlog的查看,可略知一二.

首先先查看informix 下的onlog.log檔,找出相對應時間內的log number有哪些
然後執行以下指令

onlog -l -n 470552 -u myuser | more

-n log number
-u 指定使用者
-l  顯示完整log訊息



更多參數說明如下
Usage:  onlog [-l] [-q] [-b] [-d <tape device>] [-n <log unique identifier>]
              [-u <user name>] [-t <TBLspace number>] [-x <transaction number>]

        -l   Display maximum information about each log record
        -q   Do not display program header
        -b   Display information about logged BLOB pages (-d option only)
        -d   Read from tape device
        -n   Display the specified log(s)
        -u   Display the specified user(s)
        -t   Display the specified TBLspace(s)
        -x   Display the specified transaction(s)


天啊..我把SQL SERVER 的唯一帳號密碼改到忘了

SQL SERVER  GBC其中一項規定就是帳號密碼原則要符合GCB規定,所以設定上就調整成 Enforce password policy Enforce password expiration 今天去維護時,打開SSMS 連線後,彈出來密碼到期要更改,於是乎就改了密碼,然後...