微软专家

援引事类,扬搉古今,举要删芜,言辩而理切--QQ276605216

  博客园 :: 首页 :: 联系 :: 订阅 订阅 :: 管理
  39 Posts :: 1 Stories :: 35 Comments :: 1 Trackbacks

公告

昵称:Anders' Yan
园龄:5年
粉丝:0
关注:0

搜索

 
 

常用链接

我的标签

最新评论

阅读排行榜

评论排行榜

推荐排行榜

2012年1月27日 #

摘要: Delphi7 PAnsiChar String 结构指针阅读全文
posted @ 2012-01-27 20:06 Anders' Yan 阅读(7) 评论(0) 编辑

2011年11月3日 #

从Oracle Database 10g开始,Oracle在建库后就默认创建了一个名为GATHER_STATS_JOB的定时任务,用于自动收集CBO的统计信息。理论上一张表超过10%的数据变动就会被这个job收集一次统计信息

 

这个自动化功能已经影响了很多系统的正常运行,晚上10点对于大部分生产系统也并非空闲时段。
而自动分析可能导致极为严重的闩锁竞争,进而可能导致数据库Hang或者Crash。

所以建议最好关闭这个自动统计信息收集功能:
exec DBMS_SCHEDULER.DISABLE('GATHER_STATS_JOB');

1.查询job
SQL> select JOB_NAME,LAST_START_DATE from dba_scheduler_jobs;
JOB_NAME LAST_START_DATE
------------------------------ ------------------
AUTO_SPACE_ADVISOR_JOB 04-DEC-07 10.00.00.692269 PM +08:00
GATHER_STATS_JOB 04-DEC-07 10.00.00.701152 PM +08:00
FGR$AUTOPURGE_JOB
PURGE_LOG 05-DEC-07 03.00.00.169059 AM PRC

----------------------------------------------------------------------------

有两种方法,分别如下:
方法一:
SYSDBA登录
exec dbms_scheduler.disable('SYS.GATHER_STATS_JOB');
exec dbms_scheduler.enable('SYS.GATHER_STATS_JOB');
方法二:
alter system set "_optimizer_autostats_job"=false scope=spfile;
alter system set "_optimizer_autostats_job"=true scope=spfile;
Pfile可以直接修改初始化参数文件
然后重新启动数据库。

 

posted @ 2011-11-03 21:27 Anders' Yan 阅读(12) 评论(0) 编辑

2011年4月19日 #

摘要: arcsde阅读全文
posted @ 2011-04-19 22:34 Anders' Yan 阅读(72) 评论(0) 编辑

2011年4月4日 #

闲来无事,做了个摄像头拍照,activex,还是delphi方便啊

dll:

http://files.cnblogs.com/yansc/WillingWebcam.rar

demo:

http://files.cnblogs.com/yansc/demo1.rar

 

用前先cmd注册 regsvr32 WillingWebcam.dll。

 

COM图片转换备忘

        class ImageConverter2 : System.Windows.Forms.AxHost

        {

            public ImageConverter2()

                : base("59ee46ba-677d-4d20-bf10-8d8067cb8b33")

            { }

            public static System.Drawing.Image IPictureToImage(stdole.StdPicture picture)

            {

                return ImageConverter2.GetPictureFromIPicture(picture);

            }

        }

posted @ 2011-04-04 21:46 Anders' Yan 阅读(420) 评论(2) 编辑

2010年12月21日 #

select updatedate from trans_studycard t
where
to_date('2010-12-17 23:59:59','yyyy-mm-dd hh24:mi:ss') - updatedate >0
and to_date('2010-12-17 23:59:59','yyyy-mm-dd hh24:mi:ss') - updatedate < 3
order by updatedate

 


六种日期函数:
1.       add_months(日期,number)    指定日期推迟number个月
2.       last_day(日期)   指定日期当月的最后一天
3.       new_time(日期,时区简写)   调整时区
4.       next_day(日期,number)   number表示周几,星期日是1,指定number的日期(一周内或一周后)
5.       months_between(日期1,日期2)   日期1和日期2之间有几个月
6.       sysdate   系统当期那日期和时间

 

update trans_exchangeapplication set applicationformdata = replace(applicationformdata,',','#')
where id='1ca156d9-e931-4d70-91a5-c32c1ea724ee'

 

 

/*
sselect to_char(TRANSACTIONTIME,'yyyy-MM-dd') as StatisticDataTime,
sum(decode(TRANSACTIONTYPE,'1',TRANSACTIONMONYAMOUNT,0)) as DepositCount,
sum(decode(TRANSACTIONTYPE,'3',TRANSACTIONMONYAMOUNT,0)) as ConsumCount
from trans_transactionhistory t
where months_between(TRANSACTIONTIME,to_date('2010-12-1','yyyy-MM-dd'))<1
group by to_char(TRANSACTIONTIME,'yyyy-MM-dd')
order by StatisticDataTime desc
*/

 

