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:
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:
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>’
Dump transaction XYZ using config=’XYZDB’
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
dump transaction <Database SID> with truncate_only
How to check the database name and size?
Using the below command, we can get all the available database names and their corresponding sizes.
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.
How to check DB users?
Execute the below command to get all the available database users.
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.
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?