楼主: Hangxiao

垃圾Sybase 活该倒闭

[复制链接]
论坛徽章:
1
2008新春纪念徽章
日期:2008-02-13 12:43:03
11#
 楼主| 发表于 2010-1-21 15:31 | 只看该作者
In order to make my comments more constructive. I just publish its usage here. So, guy thank you for you concentration.

dbcc monitor ( task, group, option )

Allows a more detailed monitoring of the SQL Server. [Hint: Run dbcctraceon(8399) first, to enable descriptive names for groups.]

      Task
        "clear" clear earlier gathered statistics
        "sample" gather fresh statistics
        "select" enable statistics to be displayed

      group "all" all groups' statistics are gathered/displayed
        group_name name of the group for which statistics are to be gathered/displayed

      option
        "on" enable monitoring
        "off" discontinue monitoring


dbcc traceon( tracenum [, tracenum ] ... )
Turn on specified trace flags.

      tracenum number of the trace flag to turn on

      Trace Flags
      NumberDescription
      200 "Before" image of query tree
      201 "After" image of query tree
      260 To prevent "done_in_proc" messages
      302 Information in index selection
      310 Information in join selection
      317 Complete information in join selection (voluminous)
      320 Turn off join order heuristic
      1204 Print out deadlock chains and victim
      1205 Print out stack traces of deadlocked pids. Use in conjuction with
      1204
      2512 Bypass syslogs when doing checkalloc
      1603 Use only standard unix calls for disk I/O
      1610 Disable packet batching
      3300 Display each log record as it is processed by recovery (voluminous)
      3402 Do a alloc upgrade during loaddb recovery
      3604 Send dbcc output to screen
      3605 Send dbcc output to errorlog
      3607 Do not recover any database, clear tempdb, or startup checkpoint
      3608 Recover master only. Do not clear tempdb, or startup checkpoint
      3609 Recover all databases. Do not clear tempdb, or startup checkpoint
      3620 Do not kill infected processes
      3701 Allows dropping and creating of system indexes (DANGEROUS!)
      4000 Crash server at next loop for recovery testing
      4012 Boot without starting up checkpoint process
      4013 Place a record into errorlog each time someone logs in to the server
      5101 Engine 0 will perform all disk and network I/O.
      5102 Prevents engine 0 from running any non-affinitied tasks
      8399 Enable descriptive names for groups (dbcc monitor)



A sample to use DBCC Monitor

use master
go
dbcc traceon(3604)
dbcc monitor ("clear", "all", "on")
waitfor delay "00:01:00"
dbcc monitor ("sample", "all", "on")
dbcc monitor ("select", "all", "on")
dbcc traceon(8399)
//so the monitor data is populated in the master.sysmonitors tables.
select field_name, group_name, value
  from sysmonitors
dbcc traceoff(8399)
go
dbcc traceoff(3604)
go

使用道具 举报

回复
论坛徽章:
1
2008新春纪念徽章
日期:2008-02-13 12:43:03
12#
 楼主| 发表于 2010-1-21 15:33 | 只看该作者
A Sample To Watch How The Data Value Is Changed


A Sample To Watch How The Data Value Is Changed

/*Scenario 1 common usage in Sybase Agent*/
dbcc monitor("sample","all","on")
dbcc monitor("select","all","on")
dbcc monitor("clear","all","on")
dbcc traceon(8399)

/*wait for interval*/

    select GROUPNAME = group_name,
    FLDNAME    = field_name,
    FLDVALUE   = value
    from master..sysmonitors

/*clear the value for next time*/
dbcc monitor("clear","all","on");

/*****************************************************************************/
/*Scenario 2 for manually watching the metric change */

dbcc monitor("clear", "all", "on")
[wait]
dbcc monitor("sample", "all", "on")
dbcc monitor("select", "all", "on")
dbcc traceon(8399) -- to populate sysmonitors with the monitor counters, may not be needed in most recent versions
select * from sysmonitors
dbcc traceoff(8399)


/*Scenario 2 repeat the following the number in buffer_0 will be changed */

    select GROUPNAME = group_name,
    FLDNAME    = field_name,
    FLDVALUE   = value
    from master..sysmonitors
    where group_name = 'buffer_0'
    order by 1, 3 desc, 2

  
dbcc monitor("sample","all","off")
dbcc monitor("select","all","off")
dbcc monitor("clear","all","off")

/*Scenario 2 the following statement returns nothing, since it has been turned off*/
    select GROUPNAME = group_name,
    FLDNAME    = field_name,
    FLDVALUE   = value
    from master..sysmonitors
    where group_name = 'buffer_0'
    order by 1, 3 desc, 2

    select count(*) from sysmonitors

No data return


dbcc monitor("sample","all","on")
No data return

dbcc monitor("select","all","on")
    The data return  

dbcc monitor("clear","all","on")
The data is return

dbcc monitor("select","all","off")
No data return



Use the following you get an clear result

dbcc monitor("sample","all","on")

dbcc monitor("select","all","on")

dbcc monitor("clear","all","on")


   select GROUPNAME = group_name,
    FLDNAME    = field_name,
    FLDVALUE   = value
    from master..sysmonitors holdlock
    where group_name = 'buffer_0'
    order by 1, 3 desc, 2


Use the following, you get an un-clear result.