/*按月,2010年的,按月
select to_char(TRANSACTIONTIME,'yyyy-MM') as StatisticDataTime,
sum(decode(TRANSACTIONTYPE,'1',TRANSACTIONMONYAMOUNT,0)) as DepositCount,
sum(decode(TRANSACTIONTYPE,'3',TRANSACTIONMONYAMOUNT,0)) as ConsumCount
from trans_transactionhistory t
where to_char(TRANSACTIONTIME,'yyyy')='2010'
group by to_char(TRANSACTIONTIME,'yyyy-MM')
order by StatisticDataTime desc
 * */

 

/*季报
select case when to_char(TRANSACTIONTIME,'q')=1 then '第一季度'
when to_char(TRANSACTIONTIME,'q')=2 then '第二季度'
when to_char(TRANSACTIONTIME,'q')=3 then '第三季度'
when to_char(TRANSACTIONTIME,'q')=4 then '第四季度' end as StatisticDataTime,
sum(decode(TRANSACTIONTYPE,'1',TRANSACTIONMONYAMOUNT,0)) as DepositCount,
sum(decode(TRANSACTIONTYPE,'3',TRANSACTIONMONYAMOUNT,0)) as ConsumCount
from trans_transactionhistory t
where to_char(TRANSACTIONTIME,'yyyy')='2010'
group by to_char(TRANSACTIONTIME,'q')
order by StatisticDataTime
 */


/*年报
select to_char(TRANSACTIONTIME,'yyyy') as StatisticDataTime,
sum(decode(TRANSACTIONTYPE,'1',TRANSACTIONMONYAMOUNT,0)) as DepositCount,
sum(decode(TRANSACTIONTYPE,'3',TRANSACTIONMONYAMOUNT,0)) as ConsumCount
from trans_transactionhistory t
where to_number(to_char(TRANSACTIONTIME,'yyyy'))>= 2010 and to_number(to_char(TRANSACTIONTIME,'yyyy'))<=2011
group by to_char(TRANSACTIONTIME,'yyyy')
order by StatisticDataTime desc
 */

 

 

 

 

posted @ 2010-12-21 16:23 Anders' Yan 阅读(41) 评论(0) 编辑

2010年12月18日 #

摘要: Internet Explorer 脚本错误当前页面的脚本发生错误行: 4034char:3错误:缺少对象代码:0URL: file:///C:/Program%20Files/Microsoft%20Visual%20Studio%208/VC/VCWizards/SmartDeviceAppWiz/ATL/ATLProject/html/2052/default.htm网上有一个相似的新建VC++的MFC应用的解决方法:错误提示:当前页面的脚本发生错误行: 4034char: 3错误:缺少对象代码:0URL: file:///D:/program%20files/Microsoft%20V阅读全文
posted @ 2010-12-18 19:32 Anders' Yan 阅读(119) 评论(0) 编辑

2009年3月4日 #

摘要: private Byte[] Image2Bytes(string imagefilename) { System.IO.FileStream stream = new System.IO.FileStream(imagefilename, System.IO.FileMode.OpenOrCreate); byte[] bytes = new byte[stream.Length]; if (s...阅读全文
posted @ 2009-03-04 11:30 Anders' Yan 阅读(436) 评论(2) 编辑

2009年2月9日 #

摘要: CMMI的4,5级高成熟度等级强调数据和量化项目管理,前提必须是过程本身已经稳定,而且组织已经有成熟易用的软件开发过程管理支持平台,日常的任务反馈,变更和缺陷记录等都应该融入到日常工作中。数据的采集要尽量自动化,而且数据的收集不能经常打断开发人员的工作,影响到他们的思考和效率。组织级在技术平台和开发模式不统一的情况下,在过程定义上一定要避免一刀切的标准软件开发过程。需要根据项目本身的特点和人员情况...阅读全文
posted @ 2009-02-09 14:08 Anders' Yan 阅读(115) 评论(0) 编辑

2008年9月27日 #

摘要: 公司强制使用VSS,用SVN惯了,很不爽。整理了下面的对比,请指正 VSS与SVN的对比整理伪秀才Shicheng.yan@gamil.com2008-9-27 项目 VSS SVN 备注 原子性提交 Atomic commit 不支持 支持 SVN无论批量提交包含多少文件修改,只有当全部文件修改都成功入库,该提交才变得有效,才对其他用户可见;否则,无论任何原因造成中断,SVN都会自动“...阅读全文
posted @ 2008-09-27 17:28 Anders' Yan 阅读(5162) 评论(14) 编辑

2008年9月26日 #

摘要: 英文,or,拼音首字母缩写?今天看我们行业的国家的某个数据库标准,哎,全是用拼音首字母的表名、字段名!有中文在旁边注释一下我还能清楚,你看: 目标标识码 MBBSM 要素代码 YSDM 点状地物代码 DZDWDM 点状地物名称 DZDWMC 。。。无语了!个人是强烈反对使用拼音缩写!BBMC与ReptName,一年以后再看上去,哪个容易明白? 例如:报表名称 ReptName; 如果用拼音的话:...阅读全文
posted @ 2008-09-26 10:40 Anders' Yan 阅读(92) 评论(0) 编辑