提供7*24专业Sybase数据库远程及现场技术支持,Sybase ASE及Sybase SQL Anywhere数据库修复服务,
请联系电话: (微信),QQ: 289965371!
We supply technical support for Sybase ASE and Sybase SQL Anywhere, also have many years of experience in recovering data from damanged Sybase devices.
Please contact us:
Phone:
Wechat: 13811580958
QQ: 289965371 联系我们获取数据库技术支持!
Email: 289965371@qq.com
扫描下方微信,联系我们:
扫描雨翰数据恢复官方微信获取专业数据库恢复服务

 

随着Sybase被完全整合到SAP下,Sybase原来的支持网站被SAP Support Portal取代。
只有购买了SAP服务的用户才能使用账号登录SAP Support Portal进行介质下载、补丁升级、报Incident等。
目前,原Sybase所有产品(包括:Adaptive Server Enterprise、Sybase IQ、Replication Server、PowerDesigner等)的官方手册仍然可以从https://infocenter.sybase.com/help/index.jsp进行浏览或下载。暂不清楚该网站https://infocenter.sybase.com/help/index.jsp何时会被完全迁移到SAP Support上!
Sybase官方手册英文版有html和pdf两种格式,而中文版手册只有pdf一种格式。为了国内Sybase用户更方便、快捷地搜索Sybase常见产品的官方手册内容,特将中文版Sybase官方手册转为html格式!
Sybase产品官方手册中文版的html格式所有内容的版权归SAP公司所有!本博客站长是Sybase数据库的铁杆粉丝!

如有Sybase数据库技术问题需要咨询,请联系我!

  QQ :289965371 联系我们获取数据库技术支持!
  Email:

以下官方手册为ASE 15.7 ESD#2中文版:

  1. 新增功能公告 适用于 Windows、Linux 和 UNIX 的 Open Server 15.7 和 SDK 15.7
  2. 新增功能摘要
  3. 新增功能指南
  4. ASE 15.7 发行公告
  5. 配置指南(windows)
  6. 安装指南(windows)
  7. 参考手册:构件块
  8. 参考手册:命令
  9. 参考手册:过程
  10. 参考手册:表
  11. Transact-SQL® 用户指南
  12. 系统管理指南,卷 1
  13. 系统管理指南,卷 2
  14. 性能和调优系列:基础知识
  15. 性能和调优系列:锁定和并发控制
  16. 性能和调优系列:监控表
  17. 性能和调优系列:物理数据库调优
  18. 性能和调优系列:查询处理和抽象计划
  19. 性能和调优系列:使用 sp_sysmon 监控 Adaptive Server
  20. 性能和调优系列:利用统计分析改进性能
  21. 程序员参考 jConnect for JDBC 7.0.7
  22. Adaptive Server Enterprise 中的 Java
  23. 组件集成服务用户指南
  24. Ribo 用户指南
  25. 内存数据库用户指南
  26. Sybase Control Center for Adaptive Server® Enterprise
  27. 安全性管理指南
  28. 实用程序指南

 


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

JDBCExamples

// An example class illustrating the use of JDBC facilities

// with the Java in Adaptive Server feature.

//

// The methods of this class perform a range of SQL operations.

// These methods can be invoked either from a Java client,

// using the main method, or from the SQL server, using

// the serverMain method.

//

import java.sql.*; // JDBC public class JDBCExamples {

