飞舞的幻想

常用链接

统计

Google Adsense

Zanox FWHX

花个明白

最新评论

2007年7月10日 #

DB2 时间转换

create function ts_fmt(TS timestamp, fmt varchar(20)) returns varchar(50) return with tmp (dd,mm,yyyy,hh,mi,ss,nnnnnn) as ( select substr( digits (day(TS)),9), substr( digits (month(TS)),9) , rtrim(char(year(TS))) , substr( digits (hour(TS)),9), substr( digits (minute(TS)),9), substr( digits (second(TS)),9), rtrim(char(microsecond(TS))) from sysibm.sysdummy1 ) select case fmt when 'yyyymmdd' then yyyy || mm || dd when 'mm/dd/yyyy' then mm || '/' || dd || '/' || yyyy when 'yyyy/dd/mm hh:mi:ss' then yyyy || '/' || mm || '/' || dd || ' ' || hh || ':' || mi || ':' || ss when 'nnnnnn' then nnnnnn else 'date format ' || coalesce(fmt,' ') || ' not recognized.' end from tmp 使用例句: update t_attachment as a set a.attach_path=(select '/'||rtrim(char(apply_com_id))||'/'||rtrim(char(ts_fmt(apply_date,'yyyymmdd')))||'/' from t_rmbs_claim as c where a.claim_id=c.claim_id)||rtrim(a.attach_path) where exists (select 1 from t_rmbs_claim as tc where tc.claim_id=a.claim_id);

posted @ 2010-03-05 18:18 飞舞的幻想 阅读(251) | 评论 (0)编辑 收藏

DB2 restore Redirect

(1)db2 restore db EFINANCE incremental from /db2/eFinance091228  taken at 200912282115 on /db2/eFinanceWJ28 into EFINAN28 logtarget /db2/eFinanceWJ28 redirect generate script  restore.clp
说明:EFINANCE 为备份前的数据库名称  EFINAN28 为回复后的数据库名称 /db2/eFinance091228备份文件存放的路径  /db2/eFinanceWJ28为还原后日志存放路径以及还原后数据库文件路径。

