This is an actual problem encountered at work. At that time, Sybase's log space was always full and could not be cleared. We had to restart the Sybase service.
After observation, it is found that there is always a process that occupies log space for a long time and cannot be released. You can only kill the process to find the client where the process is.
Program To obtain the SQL statement that the process is executing.
Using the returned SQL statement, the faulty program is located to solve a major bug.
Step 1: Open Sybase Central In the left-side view, double-click the database server name, and then double-click " Login " Folder, select " Add Logon " . Create " Login " , Enter the Login Name: TS , Set the password, and then click Next until the process is complete.
Step 2: Right-click the newly created login name and select"Attribute".
Step 3: select " Role " Page, click " Add role " Button.
Step 4: selectSa_roleAndSybase_ts_roleTwo roles (Press and holdCTRLClick OK to save the settings.
Step 5: OpenSQL advantage.
Step 6: Enter the statementSelect * From syslogsholdIf a record is returned, remember the third field (Spid.
Step 7: EnterSQLStatement:
DBCC traceon (3604)
DBCC sqltext (The value of the Third Field in the previous step.)
Run,The output result is the SQL statement that the process is executing..
Step 8: ExecuteSQLStatement:DBCC traceoff (3604)