楼主: ccwlm741212

[精华] SYBASE常见问题收集整理(希望大家一起不断更新)

[复制链接]
求职 : 系统分析师
论坛徽章:
691
博彩大赢家
日期:2014-07-14 11:41:47博彩大赢家
日期:2015-09-24 12:11:05菠菜神灯
日期:2016-04-18 13:59:20NBA季后赛大富翁
日期:2016-04-27 11:51:10NBA季后赛大富翁
日期:2016-06-24 10:29:08芝加哥公牛
日期:2015-06-25 09:32:08芝加哥公牛
日期:2016-04-18 14:22:33芝加哥公牛
日期:2016-10-27 14:28:54芝加哥公牛
日期:2016-12-27 14:16:24芝加哥公牛
日期:2017-04-18 17:07:58
21#
 楼主| 发表于 2004-1-17 15:16 | 只看该作者
Transact - SQL命令介绍

sqlref.zip

1.74 MB, 下载次数: 1088

使用道具 举报

回复
求职 : 系统分析师
论坛徽章:
691
博彩大赢家
日期:2014-07-14 11:41:47博彩大赢家
日期:2015-09-24 12:11:05菠菜神灯
日期:2016-04-18 13:59:20NBA季后赛大富翁
日期:2016-04-27 11:51:10NBA季后赛大富翁
日期:2016-06-24 10:29:08芝加哥公牛
日期:2015-06-25 09:32:08芝加哥公牛
日期:2016-04-18 14:22:33芝加哥公牛
日期:2016-10-27 14:28:54芝加哥公牛
日期:2016-12-27 14:16:24芝加哥公牛
日期:2017-04-18 17:07:58
22#
 楼主| 发表于 2004-1-17 15:27 | 只看该作者
JAVA技术在Adaptive Server Enterprise 12.5中的应用技术白皮书-1

java-ase12.5.part1.rar

1.39 MB, 下载次数: 475

使用道具 举报

回复
求职 : 系统分析师
论坛徽章:
691
博彩大赢家
日期:2014-07-14 11:41:47博彩大赢家
日期:2015-09-24 12:11:05菠菜神灯
日期:2016-04-18 13:59:20NBA季后赛大富翁
日期:2016-04-27 11:51:10NBA季后赛大富翁
日期:2016-06-24 10:29:08芝加哥公牛
日期:2015-06-25 09:32:08芝加哥公牛
日期:2016-04-18 14:22:33芝加哥公牛
日期:2016-10-27 14:28:54芝加哥公牛
日期:2016-12-27 14:16:24芝加哥公牛
日期:2017-04-18 17:07:58
23#
 楼主| 发表于 2004-1-17 15:29 | 只看该作者
JAVA技术在Adaptive Server Enterprise 12.5中的应用技术白皮书 -2

java-ase12.5.part2.rar

1.39 MB, 下载次数: 420

使用道具 举报

回复
求职 : 系统分析师
论坛徽章:
691
博彩大赢家
日期:2014-07-14 11:41:47博彩大赢家
日期:2015-09-24 12:11:05菠菜神灯
日期:2016-04-18 13:59:20NBA季后赛大富翁
日期:2016-04-27 11:51:10NBA季后赛大富翁
日期:2016-06-24 10:29:08芝加哥公牛
日期:2015-06-25 09:32:08芝加哥公牛
日期:2016-04-18 14:22:33芝加哥公牛
日期:2016-10-27 14:28:54芝加哥公牛
日期:2016-12-27 14:16:24芝加哥公牛
日期:2017-04-18 17:07:58
24#
 楼主| 发表于 2004-1-17 15:30 | 只看该作者
JAVA技术在Adaptive Server Enterprise 12.5中的应用技术白皮书 -3

java-ase12.5.part3.rar

986.37 KB, 下载次数: 400

使用道具 举报

回复
论坛徽章:
22
授权会员
日期:2005-10-30 17:05:332012新春纪念徽章
日期:2012-02-13 15:11:362012新春纪念徽章
日期:2012-02-13 15:11:362012新春纪念徽章
日期:2012-02-13 15:11:362012新春纪念徽章
日期:2012-02-13 15:11:36马上有车
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:142012新春纪念徽章
日期:2012-02-13 15:11:36
25#
发表于 2004-1-20 10:47 | 只看该作者
支持

使用道具 举报

回复
招聘 : 数据库管理员
论坛徽章:
66
ITPUB元老
日期:2005-07-16 18:49:11授权会员
日期:2005-10-30 17:05:33ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44现任管理团队成员
日期:2011-05-07 01:45:08版主3段
日期:2012-05-15 15:24:11
26#
发表于 2004-1-26 19:04 | 只看该作者
支持

使用道具 举报