(2)db2 -tvf  restore.clp
如果需要重新指定表空间的路径请修改该文件
该文件内容如下:
-- *****************************************************************************
-- ** automatically created redirect restore script
-- *****************************************************************************
UPDATE COMMAND OPTIONS USING S ON Z ON EFINANCE_NODE0000.out V ON;
SET CLIENT ATTACH_DBPARTITIONNUM  0;
SET CLIENT CONNECT_DBPARTITIONNUM 0;
-- *****************************************************************************
-- ** automatically created redirect restore script
-- *****************************************************************************
RESTORE DATABASE EFINANCE
-- USER  <username>
-- USING '<password>'
FROM '/db2/eFinance091228'
TAKEN AT 20091228211504
ON '/db2/eFinanceWJ28'
DBPATH ON '/db2/eFinanceWJ28'
INTO EFINAN28
LOGTARGET '/db2/eFinanceWJ28/'
-- NEWLOGPATH '/ef/appinst/appinst/NODE0000/SQL00002/SQLOGDIR/'
-- WITH <num-buff> BUFFERS
-- BUFFER <buffer-size>
-- REPLACE HISTORY FILE
-- REPLACE EXISTING
REDIRECT
-- PARALLELISM <n>
-- WITHOUT ROLLING FORWARD
-- WITHOUT PROMPTING
;
-- *****************************************************************************
-- ** table space definition
-- *****************************************************************************
-- *****************************************************************************
-- ** Tablespace name                            = SYSCATSPACE
-- **   Tablespace ID                            = 0
-- **   Tablespace Type                          = Database managed space                     
-- **   Tablespace Content Type                  = All permanent data. Regular table space.   
-- **   Tablespace Page size (bytes)             = 4096
-- **   Tablespace Extent size (pages)           = 4
-- **   Using automatic storage                  = Yes    
-- **   Auto-resize enabled                      = Yes    
-- **   Total number of pages                    = 24576
-- **   Number of usable pages                   = 24572
-- **   High water mark (pages)                  = 21080
-- *****************************************************************************
-- *****************************************************************************
-- ** Tablespace name                            = TEMPSPACE1
-- **   Tablespace ID                            = 1
-- **   Tablespace Type                          = System managed space                       
-- **   Tablespace Content Type                  = System Temporary data                      
-- **   Tablespace Page size (bytes)             = 4096
-- **   Tablespace Extent size (pages)           = 32
-- **   Using automatic storage                  = Yes    
-- **   Total number of pages                    = 1
-- *****************************************************************************
-- *****************************************************************************
-- ** Tablespace name                            = USERSPACE1
-- **   Tablespace ID                            = 2
-- **   Tablespace Type                          = Database managed space                     
-- **   Tablespace Content Type                  = All permanent data. Large table space.     
-- **   Tablespace Page size (bytes)             = 16384
-- **   Tablespace Extent size (pages)           = 32
-- **   Using automatic storage                  = No     
-- **   Auto-resize enabled                      = No     
-- **   Total number of pages                    = 1310720
-- **   Number of usable pages                   = 1310688
-- **   High water mark (pages)                  = 886976
-- *****************************************************************************
SET TABLESPACE CONTAINERS FOR 2
-- IGNORE ROLLFORWARD CONTAINER OPERATIONS
USING (
FILE   '/db2/eFinanTS28/eFinance/USERSPACE1'                                 1310720
);
-- *****************************************************************************
-- ** Tablespace name                            = TBS_DATA32K
-- **   Tablespace ID                            = 3
-- **   Tablespace Type                          = Database managed space                     
-- **   Tablespace Content Type                  = All permanent data. Large table space.     
-- **   Tablespace Page size (bytes)             = 32768
-- **   Tablespace Extent size (pages)           = 32
-- **   Using automatic storage                  = No     
-- **   Auto-resize enabled                      = No     
-- **   Total number of pages                    = 327680
-- **   Number of usable pages                   = 327648
-- **   High water mark (pages)                  = 9856
-- *****************************************************************************
SET TABLESPACE CONTAINERS FOR 3
-- IGNORE ROLLFORWARD CONTAINER OPERATIONS
USING (
FILE   '/db2/eFinanTS28/eFinance/TBS_DATA32K'                                 327680
);
-- *****************************************************************************
-- ** Tablespace name                            = TBS_DATA4K
-- **   Tablespace ID                            = 4
-- **   Tablespace Type                          = Database managed space                     
-- **   Tablespace Content Type                  = All permanent data. Large table space.     
-- **   Tablespace Page size (bytes)             = 4096
-- **   Tablespace Extent size (pages)           = 32
-- **   Using automatic storage                  = No     
-- **   Auto-resize enabled                      = No     
-- **   Total number of pages                    = 2621440
-- **   Number of usable pages                   = 2621408
-- **   High water mark (pages)                  = 25440
-- *****************************************************************************
SET TABLESPACE CONTAINERS FOR 4
-- IGNORE ROLLFORWARD CONTAINER OPERATIONS
USING (
FILE   '/db2/eFinanTS28/eFinance/TBS_DATA4K'                                 2621440
);
-- *****************************************************************************
-- ** Tablespace name                            = TBS_IDX4K
-- **   Tablespace ID                            = 5
-- **   Tablespace Type                          = Database managed space                     
-- **   Tablespace Content Type                  = All permanent data. Large table space.     
-- **   Tablespace Page size (bytes)             = 4096
-- **   Tablespace Extent size (pages)           = 32
-- **   Using automatic storage                  = No     
-- **   Auto-resize enabled                      = No     
-- **   Total number of pages                    = 2621440
-- **   Number of usable pages                   = 2621408
-- **   High water mark (pages)                  = 96
-- *****************************************************************************
SET TABLESPACE CONTAINERS FOR 5
-- IGNORE ROLLFORWARD CONTAINER OPERATIONS
USING (
FILE   '/db2/eFinanTS28/eFinance/TBS_IDX4K'                                  2621440
);
-- *****************************************************************************
-- ** Tablespace name                            = CMCC_DATA
-- **   Tablespace ID                            = 6
-- **   Tablespace Type                          = Database managed space                     
-- **   Tablespace Content Type                  = All permanent data. Large table space.     
-- **   Tablespace Page size (bytes)             = 16384
-- **   Tablespace Extent size (pages)           = 32
-- **   Using automatic storage                  = No     
-- **   Auto-resize enabled                      = No     
-- **   Total number of pages                    = 655360
-- **   Number of usable pages                   = 655328
-- **   High water mark (pages)                  = 32736
-- *****************************************************************************
SET TABLESPACE CONTAINERS FOR 6
-- IGNORE ROLLFORWARD CONTAINER OPERATIONS
USING (
FILE   '/db2/eFinanTS28/eFinance/CMCC_DATA'                                   655360
);
-- *****************************************************************************
-- ** Tablespace name                            = CMCC_DATA32
-- **   Tablespace ID                            = 7
-- **   Tablespace Type                          = Database managed space                     
-- **   Tablespace Content Type                  = All permanent data. Large table space.     
-- **   Tablespace Page size (bytes)             = 32768
-- **   Tablespace Extent size (pages)           = 32
-- **   Using automatic storage                  = No     
-- **   Auto-resize enabled                      = No     
-- **   Total number of pages                    = 327680
-- **   Number of usable pages                   = 327648
-- **   High water mark (pages)                  = 22496
-- *****************************************************************************
SET TABLESPACE CONTAINERS FOR 7
-- IGNORE ROLLFORWARD CONTAINER OPERATIONS
USING (
FILE   '/db2/eFinanTS28/eFinance/CMCC_DATA32'                                 327680
);
-- *****************************************************************************
-- ** Tablespace name                            = TBS_IDX01
-- **   Tablespace ID                            = 8
-- **   Tablespace Type                          = Database managed space                     
-- **   Tablespace Content Type                  = All permanent data. Large table space.     
-- **   Tablespace Page size (bytes)             = 4096
-- **   Tablespace Extent size (pages)           = 32
-- **   Using automatic storage                  = No     
-- **   Auto-resize enabled                      = No     
-- **   Total number of pages                    = 2621440
-- **   Number of usable pages                   = 2621408
-- **   High water mark (pages)                  = 274176
-- *****************************************************************************
SET TABLESPACE CONTAINERS FOR 8
-- IGNORE ROLLFORWARD CONTAINER OPERATIONS
USING (
FILE   '/db2/eFinanTS28/eFinance/TBS_IDX01'                                  2621440
);
-- *****************************************************************************
-- ** Tablespace name                            = DMS_TMP_32K
-- **   Tablespace ID                            = 9
-- **   Tablespace Type                          = Database managed space                     
-- **   Tablespace Content Type                  = System Temporary data                      
-- **   Tablespace Page size (bytes)             = 32768
-- **   Tablespace Extent size (pages)           = 32
-- **   Using automatic storage                  = No     
-- **   Auto-resize enabled                      = No     
-- **   Total number of pages                    = 327680
-- **   Number of usable pages                   = 327648
-- **   High water mark (pages)                  = 64
-- *****************************************************************************
SET TABLESPACE CONTAINERS FOR 9
-- IGNORE ROLLFORWARD CONTAINER OPERATIONS
USING (
FILE   '/db2/eFinanTS28/eFinance/DMS_TMP_32K'                                 327680
);
-- *****************************************************************************
-- ** Tablespace name                            = SYSTOOLSPACE
-- **   Tablespace ID                            = 10
-- **   Tablespace Type                          = Database managed space                     
-- **   Tablespace Content Type                  = All permanent data. Large table space.     
-- **   Tablespace Page size (bytes)             = 4096
-- **   Tablespace Extent size (pages)           = 4
-- **   Using automatic storage                  = Yes    
-- **   Auto-resize enabled                      = Yes    
-- **   Total number of pages                    = 8192
-- **   Number of usable pages                   = 8188
-- **   High water mark (pages)                  = 1512
-- *****************************************************************************
-- *****************************************************************************
-- ** Tablespace name                            = SYSTOOLSTMPSPACE
-- **   Tablespace ID                            = 11
-- **   Tablespace Type                          = System managed space                       
-- **   Tablespace Content Type                  = User Temporary data                        
-- **   Tablespace Page size (bytes)             = 4096
-- **   Tablespace Extent size (pages)           = 4
-- **   Using automatic storage                  = Yes    
-- **   Total number of pages                    = 1
-- *****************************************************************************
-- *****************************************************************************
-- ** Tablespace name                            = EF_ENGINE_16K
-- **   Tablespace ID                            = 12
-- **   Tablespace Type                          = Database managed space                     
-- **   Tablespace Content Type                  = All permanent data. Large table space.     
-- **   Tablespace Page size (bytes)             = 16384
-- **   Tablespace Extent size (pages)           = 32
-- **   Using automatic storage                  = No     
-- **   Auto-resize enabled                      = No     
-- **   Total number of pages                    = 655360
-- **   Number of usable pages                   = 655328
-- **   High water mark (pages)                  = 96
-- *****************************************************************************
SET TABLESPACE CONTAINERS FOR 12
-- IGNORE ROLLFORWARD CONTAINER OPERATIONS
USING (
FILE   '/db2/eFinanTS28/eFinance/EF_ENGINE_16K'                               655360
);
-- *****************************************************************************
-- ** Tablespace name                            = TEMPSPACE16k
-- **   Tablespace ID                            = 13
-- **   Tablespace Type                          = System managed space                       
-- **   Tablespace Content Type                  = System Temporary data                      
-- **   Tablespace Page size (bytes)             = 16384
-- **   Tablespace Extent size (pages)           = 32
-- **   Using automatic storage                  = No     
-- **   Total number of pages                    = 1
-- *****************************************************************************
SET TABLESPACE CONTAINERS FOR 13
-- IGNORE ROLLFORWARD CONTAINER OPERATIONS
USING (
PATH   '/db2/eFinanTS28/eFinance/C0000016k.TMP'
);
-- *****************************************************************************
-- ** start redirected restore
-- *****************************************************************************
RESTORE DATABASE EFINANCE CONTINUE;
-- *****************************************************************************
-- ** end of file
-- *****************************************************************************



