The Database Tracing Wizard can be used to create a diagnostic tracing session. The tracing session captures deadlock data.
In Sybase Central, choose Mode » Application Profiling.
If the Application Profiling Wizard appears, click Cancel.
Start the Database Tracing Wizard.
In the left pane click app_profiling - DBA, and choose File » Tracing.
On the Welcome page, click Next.
On the Tracing Detail Level page, select High Detail (Recommended For Short-Term, Intensive Monitoring) and click Next.
On the Edit Tracing Levels page, click Next.
On the Create External Database page, select Do Not Create A New Database. I Will Use An Existing Tracing Database, and then click Next.
On the Start Tracing page, select Save Tracing Data In This Database.
To place no limits on the amount of stored tracing data, select No Limit, and then click Finish.
Click Finish.
Create the deadlock.
In the left pane of Sybase Central, select the app_profiling - DBA database and choose File » Open Interactive SQL.
Interactive SQL starts and connects to the app_profiling - DBA database.
Repeat the previous step to open a second Interactive SQL window.
In one Interactive SQL window, run the following SQL statement:
CALL "DBA"."proc_deadlock1"(); |
In the second Interactive SQL window, run the following SQL statement within 20 seconds:
CALL "DBA"."proc_deadlock2"(); |
After a few moments, the ISQL Error window appears indicating that a deadlock has been detected. This is because proc_deadlock1 requires access to the deadlock2 table, which is locked by proc_deadlock2. And proc_deadlock2 requires access to the deadlock1 table, which is locked by proc_deadlock1.
Click OK.
Close both Interactive SQL windows.
To stop the tracing session, in Sybase Central select the app_profiling - DBA database and choose File » Tracing » Stop Tracing With Save.
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |