Most widely used SAP ASE Sybase commands

If you are using the SAP ASE Sybase database, then you need to know the below commonly used Sybase commands. Personally, I prefer to use the DbVisualizer tool (free version) to execute these commands. But you may execute them directly on the server using isql command.

SAP ASE Sybase command for checking the last backup | How to check the Last backup dump?

The last backup dump can be checked using the below command:

sp_dump_history
go

sp_dump_history
go

How to clear transaction logs?

To clear the transaction log, we first need to find the dump config, which is done using the below command:

Use Master
sp_config_dump
go

Use Master
Sp_config_dump
go

It provides all the available dump configs. Now, to clear the transaction logs, execute the below command:

Dump transaction <database SID> using config=’<dump config>’
go

For example:

Dump transaction XYZ using config=’XYZDB’
go

How to perform tlog backup without dumpconfig?

When the SAP ASE database gets full in certain rare situations, then you may use the below command:

dump transaction <Database SID> with no_log
go

OR

dump transaction <Database SID> with truncate_only
go

How to check the database name and size?

Using the below command, we can get all the available database names and their corresponding sizes.

sp_helpdb

sp_helpdb

If you want to check more in detail, then execute the below command. It will provide the device names of each of the databases as well as their physical location.

sp_helpdevice

How to check DB users?

Execute the below command to get all the available database users.

sp_helpuser

sp_helpuser

How to check DB parameters?

Executing the below command provides all the currently configured SAP ASE parameters. There are many parameters, so DbVisualizer provides the output in multiple tabs as shown below. These parameters can be of dynamic or static type. If you make any changes in a static parameter, the changes will get activated only after the database restart.

sp_configure

How to delete user on SAP ASE database

To drop/delete the user from the database level, execute the below command:

sp_dropuser <user id>

After executing this command, the mentioned user id will be deleted from the sysusers table.

Also check other SAP ASE-related posts: How to reset sa password on SAP ASE Sybase?

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top