(3)db2 rollforward database EFINAN28 to end of logs and complete  overflow log path '(/db2/eFinanceWJ28)'
说明:EFINAN28 为还原的数据库名称 /db2/eFinanceWJ28为日志存放路径 注意 日志一定要全 即要包括回复的当天的全部log文件。

posted @ 2010-01-29 14:05 飞舞的幻想 阅读(1664) | 评论 (0)编辑 收藏

DB2学习的好地方 推荐

http://www.db2china.net/club/?fromuid=328

posted @ 2009-05-13 00:21 飞舞的幻想 阅读(162) | 评论 (0)编辑 收藏

xp系统局域网在运行里访问不了的问题(转)

这个问题一直没弄明白,今天终于调出来了,其实调一下安全就可以了,如下:
依次打开
控制面板--管理工具--本地安全策略--本地策略--安全选项  在里面找到一个叫:本地帐户的共享和安全模式的选项,把它改成经典-本地用户以自己的身份验证 就可以了

posted @ 2009-03-27 14:29 飞舞的幻想 阅读(146) | 评论 (0)编辑 收藏

通过Iframe实现带横向滚动条的多选下拉框并且带提示框

主要思路:
通过Iframe添加滚动条,在调用页面使用Iframe实现滚动条,在iframe页面里面实现多选select。通过主页面将动态option传递给iframe的select实现下拉框。通过popup窗口的方式实现提示框。
说明:调用页面代码里面还加了一个隐藏多选下拉框的目的是为了将值方便的传递以及保持相对较少的代码改动(主要是修改实现)。
调用页面代码:

  1. <select name=TMPFIELD size=9  style='width:160px;display:none;' multiple>  
  2. <%  
  3.    for(int opt5 =0;opt5<cols.size();opt5++){  
  4.      RepColsVo colVo =(RepColsVo) cols.get(opt5);  
  5. %>  
  6. <option title="<%=colVo.getRepColdis()%>" value="<%=colVo.getReportColid()%>"><%=colVo.getRepColdis()%></option>  
  7. <%}%>  
  8. </select>  
  9. <iframe name="iframeShowFields" src="<%=request.getContextPath()%>/jsp/include/iframeSelectReports.jsp"  id="iframeshow" allowTransparency="true"    style="z-index:0;height:150px;width:140px;" scrolling="auto">  
  10. </iframe>  