回复
求职 : 系统分析师
论坛徽章:
691
博彩大赢家
日期:2014-07-14 11:41:47博彩大赢家
日期:2015-09-24 12:11:05菠菜神灯
日期:2016-04-18 13:59:20NBA季后赛大富翁
日期:2016-04-27 11:51:10NBA季后赛大富翁
日期:2016-06-24 10:29:08芝加哥公牛
日期:2015-06-25 09:32:08芝加哥公牛
日期:2016-04-18 14:22:33芝加哥公牛
日期:2016-10-27 14:28:54芝加哥公牛
日期:2016-12-27 14:16:24芝加哥公牛
日期:2017-04-18 17:07:58
27#
 楼主| 发表于 2004-1-29 11:04 | 只看该作者
2位兄弟早啊

使用道具 举报

回复
求职 : 系统分析师
论坛徽章:
691
博彩大赢家
日期:2014-07-14 11:41:47博彩大赢家
日期:2015-09-24 12:11:05菠菜神灯
日期:2016-04-18 13:59:20NBA季后赛大富翁
日期:2016-04-27 11:51:10NBA季后赛大富翁
日期:2016-06-24 10:29:08芝加哥公牛
日期:2015-06-25 09:32:08芝加哥公牛
日期:2016-04-18 14:22:33芝加哥公牛
日期:2016-10-27 14:28:54芝加哥公牛
日期:2016-12-27 14:16:24芝加哥公牛
日期:2017-04-18 17:07:58
28#
 楼主| 发表于 2004-1-29 11:08 | 只看该作者
[转贴]SYBASE dbccdb的安装配置攻略(陈苏文)
http://www.chinaunix.net 作者:jazy 发表于:2003-01-16 21:42:24

dbcc checkstorage 检查数据库的一致性。在新版本的数据库中用处比任何一个DBCC命令都大,尤其在数据库备份前。这篇文章的用意是帮助你:
Ø 掌握dbcc checkstorage命令
Ø 维护dbccdb数据库
Ø 根据dbccdb生成报告

  本文使用的案例中,你将首先由sp_plan_dbccdb的输出得到运行dbcc checkstorage命令所需资源环境,并在此基础上规划资源,建立dbccdb数据库,最终根据dbccdb数据库生成报告。

本节练习将基于如下环境:

Ø 系统中存在用户数据库aca_db,容量为20MB(数据10MB、日志10MB)
Ø aca_db数据库占用disk1和disk2两个设备
Ø aca_db数据库中有若干个用户表(auths,article等)

步骤如下:

1、为目标数据库获取有关数据库大小、设备工作空间的大小,高速缓存大小和工作进程数的建议。

sp_plan_dbccdb aca_db

执行结果为:

Recommended size for dbccdb database is 15MB (data = 13MB, log = 2MB).
No suitable devices for dbccdb in master..sysdevices.
Recommended values for workspace size, cache size and process count are:
dbname scan ws text ws cache process count
aca_db 272K 80K 1280K 2
(return status = 0)

2、如果必要,调整Adaptive Server的工作进程数

3、 为dbcc创建命名高速缓存

  配置一个dbcc checkstorage专用的命名高速缓存,不仅可以提高性能并且还可以使数据库的一致性检查对其他用户的影响降到最小。

  Dbcc checkstorage要求在命名高速缓存的16k内存池中为每个工作进程准备至少640k的存储空间,16k内存池的最小容量为推荐的高速缓存容量。

  Sp_cacheconfig aca_cache,”3072k”

(注意:重新启动Adaptive Server才起作用)

4、配置16k的I/O缓存池

sp_poolconfig aca_cache,”2048”,”16k”
使用sp_poolconfig aca_cache命令查看命名高速缓存,结果如下
Cache Name Status Type Config value Run value
---------- ------ ---- ------------ ---------
aca_cache Active Mixed 3.00 Mb 3.00 Mb
IO Size Wash Size Config Size Run Size APF Percent
------- --------- ----------- -------- -----------
2 Kb 204 Kb 0.00 Mb 1.00 Mb 10
16 Kb 400 Kb 2.00 Mb 2.00 Mb 10


4、 如果dbccdb存在,则在创建新的dbccdb数据库之前,删除它及其相关的所有设备

