远程Sybase数据库技术支持,联系手机:13811580958,QQ:289965371!

 

随着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数据库技术问题需要咨询,请联系我!

  QQ :289965371 点击这里给我发消息
  Email:

以下官方手册为SAP IQ 16.0 SP03中文版:

  1. SAP Sybase IQ 简介
  2. 新功能摘要
  3. IQ 发行公告(linux)
  4. IQ 快速入门(unix)
  5. 安装和配置指南(linux)
  6. 管理:备份、恢复和数据恢复
  7. 管理:数据库
  8. SAP Sybase IQ 错误消息
  9. 管理:全球化
  10. IQ 许可选项指南
  11. 管理:装载管理
  12. IQ 迁移
  13. 管理:Multiplex
  14. 性能和调优指南
  15. IQ 编程
  16. 参考:构件块、表和过程
  17. 参考:语句和选项
  18. 管理:内存行级版本控制
  19. 管理:空间数据
  20. IQ 非结构化数据分析
  21. 用户定义的函数
  22. 管理:用户管理和安全
  23. 实用程序指南

 


< 上一个 | 内容 | 下一步 >

sp_iqindexmetadata 过程

显示给定索引的索引元数据。

您可以选择将输出限制为仅输出某个指定表的索引,或仅输出属于某个指定所有者的 索引。


语法

image

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

TypeVersion

FP

TypeStyleVersionDBTypeMaximum WidthEstUniqueTokenCountNBitCountSizeDictSizeCountLenMaxKeyTokenMinKey TokenMinCountMaxCountDistinctKeyIQ Unique

HG

TypeVersionMaintains Exact DistinctLevel 0 ThresholdForce Physical DeleteMaximum Level CountTier ratioAuto sizingAverage Load Size (records)Active Subindex countCardinality Range Min - MaxEstimated CardinalityAccuracy of Cardinality

HNG

TypeVersionBitsPerBlockmapNumberOfBits

LF

TypeVersionIndexStatusNumberOfBlockmapsBitsPerBlockmapDistinct Keys

WD

TypeVersionKeySizeDelimitersDelimiterCountMaxKeyWordLengthPermitEmptyWord


示例

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)上提取数据的非常规恢复工具

  1. 适用于所有的SQL Anywhere版本    包括:5.x,6.x,7.x,8.x,9.x,10.x,11.x,12.x
  2. 适用于所有的UltraLite版本
  3. 能够恢复出来表结构和数据
  4. 能够恢复自定义数据类型
  5. 能够恢复存储过程等对象的语法
  6. 能够导出到目标数据库
  7. 能够导出到SQL文件并生成导入脚本
  8. 支持多种字符集  包括:cp850、cp936、gb18030、utf8等
  9. 能够恢复未加密或者简单加密类型的数据
  10. 简单易用
  11. 限制:不支持AES加密的数据文件
请参考:研发成功了从Sybase SQL Anywhere的DB文件上恢复数据的工具
            SQL Anywhere数据库非常规恢复工具ReadASADB使用介绍

ReadASADB适用场景

各种误操作:

  1. 误截断表(truncate table)
  2. 误删除表(drop table)
  3. 错误的where条件误删数据
  4. 误删除db或log文件
  5. 误删除表中的字段

本工具的应用场景:

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等等。
+-------------------------------------华丽的分割线-------------------------------------------------------------------------