Iframe页面内容:
  1. <html>  
  2. <head>  
  3. <script language="javascript">  
  4.   var oP=window.createPopup();  
  5.   var globalobject;  
  6.   var oPopBody;  
  7.   function   showTip(_obj){  
  8.   globalobject=_obj;  
  9.   oPopBody= oP.document.body;  
  10.   line=parseInt(event.offsetY/15);  
  11.   if(globalobject.options.length>0){  
  12.   if(line>globalobject.options.length-1)  
  13.   {    
  14.       line=globalobject.options.length-1;   
  15.   }   
  16.   oPopBody.style.background="#fdfce9";   
  17.   oPopBody.style.border="solid black 1px";  
  18.   oPopBody.innerHTML="";  
  19.   var sText =globalobject.options[line].text;      
  20.   oPopBody.innerHTML='<div style="font-family:Arial;font-size:12px;">'+sText+'</div>';   
  21.   len=globalobject.options[line].text.length*10;  
  22.   oP.show(event.clientX+10,event.clientY+10,len, 20,document.body);  
  23.   }   
  24.  }  
  25.  function   hideTip(_obj){    
  26.   if(oP.isOpen){   
  27.     oP.hide();    
  28.    }  
  29.  }  
  30. function   addOption(){   
  31.     var   s=parent.document.frmdefine.TMPFIELD;  
  32.     var len=s.length;  
  33.     for(var i=0;i<len;i++)  
  34.     {  
  35.         var opt=document.createElement("OPTION");        
  36.         opt.text=s.options[i].text;    
  37.         opt.value=s.options[i].value;  
  38.         TMPFIELD.add(opt);  
  39.     }  
  40.        
  41.    
  42.  }  
  43.  </script>  
  44. </head>  
  45. <body bgcolor="#efefef" onload="addOption()">  
  46. <select  id="idtmpfield" onclick="showTip(this);" onmouseout="hideTip(this);" name="TMPFIELD" size=9   style="background-color:#efefef;width:auto;height:auto;border-width:0px;border-style:none;position:absolute;z-index:0;line-height:14px;border:none;clip:rect(0 95% 97% 0);margin-left:-13;margin-right:-50;margin-top:-19;margin-bottom:-40" multiple >  
  47. </select>  
  48. </body>  
  49. </html> 