{


main() 方法

// The main method, to be called from a client-side command line

//

public static void main(String args[]) { if (args.length!=2) {

System.out.println("\n Usage: "

+ "java ExternalConnect server-name:port-number action ");

System.out.println(" The action is connect, createtable, " + "createproc, drop, "

+ "insert, select, update, or call \n" ); return;

}

try{

String server = args[0];

String action = args[1].toLowerCase(); Connection con = connecter(server);

String workString = doAction( action, con, client); System.out.println("\n" + workString + "\n");

} catch (Exception e) { System.out.println("\n Exception: "); e.printStackTrace();

}

}


serverMain( ) 方法

// A JDBCExamples method equivalent to 'main',

// to be called from SQL or Java in the server


public static String serverMain(String action) { try {

Connection con = connecter("default");

String workString = doAction(action, con, server); return workString;

} catch ( Exception e ) {

if (e.getMessage().equals(null)) { return "Exc: " + e.toString();

} else {

return "Exc - " + e.getMessage();

}

}

}


connecter( ) 方法

// A JDBCExamples method to get a connection.

// It can be called from the server with argument 'default',

// or from a client, with an argument that is the server name.


public static Connection connecter(String server)

throws Exception, SQLException, ClassNotFoundException {


String forName=""; String url="";


if (server=="default") { // server connection to current server forName = "sybase.asejdbc.ASEDriver";

url = "jdbc:default:connection";

} else if (server!="default") { //client connection to server forName= "com.sybase.jdbc.SybDriver";

url = "jdbc:sybase:Tds:"+ server;

}


String user = "sa"; String password = "";


// Load the driver Class.forName(forName);

// Get a connection


Connection con = DriverManager.getConnection(url, user, password);

return con;

}


doAction( ) 方法

// A JDBCExamples method to route to the 'action' to be performed


public static String doAction(String action, Connection con, String locale)

throws Exception {


String createProcScript =

" create proc inoutproc @id int, @newname varchar(50),

@newhome Address, "

+ " @oldname varchar(50) output, @oldhome Address output as "

+ " select @oldname = name, @oldhome = home from xmp where id=@id "

+ " update xmp set name=@newname, home = @newhome where id=@id ";

String createTableScript =

" create table xmp (id int, name varchar(50), home Address)" ;


String dropTableScript = "drop table xmp "; String dropProcScript = "drop proc inoutproc ";

String insertScript = "insert into xmp "

+ "values (1, 'Joe Smith', new Address('987 Shore', '12345'))";


String workString = "Action (" + action + ) ; if (action.equals("connect")) {

workString += "performed";

} else if (action.equals("createtable")) { workString += doSQL(con, createTableScript );

} else if (action.equals("createproc")) { if (locale.equals(server)) {

throw new exception (CreateProc cannot be performed in the server);

} else {

workString += doSQL(con, createProcScript );

}

} else if (action.equals("droptable")) {


workString += doSQL(con, dropTableScript );

} else if (action.equals("dropproc")) { if (locale.equals(server)) {

throw new exception (CreateProc cannot be performed in the server);

} else {

workString += doSQL(con, dropProcScript );

}

} else if (action.equals("insert")) { workString += doSQL(con, insertScript );

} else if (action.equals("update")) { workString += updater(con);

} else if (action.equals("select")) { workString += selecter(con);

} else if (action.equals("call")) { workString += caller(con);

} else { return "Invalid action: " + action ;

}

return workString;

}


doSQL( ) 方法

// A JDBCExamples method to execute an SQL statement.


public static String doSQL (Connection con, String action) throws Exception {


Statement stmt = con.createStatement(); int res = stmt.executeUpdate(action); return "performed";

}


updater( ) 方法

// A method that updates a certain row of the 'xmp' table.

// This method illustrates prepared statements and parameter markers.


public static String updater(Connection con) throws Exception {


String sql = "update xmp set name = ?, home = ? where id = ?"; int id=1;


Address home = new Address("123 Main", "98765"); String name = "Sam Brown";

PreparedStatement pstmt = con.prepareStatement(sql); pstmt.setString(1, name);

pstmt.setObject(2, home); pstmt.setInt(3, id);

int res = pstmt.executeUpdate(); return "performed";

}


selecter( ) 方法

// A JDBCExamples method to retrieve a certain row

// of the 'xmp' table.

// This method illustrates prepared statements, parameter markers,

// and result sets.


public static String selecter(Connection con) throws Exception {


String sql = "select name, home from xmp where id=?"; int id=1;

Address home = null; String name = ""; String street = ""; String zip = "";

PreparedStatement pstmt = con.prepareStatement(sql); pstmt.setInt(1, id);

ResultSet rs = pstmt.executeQuery(); if (rs.next()) {

name = rs.getString(1);

home = (Address)rs.getObject(2); if (rs.next()) {

throw new Exception("Error: Select returned multiple rows");

} else { // No action

}

} else { throw new Exception("Error: Select returned no rows");

}

return "- Row with id=1: name("+ name + )

+ " street(" + home.street + ) zip("+ home.zip + );


caller( ) 方法

// A JDBCExamples method to call a stored procedure,

// passing input and output parameters of datatype String

// and Address.

// This method illustrates callable statements, parameter markers,

// and result sets.


public static String caller(Connection con) throws Exception {

CallableStatement cs = con.prepareCall("{call inoutproc (?, ?, ?, ?, ?)}");

int id = 1;

String newName = "Frank Farr";

Address newHome = new Address("123 Farr Lane", "87654"); cs.setInt(1, id);

cs.setString(2, newName); cs.setObject(3, newHome);

cs.registerOutParameter(4, java.sql.Types.VARCHAR); cs.registerOutParameter(5, java.sql.Types.JAVA_OBJECT); int res = cs.executeUpdate();

String oldName = cs.getString(4);

Address oldHome = (Address)cs.getObject(5);

return "- Old values of row with id=1: name("+oldName+ ) street(" + oldHome.street + ") zip("+ oldHome.zip + );

}

}




--------------------------------------华丽的分割线-------------------------------------------------------------------------

Sybase SQL Anywhere数据库恢复工具ReadASADB:

之前就已经研发成功了能够从Sybase SQL Anywhere的DB文件中恢复数据的工具: ReadASADB。
此工具支持ASA v5.0, v6.0, v7.0, v8.0, v9.0, v10.0, v11.0, v12.0, v16.0, v17.0等版本。
能够从损坏的SQL Anywhere数据文件(.db)和UltraLite数据文件(.udb)上提取数据的非常规恢复工具。
恢复Sybase SQL Anywhere的工具在国内处于领先水平。

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,16.x,17.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使用介绍