dbcc monitor("sample","all","on")

dbcc monitor("select","all","on")

//dbcc monitor("clear","all","on")


   select GROUPNAME = group_name,
    FLDNAME    = field_name,
    FLDVALUE   = value
    from master..sysmonitors holdlock
    where group_name = 'buffer_0'
    order by 1, 3 desc, 2


When there is a dbcc monitor("clear","all","on") statement, the counter number is clear.
and this will affect the number in sysmonitors.

使用道具 举报

回复
论坛徽章:
407
紫蛋头
日期:2012-05-21 10:19:41迷宫蛋
日期:2012-06-06 16:02:49奥运会纪念徽章:足球
日期:2012-06-29 15:30:06奥运会纪念徽章:排球
日期:2012-07-10 21:24:24鲜花蛋
日期:2012-07-16 15:24:59奥运会纪念徽章:拳击
日期:2012-08-07 10:54:50奥运会纪念徽章:羽毛球
日期:2012-08-21 15:55:33奥运会纪念徽章:蹦床
日期:2012-08-21 21:09:51奥运会纪念徽章:篮球
日期:2012-08-24 10:29:11奥运会纪念徽章:体操
日期:2012-09-07 16:40:00
13#
发表于 2010-1-21 18:56 | 只看该作者
HEHE

使用道具 举报

回复
论坛徽章:
1
2010新春纪念徽章
日期:2010-03-01 11:05:01
14#
发表于 2010-2-16 08:45 | 只看该作者
你的关于dbcc monitor的问题我实在没太明白,都是关于Sybase倒闭的说法倒是可以用“荒唐”或者“无知”来形容,看看过去10年的SY股票价格吧,附带和ORCL,IBM, MSFT做了个比较:
http://www.google.com/finance?ch ... =NYSE:SY&ntsp=0

使用道具 举报

回复
论坛徽章:
1
CTO参与奖
日期:2009-01-15 11:42:46
15#
发表于 2010-3-18 19:41 | 只看该作者
关于sybase资料不好找这点,我完全同意楼主观点,话说回来,能找到这篇帖子也是因为我在找dbcc monitor的相关资料才找到这里来

使用道具 举报

回复
论坛徽章:
1
2010新春纪念徽章
日期:2010-03-01 11:06:19
16#
发表于 2010-3-19 10:32 | 只看该作者
楼上的去SYBASE网站找过了么????

使用道具 举报

回复
论坛徽章:
11
生肖徽章2007版:兔
日期:2009-11-22 14:30:45鲜花蛋
日期:2013-01-27 21:01:57茶鸡蛋
日期:2012-04-05 13:26:452012新春纪念徽章
日期:2012-01-04 11:53:54ITPUB十周年纪念徽章
日期:2011-11-01 16:24:04迷宫蛋
日期:2011-10-24 02:01:552011新春纪念徽章
日期:2011-02-18 11:42:48ITPUB9周年纪念徽章
日期:2010-10-08 09:28:512010年世界杯参赛球队:朝鲜
日期:2010-06-30 13:46:012010新春纪念徽章
日期:2010-03-01 11:19:07
17#
发表于 2010-3-19 10:54 | 只看该作者
哎,不好找是真的。就看电子版的官方文档就行了~

使用道具 举报

回复
论坛徽章:
5
ITPUB十周年纪念徽章
日期:2011-11-01 16:24:51茶鸡蛋
日期:2011-12-29 10:46:33迷宫蛋
日期:2011-12-29 16:24:482012新春纪念徽章
日期:2012-01-04 11:54:46紫蛋头
日期:2012-02-21 21:27:43
18#
发表于 2010-3-19 18:34 | 只看该作者
别啊,刚接触sybase,还不太深入,别打击新手信心啊!

使用道具 举报

回复
论坛徽章:
11
生肖徽章2007版:兔
日期:2009-11-22 14:30:45鲜花蛋
日期:2013-01-27 21:01:57茶鸡蛋
日期:2012-04-05 13:26:452012新春纪念徽章
日期:2012-01-04 11:53:54ITPUB十周年纪念徽章
日期:2011-11-01 16:24:04迷宫蛋
日期:2011-10-24 02:01:552011新春纪念徽章
日期:2011-02-18 11:42:48ITPUB9周年纪念徽章
日期:2010-10-08 09:28:512010年世界杯参赛球队:朝鲜
日期:2010-06-30 13:46:012010新春纪念徽章
日期:2010-03-01 11:19:07
19#
发表于 2010-3-19 19:17 | 只看该作者
原帖由 zxp209 于 2010-3-19 18:34 发表
别啊,刚接触sybase,还不太深入,别打击新手信心啊!



不是打击,是事实。看你自己的抵抗力和毅力了~

使用道具 举报

回复
论坛徽章:
0
20#
发表于 2010-9-21 10:48 | 只看该作者
同意,sybase的产品都未测试完成就发布了,SYBASE公司应该给我们第每个开发人员一份薪水,我们都盼着SYBASE公司倒闭呢,SYBASE因为中国的市场的特殊性(卖一套SYBASE给的回扣多),还有人民银行某些人的前瞻性,最后才是个人利益与SYBASE公司利益的共同结合,才造就的SYBASE公司的空前繁荣,只要中国市场的特殊性不改变,SYBASE还会一直发展状大。

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表