use master
go
if exists (select * from master.dbo.sysdatabases
where name = "dbccdb"
begin
print "+++ Dropping the dbccdb database"
drop database dbccdb
end
go

5、 初始化用于dbccdb数据和日志的磁盘设备

disk init
name="dbccdb_dat",
physname="d:\sybase\example\dbccdata.dat",
vdevno=6,
size=7680
disk init
name="dbccdb_log",
physname="d:\sybase\example\dbcclog.dat",
vdevno=7,
size=1024

6、 在数据库设备上创建dbccdb数据库

create database dbccdb
on dbcc_dat=13
log on dbccdb_log=2

7、 添加磁盘段

use dbccdb
sp_addsegment scanseg,dbccdb,dbccdb_dat
sp_addsegment textseg,dbccdb,dbccdb_dat

8、 填充dbcc数据库并安装dbcc存储过程

执行installdbccdb脚本为dbccdb创建表并初始化dbcc-type表

isql -Usa –P -S -Iiinstalldbccdb

9、 建立和初始化scan和text空间

sp_dbcc_createws dbccdb,scanseg,scan_aca,scan,"272k"
sp_dbcc_createws dbccdb,textseg,text_aca,text,"80k"
10、 更新dbcc_config配置值
use dbccdb
sp_dbcc_updateconfig aca_db,"max worker processes","2"
sp_dbcc_updateconfig aca_db,"dbcc named cache",aca_cache,"3072"
sp_dbcc_updateconfig aca_db,"scan workspace",scan_aca
sp_dbcc_updateconfig aca_db,"text workspace",text_aca
sp_dbcc_updateconfig aca_db,"OAM count threshold","5"
sp_dbcc_updateconfig aca_db,"IO error abort","3"
sp_dbcc_updateconfig aca_db,"linkage error abort","8"

11、检查aca_db数据库

dbcc checkstorage(aca_db)

执行结果为:

Checking aca_db Server Message: Number 9954, Severity 10
Line 1:
Storage checks for 'aca_db' are complete. DBCC is now recording the results in the dbccdb database.
Server Message: Number 9974, Severity 10
Line 1:
DBCC CHECKSTORAGE for database 'aca_db' sequence 1 completed at May 30 2000 10:01AM. 0 faults and 0 suspect conditions were located. 0 checks were aborted. You should investigate the recorded faults, and plan a course of action that will correct them.

11、 dbccdb生成报告

Ø sp_dbcc_summaryreport在指定的日期或该日期之前为指定的数据库完成的所有dbcc checkstorage操作

示例:

sp_dbcc_summaryreport

DBCC Operation : checkstorage
(1 row affected)
(return status = 0)
Database Name Start time End Time Operation ID Hard Faults Soft Faults Text Columns Abort Count User Name
------------- ---------- -------- ------------ ----------- ----------- ------------ ----------- ---------aca_db 05/30/2000 10:01:36 10:1:50:503 1 0 0 0 0 sa
Ø sp_dbcc_configreport为目标数据库生成配置信息的报告。

示例:

sp_dbcc_configreport

Reporting configuration information of database aca_db.
Parameter Name value Size
database name aca_db 20480K
dbcc named cache aca_cache 3072K
text workspace text_aca (id = 544004969) 80K
scan workspace scan_aca (id = 512004855) 272K
OAM count threshold 5%
IO error abort 3
linkage error abort 8
max worker processes 2
operation sequence number 1
(1 row affected)
(return status = 0)
Ø sp_dbcc_statisticsreport产生从dbcc_counter表中得到的统计信息

示例:

sp_dbcc_statisticsreport "aca_db","auths"

结果:

Parameter Name Index Id value
-------------- -------- -----
count 0 20.0
max size 0 88.0
max count 0 20.0
bytes data 0 1321.0
bytes used 0 1599.0
count 1 1.0
max count 1 1.0
max level 1 0.0
max size 1 11.0
bytes data 1 6.0
bytes used 1 43.0
count 255 0.0
max size 255 0.0
max count 255 0.0
bytes data 255 0.0
bytes used 255 0.0
Parameter Name Index Id Partition value Dev_name
-------------- -------- --------- ----- --------
page gaps 0 1 1.0 disk1
pages used 0 1 2.0 disk1
extents used 0 1 1.0 disk1
overflow pages 0 1 0.0 disk1
pages overhead 0 1 1.0 disk1
pages reserved 0 1 6.0 disk1
page extent gaps 0 1 0.0 disk1
ws buffer crosses 0 1 0.0 disk1
page extent crosses 0 1 0.0 disk1
page gaps 1 1 1.0 disk1
pages used 1 1 2.0 disk1
extents used 1 1 1.0 disk1
overflow pages 1 1 0.0 disk1
pages overhead 1 1 1.0 disk1
pages reserved 1 1 6.0 disk1
page extent gaps 1 1 0.0 disk1
ws buffer crosses 1 1 0.0 disk1
page extent crosses 1 1 0.0 disk1
page gaps 255 1 1.0 disk1
pages used 255 1 2.0 disk1
extents used 255 1 1.0 disk1
overflow pages 255 1 0.0 disk1
pages overhead 255 1 1.0 disk1
pages reserved 255 1 6.0 disk1
page extent gaps 255 1 0.0 disk1
ws buffer crosses 255 1 0.0 disk1
page extent crosses 255 1 0.0 disk1
Ø sp_dbcc_faultreport报告指定的数据库对象中发现的在指定日期或该日期之前发生的故障。可以生成短报告,也可以生成长报告。

示例:

sp_dbcc_faultreport 'short'
sp_dbcc_faultreport 'long'



****************************************************
dbcc checkstorage
产生的结果存放在dbccdb数据库的表里,如果你不delete history,它会一直保存的
dbcc checkdb,dbcc checkalloc,...
你只有定向输出到文件里
如果你在dbcc checkstorage 时,还有对数据库操作,结果会有歧义的
我现在backup前,只对关键的表作dbcc checktable,dbcc tablealloc等
我建议有条件的话,建立一个和生产机一样的数据库,将dump的数据库load到哪里,做
dbcc checkstorage,如果发现错误,修正后,再load回生产机
我现在就这么干
(freebob)
****************************************************
dbcc checkstorage 命令的执行速度最快,检查最全面,而且只产生共享锁,应该是最好的选择
(chuxu
****************************************************
我前面配置都差不多,但执行到这里,怎么报错了?
1> dbcc checkstorage(wxjj)
2> go
Checking wxjj: Logical pagesize is 2048 bytes
Msg 9961, Level 17, State 6:
Server 'wxjj', Line 1:
DBCC failed to connect to the requested number of worker processes. The number
of workers configured is insufficient, or the number of workers exceeds 128. Use
sp_dbcc_updateconfig to reduce 'max worker processes' for this database.
Msg 9960, Level 20, State 1:
Server 'wxjj', Line 1:
A non-recoverable error has occurred in the CHECKSTORAGE operation. The
operation has been aborted.
DBCC CHECKSTORAGE for database 'wxjj' encountered an error. Some results may not
be available. Correct the problems reported and reexecute the CHECKSTORAGE
command.

(bigbug99
*****************************************************
很明显,你们的worker processes 不足!
(jazy)

*****************************************************

I performed all commands needed for creating dbccdb for pubs2.
Why do I have the following error message?
I used "sp_dbcc_evaluatedb" to check and every thing seemed to be ok.
1> dbcc checkstorage (pubs2)
2> go
Checking pubs2
Msg 9961, Level 17, State 3:
Line 1:
DBCC failed to connect to the requested number of worker processes. The number of workers configured is insufficient, or the number of workers exceeds 128. Use sp_dbcc_updateconfig to reduce 'max worker processes' for this database.
Msg 9960, Level 20, State 1:
Line 1:
A non-recoverable error has occurred in the CHECKSTORAGE operation. The operation has been aborted.
DBCC CHECKSTORAGE for database 'pubs2' encountered an error. Some results may not be available. Correct the problems reported and reexecute the CHECKSTORAGE command.
1>
2> reset
1> sp_dbcc_evaluatedb
2> go
Recommended values for workspace size, cache size and process count are:

Database name : pubs2
current scan workspace size : 64K suggested scan workspace size : 64K
current text workspace size : 48K suggested text workspace size : 48K
current cache size : 640K suggested cache size : 640K
current process count : 1 suggested process count : 1


(return status = 0)
1>

(jimhongchen)
*****************************************************
我执行第一步结果如下,哪位大虾帮我搞个好的DBCC方案出来?多谢
1> sp_plan_dbccdb wxjj
2> go
Recommended size for dbccdb database is 38MB (data = 36MB, log = 2MB).

No suitable devices for dbccdb in master..sysdevices.

Recommended values for workspace size, cache size and process count are:

dbname scan ws text ws cache process count


wxjj 18448K 4624K 4615K 2

(return status = 0)
(bigbug99
*****************************************************
Jazy, thank you.
I solved my problem after your hint.
bigbug99, you can use following command to increase the number of worker process.
1> sp_configure "number of worker processes", 1
2> go
Parameter Name Default Memory Used Config value Run value
------------------------------ ----------- ----------- ------------ -----------
number of worker processes 0 176 1 1

(1 row affected)
Configuration option changed. Since the option is static, Adaptive Server must be rebooted in order for the change to take effect.
(return status = 0)
1>

使用道具 举报

回复
论坛徽章:
5
授权会员
日期:2005-10-30 17:05:33会员2007贡献徽章
日期:2007-09-26 18:42:10ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:442010新春纪念徽章
日期:2010-03-01 11:20:042010年世界杯参赛球队:喀麦隆
日期:2010-03-02 15:39:06
29#
发表于 2004-2-5 21:54 | 只看该作者
我的系统重装了后,以前安装的PD9.5打开正常,但是要加载文件时就出错了。
不重新安装可不可以使用。

使用道具 举报

回复
论坛徽章:
0
30#
发表于 2004-2-8 10:38 | 只看该作者
支持你,  ccwlm741212 !

使用道具 举报

回复

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

本版积分规则 发表回复

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