Sybase SQL Anywhere数据库恢复工具ReadASADB适用场景

各种误操作:

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

Sybase SQL Anywhere数据库恢复工具ReadASADB的应用场景:

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
7、*** ERROR *** Assertion failed: 201417 (7.0.4.3541) Invalid count or free space offset detected on a table page
8、Internal database error *** ERROR *** Assertion failed: 201425 (8.0.3.5594) Invalid count or free space offset detected on a free list page -- transaction rolled back.
9、Internal database error *** ERROR *** Assertion failed: 100702 (8.0.1.2600) Unable to modify indexes for a row referenced in rollback log -- transaction rolled back


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

Sybase ASE数据库恢复工具READSYBDEVICE:

一个不依赖数据库管理系统、直接从Sybase数据库设备文件上提取数据的业内领先的恢复工具!
能够从损坏的Sybase ASE设备文件(.dat)上提取数据的非常规恢复工具。

Sybase ASE数据库恢复工具READSYBDEVICE的主要功能:

  1. 被勒索病毒加密数据文件及备份文件情况下的恢复;
  2. 系统崩溃只剩下数据文件的情况下的恢复,甚至数据库文件不存在而只有损坏的备份文件情况下的恢复;
  3. 因断电、硬盘坏道等造成数据库文件损坏情况下的恢复;
  4. delete数据恢复、误update数据恢复、误删除表(drop)恢复、误truncate表恢复 等;
  5. 各种Sybase内部系统表损坏、索引错误的修复;
  6. master数据库损坏而无法正常运行情况下的恢复;
  7. Sybase数据库被标记为可疑,不可用等情况的恢复;
  8. Sybase数据库中数据文件内部出现坏块情况下的恢复;
  9. Sybase数据库无数据文件但有日志文件的情况下的恢复;
  10. Sybase数据库只有数据文件无任何日志文件的情况下的恢复;
  11. Sybase数据文件被误删除情况下的碎片提取恢复;
  12. 磁盘阵列上的Sybase数据库被误格式化情况下的数据库恢复;
  13. 数据库sysobjects等系统表损坏无法正常应用情况下的恢复;
  14. Sybase数据库还原数据库出现失败情况下的恢复;
  15. Sybase数据库只剩下损坏的备份文件情况下的恢复。

Sybase ASE数据库恢复工具READSYBDEVICE支持的版本:

Sybase ASE 11.0.x,11.5.x,11.9.x,12.0.x,12.5.x,15.0.x,15.5.x,15.7.x,16.0.x


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

SQL Server数据库恢复工具SQLRescue:

一个不依赖数据库管理系统、直接从SQL Server数据库文件上提取数据的业内领先的恢复工具!
能够从损坏的SQL Server数据库文件(.mdf)上提取数据的非常规恢复工具。

SQL Server数据库恢复工具SQLRescue的主要功能:

  1. 系统崩溃只剩下数据文件的情况下的恢复,即无日志文件或者日志文件损坏情况下的恢复;
  2. 断电导致数据库文件损坏情况下的恢复;
  3. 硬盘坏道造成数据库损坏情况下的恢复;
  4. 数据文件内部存在坏页情况下的恢复;
  5. 企业管理器误删除数据表记录,管理软件误删除数据表记录的恢复;
  6. 并闩锁错误、格式化、误删除后导致软件不能使用的情况;
  7. 无法读取并闩锁页sysindexes失败情况下的修复;
  8. 数据文件被误删除情况下的碎片提取恢复;
  9. 系统表损坏、索引错误、误删除数据库表、删除记录的数据找回;
  10. master数据库损坏而无法正常运行情况下的恢复;
  11. 数据文件无法附加情况下的数据恢复;
  12. 数据库被标记为可疑,质疑,不可用等情况的恢复;
  13. 数据库sysobjects等系统表损坏情况下的恢复;
  14. 数据被误(drop、delete、truncate)删除表数据的恢复,误update后的数据恢复等;
  15. 还原时报一致性错误,错误823等情况下的数据恢复,各种错误提示的数据库文件修复;
  16. 数据库被误格式化等情况下的数据库恢复;
  17. 日志收缩造成数据库损坏情况下的恢复;
  18. 仅剩损坏的备份文件情况下的恢复。

SQL Server数据库恢复工具SQLRescue技术特点:

只要SQL Server数据库的数据文件存在,我们就有办法帮您从数据文件中找回重要数据。
  1. 从数据文件中直接恢复数据
  2. 不能附加时直接恢复数据并生成新的数据库
  3. 系统表损坏的数据库修复
  4. 快速修复SQL 823错误、连接中断错误

SQL Server数据库恢复工具SQLRescue支持的版本:

Microsoft SQL Server 7.0, 2000, 2005, 2008, 2008R2, 2012, 2014, 2016, 2017,2019。
+-------------------------------------华丽的分割线-------------------------------------------------------------------------