The Adaptive Server Enterprise scheduler manages the processing time provided to client tasks. The scheduler allows a task to execute on a server engine using the rule:-

The following diagram illustrates management of processing time using default values for time slice (1 clock tick, 1/10th of a second) and cpu grace time (500 clock ticks, 50 seconds). The task begins execution at the end of the “free time”.
At periodic yield points, the task checks to see if the time slice has been exceeded. If it has not, the task continues executing. If it has, the task voluntarily yields the engine within the cpu grace time; if the task had not yet fulfilled the client request, the task goes to the end of the run queue. If there are no other tasks in the run queue, the server grants the task another processing interval.

It is possible for a task not to encounter a yield point and to exceed the time slice period. When this occurs, the server terminates the task with a time slice error at the end of the cpu grace time. Time slice errors are typically due to a delay in acquiring an Adaptive Server resource, a coding problem, or some other issue; for example, the Server may have made a blocking system call that does not return for a long time.

If you receive time slice errors, take these steps:-

Set up a configurable shared memory dump (CSMD) using “timeslice” as the dump condition. Information about CSMD can be found in the section “Other Useful Tasks” in the most recent version of Troubleshooting and Disaster Recovery.
Try increasing the value of the cpu grace time parameter. See “Configuration parameters” in the System Administration Guide: Volume 1 chapter “Setting Configuration Parameters.” Warning! Sybase does not recommend changing the time slice configuration parameter to resolve these errors, only the cpu grace time parameter. Changing the time slice parameter affects all tasks and changes the dynamics of Adaptive Server’s processing time management; changing the cpu grace time affects only tasks that would be terminated with a time slice error. If cpu grace time is set to 1500 and time slice errors persist, contact Sybase Technical Support.

Sometimes one table will be inserted some duplicate rows.example for:
col1 col2 col3
a b c
d e f
a b c
a b c
d e f
—————————–
I want to delete duplicate rows. And the result like:
col1 col2 col3
a b c
d e f
—————————–

How to do?

八月 30th, 2010How to find missing data?

It is often necessary to identify gaps in sequential data,like key gaps, bcp load gaps, etc.
Here is a simple table with a sequence gap (i.e. the number 4 is missing)
SELECT * FROM number
go
number
———–
1
2
3
5
6
(5 rows affected)
How to find the missing data of 4?

八月 25th, 2010about latch

Latches are nontransactional synchronization mechanisms used to guarantee the physical consistency of a page. While rows are being inserted, updated or deleted, only one Adaptive Server process can have access to the page at the same time. Otherwise, changes could overwrite each other. Latches are used for both datapages and datarows locking. They are not used for changes to tables using the allpages locking scheme.

The most important distinction between a lock and a latch is the duration:

A lock can persist for a long period of time: while a page is being scanned, for the duration of a

statement, or for the duration of a transaction.

A latch is held only for the time required to insert or move a few bytes on a data page, to

copy pointers, columns or rows, or to acquire a latch on another index page.

In datarows locking, row-level locks are acquired on individual rows on data pages. Index rows and

pages are not locked. When a row needs to be changed on a data page, a nontransactional latch

is acquired on the page. The latch is held while the physical change is made to the data page, and

then the latch is released. The lock on the data row is held until the end of the transaction. The

index rows are updated, using latches on the page, but are not locked. Index entries are implicitly locked by acquiring a lock on the data row.

八月 14th, 2010永不停止的BCP

test

环境ASE 12.5.4 WINDOWS
库名test
大小2M
表名pet_goods
dump文件test.dump
步骤:
1 建一个2M的库test,实现方法随便大家
2 load database test from ‘test.dump’
3 online database test
4 bcp test..pet_goods out pet_goods.bcp -c -Usa -Pxxxx
你会发现你的bcp一直都不会结束,直到你中断
dbcc checktable(pet_goods)
————————————–
Table Corrupt: Page linkage is not consistent; check the following pages:
(current page#=631; page# pointing to this page=678; previous page# indicated
in this page=630)
DBCC execution completed. If DBCC printed error messages, contact a user with
System Administrator (SA) role.
————————————–

三月 22nd, 2010bcp导数据进入死循环