效果图如下:



posted @ 2008-06-30 09:39 飞舞的幻想 阅读(1820) | 评论 (0)编辑 收藏

Google?baidu?半斤八两?

 

GoogleBaidu?半斤八两?

 

        我是Google的忠实Fans,也就是传说中的“狗粪”,可对于Google对于用户提出的网页Bug的处理态度不敢恭维。由于我本身就是软件开发人员也做过好多的软件测试,在浏览网页什么的时候时不时的就看有什么问题。有些地方虽然是小问题却反映了一个公司的经营理念,工作态度问题,甚至是那些大牌企业口中的“企业文化”。

       可这样对待一名用户者提出的问题,确实让人不耻啊!事情是这样的我一直都在使用Google文件,在上传附件的时候需要验证大小,以前都上传比较小的文件没有超过500kb,结果由于没注意传了个上M的文件,结果提示我超过上传限制500KM。俺很纳闷试验了多次也发邮件询问了几次,起初Goolgle的牛人门说不接收中文问题求助,麻烦大哥你们是牛,看不是所有问题你们都专家,不是所有人都需要求你们。俺就把邮件用英语又发了一遍,结果是网页上已经修改为“KB”而不在是不知道什么的“KM”了,可Google没再给俺下文啊.。也没说一声那到底是啥啊,是俺看花眼了,还是你们马虎了,出了个小小的网页Bug,俺很是纳闷,如果是没问题那干么要修改啊!

       这是小事,却反映了一种态度。是不是有气度,号称很注重企业文化的Google也不过如此啊!当然也不排除有些人为了自己的利益尽量小事化无,那我只能祝福你啦!

       不过邮件让俺删除了,如果还有邮件的话让大家鉴识下啊!

      下面的Baidu更是让人觉得太TM有才了,偶不得不佩服,佩服啊!

      直接帖邮件啦~~

      俺提出的问题:

