随着Sybase被完全整合到SAP下,Sybase原来的支持网站被SAP Support Portal取代。
只有购买了SAP服务的用户才能使用账号登录SAP Support Portal进行介质下载、补丁升级、报Incident等。
目前,原Sybase所有产品(包括:Adaptive Server Enterprise、Sybase IQ、Replication Server、PowerDesigner等)的官方手册仍然可以从http://infocenter.sybase.com/help/index.jsp进行浏览或下载。暂不清楚该网站http://infocenter.sybase.com/help/index.jsp何时会被完全迁移到SAP Support上!
Sybase官方手册英文版有html和pdf两种格式,而中文版手册只有pdf一种格式。为了国内Sybase用户更方便、快捷地搜索Sybase常见产品的官方手册内容,特将中文版Sybase官方手册转为html格式!
Sybase产品官方手册中文版的html格式所有内容的版权归SAP公司所有!本博客站长是Sybase数据库的铁杆粉丝!
如有Sybase数据库技术问题需要咨询,请联系我!
以下官方手册为SAP IQ 16.0 SP03中文版:
sp_iqindexmetadata 过程
显示给定索引的索引元数据。
您可以选择将输出限制为仅输出某个指定表的索引,或仅输出属于某个指定所有者的 索引。
语法
dbo.sp_iqindexmetadata ( index-name
[ , table-name [ , owner-name ] ] )
特权
您必须具有系统过程的 EXECUTE 特权。 必须具有以下一种:
• ALTER ANY INDEX 系统特权
• ALTER ANY OBJECT 系统特权
• 对表的 REFERENCES 特权
• 您拥有该表
注释 指定一个表名可将输出限制为仅输出属于该表的索引。指定一个所有者名可将输入限 制为仅输出属于该所有者的索引。省略的参数缺省为 NULL。每个过程只能指定一个 索引。
可以通过 sp_iqindexmetadata 获得列的用户供应商 IQ UNIQUE 值。如果存在唯一的 HG 或 LF 索引,它会报告精确的基数。如果(只)存在不唯一的 HG 索引,则报告基数为 0。
输出的第一行为索引的所有者名、表名和索引名。 输出的后续行具体取决于所指定的索引类型。
表 87. sp_iqindexmetadata 输出行
索引类型 |
返回的元数据 |
CMP, DATE, DTTM, TIME |
Type,Version |
FP |
Type、Style、Version、DBType、Maximum Width、EstUnique、 TokenCount、NBit、CountSize、DictSize、CountLen、MaxKeyToken、 MinKey Token、MinCount、MaxCount、DistinctKey、IQ Unique |
HG |
Type、Version、Maintains Exact Distinct、Level 0 Threshold、Force Physical Delete、Maximum Level Count、Tier ratio、Auto sizing、Average Load Size (records)、Active Subindex count、Cardinality Range Min - Max、Estimated Cardinality、Accuracy of Cardinality |
HNG |
Type,Version,BitsPerBlockmap,NumberOfBits |
LF |
Type,Version,IndexStatus,NumberOfBlockmaps,BitsPerBlockmap, Distinct Keys |
WD |
Type,Version,KeySize,Delimiters,DelimiterCount, MaxKeyWordLength,PermitEmptyWord |
示例
值 1 |
值 2 |
值 3 |
DBA |
test2 |
test2_c1_hg |
类型 |
HG |
|
Version |
3 |
|
Maintains Exact Distinct |
否 |
|
Level 0 Threshold |
3000000 |
|
Force Physical Delete |
是 |
|
Maximum Level Count |
10 |
|
Tier ratio |
30 |
值 1 |
值 2 |
值 3 |
Auto sizing |
On |
|
Avarage Load Size (records) |
58622 |
|
Active Subindex count |
3 |
|
Cardinality Range Min - Max |
5-5 |
|
Estimated Cardinality |
5 |
|
Accuracy of Cardinality |
100 |
|
Level:0 Main Index Total Row Count |
1 |
|
Level:0 Main Index Deleted Row Count |
0 |
|
Level:0 Main Index # of Btree Pages in Main btree |
1 |
|
Level:0 Main Index # of GArray Pages |
1 |
|
Level:0 Main Index # of Keys in Main Btree |
1 |
|
Level:0 Main Index # of Keys Probed in Btree |
0 |
|
Level:0 Main Index # of Keys Found Duplicate in Btree |
0 |
|
Level:0 Main Index # of Keys Possible Distinct in Btree |
0 |
|
Level:1 Main Index Total Row Count |
3145747 |
|
Level:1 Main Index Deleted Row Count |
0 |
|
Level:1 Main Index # of Btree Pages in Main btree |
1 |
|
Level:1 Main Index # of Btree Pages in Conjugate btree |
1 |
|
Level:1 Main Index # of GArray Pages |
2 |
|
Level:1 Main Index # of Keys in Main Btree |
8 |
|
Level:1 Main Index # of Keys in Conjugate Btree |
3 |
|
Level:1 Main Index # rows in Conjugate Btree |
2949127 |
|
Level:1 Main Index # of Keys Probed in Btree |
0 |
|
Level:1 Main Index # of Keys Found Duplicate in Btree |
0 |
|
Level:1 Main Index # of Keys Possible Distinct in Btree |
0 |
|
Level:1 Incremental Index Total Row Count |
1 |
|
Level:1 Incremental Index Deleted Row Count |
0 |
值 1 |
值 2 |
值 3 |
Level:1 Incremental Index # of Btree Pages |
1 |
|
Level:1 Incremental Index # of GArray Pages |
1 |
|
Level:1 Incremental Index #of Keys in Btree |
1 |
|
Level:1 Incremental Index # of Keys Probed in Btree |
0 |
|
Level:1 Incremental Index # of Keys Found Duplicate in Btree |
0 |
|
Level:1 Incremental Index # of Keys Possible Distinct in Btree |
0 |
另请参见
• sp_iqindexfragmentation 过程 (第 452 页)
• sp_iqindexinfo 过程 (第 453 页)
• sp_iqindexsize 过程 (第 459 页)
• 确定数据库所使用的安全模型 (第 381 页)
之前就已经研发成功了能够从Sybase SQL Anywhere的DB文件中恢复数据的工具:ReadASADB。
此工具支持ASA v5.0,v6.0,v7.0,v8.0,v9.0,v10.0,v11.0,v12.0等版本。
恢复Sybase SQL Anywhere的工具在国内应该算首创。
ReadASADB功能
能够从损坏的SQL Anywhere数据文件(.db)和UltraLite数据文件(.udb)上提取数据的非常规恢复工具
- 适用于所有的SQL Anywhere版本 包括:5.x,6.x,7.x,8.x,9.x,10.x,11.x,12.x
- 适用于所有的UltraLite版本
- 能够恢复出来表结构和数据
- 能够恢复自定义数据类型
- 能够恢复存储过程等对象的语法
- 能够导出到目标数据库
- 能够导出到SQL文件并生成导入脚本
- 支持多种字符集 包括:cp850、cp936、gb18030、utf8等
- 能够恢复未加密或者简单加密类型的数据
- 简单易用
- 限制:不支持AES加密的数据文件
SQL Anywhere数据库非常规恢复工具ReadASADB使用介绍
ReadASADB适用场景
各种误操作:
- 误截断表(truncate table)
- 误删除表(drop table)
- 错误的where条件误删数据
- 误删除db或log文件
- 误删除表中的字段
本工具的应用场景:
1.因为物理磁盘故障、操作系统、系统软件方面或者掉电等等原因导致的Sybase SQL Anywhere数据库无法打开的情况;
2.误操作,包括truncate table,drop table,不正确的where条件导致的误删除等;
Sybase SQL Anywhere无法打开时,比较常见的错误是:Assertion failed。
如:
1、Internal database error *** ERROR *** Assertion failed:201819 (8.0.1.2600) Checkpoint log: invalid bitmap page -- transaction rolled back
2、Internal database error *** ERROR *** Assertion failed:201819 (8.0.1.2600) Page number on page does not match page requested -- transaction rolled back
3、Internal database error *** ERROR *** Assertion failed:200502 (9.0.2.2451) Checksum failure on page 23 -- transaction rolled back
4、File is shorter than expected
5、Internal database error *** ERROR *** Assertion failed: 201116 Invalid free list index page found while processing checkpoint log -- transaction rolled back
6、*** ERROR *** Assertion failed: 51901 Page for requested record not a table page or record not present on page等等。
+-------------------------------------华丽的分割线-------------------------------------------------------------------------