最近碰到一件非常奇怪的事情,在为一个客户做数据恢复服务的时候,bcp往外导数据,居然bcp一直都停不下来,知道磁盘空间满。当然这个数据库的这个表肯定是出于不正常的状态,没有经过分析,结合页链pglinkage的分析,隐隐约约觉得其中页面如果进入一个死循环状态,可能会导致这个问题,这段时间打算研究一下这么一个问题

三月 22nd, 2010bcp导数据进入死循环

最近在学习项目管理,孙子兵法有两句话,在项目整体管理中出现,就是“日费千金,然后十万师举矣”,“故兵闻拙速,未睹巧之久也”。其原意应该就是打仗是很耗人力物力的,一个军队领导人或者国家领导人在做出决策之前一定要考虑好这些因素,后一句就是,用兵只听说过快速用兵,没有听说过长期持久的,当然老毛抗日战争是另外一回事,那时孙子还不知道。

一月 28th, 2010病毒公告

最近由于感染病毒,可能在qq中有些好友会收到我的消息,说是有没有淘宝账户,请大家一定不要理睬,谢谢各位,给大家造成的影响,请原谅

SQL Anywhere file data corruption usually occurs when the software application or the operating system crashes while the .MLM data file is open in memory. mlmfile In most cases, headers or parts of the data file are not saved to disk causing the data corruption or the application to fail. Other causes of corruption are physical problems with the storage media, hardware malfunctions, natural causes, viruses, software errors, and human errors.

As bad as the situation may be, there are ways to recover all or part of your data file. You should immediately make 2 or 3 backup copies of the corrupted file(s) and stop using the computer except to send the file(s) for recovery analysis. We are a team of highly specialized engineers who have been working with corrupt files for the past two decades offering free analysis of corrupt or damaged SQL Anywhere file data files with a ‘no-recovery, no-fee’ policy. Please use the instructions below to send us the corrupted db file for a free no-obligation analysis.

Full Confidentiality is guaranteed!.

十二月 14th, 2009LogDigger

 

LogDigger™ is a powerful tool for Sybase ASE serials databases, allowing administrators to easily locate changes in the database, enabling sophisticated data analyses, and providing undo capabilities to rollback logical data corruptions or user errors.

syslogs stores all operation records which modify database. Sybase does not provide tool to read and anlyse syslogs. Sometime DBA want to know what stored in the syslogs, like operate record to a table, to a transaction etc. It presents xactid,op columns when we query on syslogs table, which can’t be read. Senior dba can use dbcc log to get details, but dbcc log command is difficult to master and the result also not easy to read. So LogDigger filled the blank of syslogs translater.

LogDigger can also be leveraged for:

  • Ex post facto auditing of DML statements, the order in which transactions were committed and the user responsible for the updates.
  • Historical analysis of data access patterns for database tuning and capacity planning.

LogDigger directly accesses the Sybase redo logs, which are complete records of all activities performed on the database, and the associated data dictionary, which is used to translate internal object identifiers and types to external names and data formats. Each row contains a SQL UNDO statement, which can be used to rollback the change, and SQL REDO statement, which details the original operation. LogDigger can translate to a flat file.

Installation

       1 To use LogDigger, please install Sybase client of pre 12.5.4.

       2 Download newest version from http://www.sybedit.com, and extract to a folder.

 

How to use LogDigger

      

1、Double click on LogDigger

2、Click ConnectDB Button

 

3、Input login name, password, and ASE server name

 

then click OK button to login, click Cancel button to exit.

 

4、Please select the database to be anlysed, default db is master。默认登陆数据库为master

 

5、Click Setting button,set the option

6、Click ReadLog button

 

7、Click TranLog button,to translate syslogs

 

 

Looking to the Future

       LogDigger is developed by vs2005, dbcc log command is the point.  In the future, with more function, it will be replication server, like ase Replicator, replication server. But it’s so far to do. LogDigger can be a tool to monitor syslogs, record all the operation to a file.

       The function is simple of LogDigge, more function, more supported database version are necessary.


© 2007 sybase数据库恢复 | iKon Wordpress Theme by Windows Vista Administration | Powered by Wordpress