Stop Sybase ASE – Linux

If you want to shutdown backup server also, make sure too shut it down first, as you will not be able to login to isql if you shutdown main server first.

Login to isql to shudown the ASE database and issue command “shutdown”

shutdownbak

Then you can shutdown the ASE database instance.

shutdown

You can opt to kill the processes (For example: If you dont have password to login to isql). But this is not the most safer way. Please use this option only if you are not able to login to isql.

killase

Dont use -9 option. This might not allow uncommited DB transactions to rool back in a proper way.

 

Advertisements

Starting Sybase ASE Database (Linux)

Make sure you are logged in with user syb<sid>.

From the environment variables find you Sybase ASE install Directory:

path

Travesrse to the install path:

change dir

Here you see the configuration files (Runserver) RUN_<SID> (Database server) and RUN_<SID>_BS (Backup server).

Use command startserver to start each server process.

You can either start them individually or together.

  • -f runserverfile – specifies the relative path name of a runserver file, which is used as a reference each time you start an SAP ASE server or Backup Server. By default, the runserver file is in the current directory and is named RUN_servername. If you start a second SAP ASE server on the same machine, startserver creates a new runserver file named RUN_servername.
  • -m – starts an SAP ASE server in single-user mode, allowing only one system administrator to log in, and turns the allow updates to system tables configuration parameter on. Use this mode to restore the master database. The system administrator can use thedbo use only parameter of sp_dboption for system administration activities that require more than one process, such as bulk copying or using the data dictionary. startserver normally starts up only one server per node.The -m parameter creates an m_RUNSERVER file and overwrites any existing m_RUNSERVER file.

start

After both the processes are started the control is not returned back until you hit a key.

end of start

Now you can check the status of server using command showserver.

showserver

How to analyze saptools database growth in Sybase ASE database and contain it

SAPTOOLS database mainly contains the monitoring data for Sybase ASE database.

You can decide the duration this data can be retained by configuring the collector parameters in DBACOCKPIT.

saptools1

Ensure that the message level is set to error. If not this may significantly increase the growth of this database.

If the history of monitoring is not required anymore, you can also delete the data and log using the prune option.

ase2

The retention policy can be set individually by selecting each data collector and changing the “Days Kept In History” parameter.

ase3

Below are some SAP Notes related to SAPTOOLS database:

2100175 – SYB: Increased space allocation of data collectors ‘Tables’ and ‘Indexes’

1927012 – DBA Cockpit shows warnings “Required data collector xxx is not set up properly” – SAP ASE for Business Suite

1615695 – SYB: ‘saptools’ database running out of space

1687320 – SYB: ‘saptools’ database running out of space (2)

2006899 – How to configure reorg on saptools database in DBA Cockpit – SAP ASE for Business Suite

 

 

Scheduling failed on Sybase ASE

Error in DB13 while running SAP on Sybase database – “Scheduling Failed”.

scheduling failed

These errors are intermittent and not reproducible.

Below I outline some steps to troubleshoot this issue:

Check for errors in log files (<SID>, <SID>_BS, <SID>_JSAGENT> under installation directory:

Ex: “D\:sybase\<SID>\ASE-15_0\install.

If you cannot read these files (Because it is in use), copy it to another directory .

Try to dump the transaction log using below command:

dump transaction <SID> to “<Dump Directory>”.

If you are able to successfully dump or truncate the log file, then try to delete the further schedules and try to reschedule the backup again from DB13.

schedule again

If you are not able to dump or truncate the transaction log , database might be in a standstill (Root cause explained at the end).

In that case, stop SAP and restart the DB services (SQL Server and Backup Server).

services

In our case, we found following errors in the <SID> log file when the issue happened.

Error: 8213, Severity: 20, State: 3
server Failed to acquire address lock on object DDLOG

Note: There were no Dump DATABASE or Create INDEX were running on the database during that time.

This is caused by a bug in the ASE database as explained in the SAP Note 2337582.

Database had to be updated to one of the release mentioned in the note to resolve the issue.

 

 

 

Extending the database space on Sybase ASE

You notice in DBACOCKPIT that you are running out of space on your data/log files of Sybase ASE database.

Below procedure explains the procedure to extend the space on the data/log volume.

Login to dbsql using SA or SAPSA user:

In Sybase data and log files are organize in the form of Devices. Search for the device you should be extending first before allocating the space the data or log file using below command:

use master

sp_helpdb <DBID>

go

Ex:   sp_helpdb ERP

In the Result Set 2, you can find the related devices.

find_device

Next find the device location using the below command:

use master

sp_helpdevice <data_file_device/log_file_device>

go

device_name

Now resize the device using the below command:

use master

disk resize

name = “<device_name>”,

size = “<size>”

go 

Now assign the extended device to the database:

For data files:

user master

alter database <DBSID> on <device_name> = <Size>

go

For log file:

use master

alter database <DBSID> log on <device_name> = <Size>

go