发件人 : deng947@sohu.com [mailto:deng947@sohu.com]
发送时间 : 2007 7 6 10:29
收件人 : webmaster@baidu.com
主题 : baidu 用户关于个人中心的一个网页问题

 

 百度编辑,您好!

       我是百度的用户,在我登陆百度个人中心的时候看到我的个人中心帐号出现了 “ 欢迎您 ?strong>deng947 |  退出

      不知道 ?strong> 是不是网页的一个小 Bug 啊!

     我使用的浏览器是 IE7 。在 FireFox 2.0.0 .4 下没有问题。

 

                                                                                                                                   此致,

 敬礼!                                                                                                                                                                                                                                        一位百度用户:陈波

                                              2007 年7 6

 

       Baidu的回复:

尊敬的用户:

您好!

请您参阅正确的流程来完成您的有疑问问题的反馈。

 

1、百度贴吧投诉规则:

http://post.baidu.com/f?kz=152755756   

2、百度贴吧投诉:

http://post.baidu.com/f?kw=%CC%F9%B0%C9%CD%B6%CB%DF

 

感谢使用百度! 希望继续支持与使用百度

 

谢谢!

 

       题是这样的就是在我登陆百度个人中心的时候看到我的个人中心帐号出现了 “ 欢迎您 ?strong>deng947 |  退出 ”不知道 ?strong> 是不是网页的一个小 Bug 啊! 我使用的浏览器是 IE7 。在 FireFox 2.0.0 .4 下没有问题。

        是啊,俺应该去投诉,却发现在登录的时候问题已经消失了,看到俺的用户名deng947是被加粗了,而不是?strong>啦!

        是啊!Baidu回复真是有艺术性啊,俺投诉啥啊!不是所有人都能不能明白一些问题的,只能说你TMD太有才了,太有才了,赵大叔估计都能被你忽悠瘸喽,你不去卖拐真是侮辱你自己的智商啊。

         通过以上两个问题,俺只能说牛人啊,都TMD不是一般的牛啊,不过可惜我想大家的眼睛是雪亮雪亮滴,我只能说越是小事越能反映素质啊,道哥大喊“素质,素质!”,这样看来Google、Baidu真的好像是半斤八两吆!

 

 

 

 

posted @ 2007-07-10 10:55 飞舞的幻想 阅读(1559) | 评论 (9)编辑 收藏