At times it might be necessary to drop and recreate a Sybase ASE database. For example when you want to do a system copy from scratch and you need the current database to be cleaned up or when your DB is in inconsistent state and you want to created new DB and restore it.
Following command can be used to drop a database:
drop database <dbname>
But if the DB is in inconsistent state you might get below error:
In such case use the below steps to drop the DB and create it again:
Note: DBCC DROPDB will only work if the database is marked as suspect:
First check if the DB is marked as suspect:
If the DB is not marked as suspect, this should be marked explicitly:
- Allow updatesNote: At this stage you need to restart your database services for the changes to take effect.
- Set the status of DB to suspect (320)
- Drop database using DBCC:
4. Dont forget to disable the updates by setting “Allow Updates” to Zero and restart the database.
Note: These series of blogs related to error is only to give an idea about troubleshooting aspects of SAP HANA and not a definitive guide for error resolution.
When starting HANA database, I ran into below error:
I ran into this error right after I tried to configure SSL on the HANA machine.
Checked the log nameserverxx.trc under /usr/sap/<SID>/<SID<<InstanceNO>/<HOST./trace/ and found below error:
Clear that the issue is caused by wrong SSL settings.
Realized that one of the parameter settings for SSL has been missed (SAP Note 2561693).
Set the value of ssl to off in global.ini file and restated the HANA database to fix the issue.
2142432 – SAP HANA does not start after a failed attempt to rename the HANA SID
2665811 – The stop and restart function of HANA studio is disabled even HANA is running
2431472 – Daemon status on a HANA system shows “Running but status info unavailable”
2125839 – Process hdbdaemon HDB Daemon not running – Address already in use
2472793 – HANA process hdbdaemon HDB Daemon not running
2231571 –  recovery could not be completed,  Recovery failed in nameserver startup during recovery of MDC tenant
Make sure you are logged in with user syb<sid>.
From the environment variables find you Sybase ASE install Directory:
Travesrse to the install path:
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.
After both the processes are started the control is not returned back until you hit a key.
Now you can check the status of server using command showserver.
2570084 – How to start Backup Server manually – SAP ASE
2307016 – How to manually configure and start ASE Cockpit for an existing ASE server – ASE 16.0 SP02 PL02
2581558 – Starting SAP ASE Backup Server as windows service reporting error “The service did not respond to the start or control request in a timely fashion”support-grace , support grace, Application version, License version, lic, Sysam, grace period, ASEServer, SAPASE, .lic, FLEXnet Licensing error, key, old license file, datestamp, support renewal date, sybase license , KBA , BC-SYB-ASE , Sybase ASE Database Platform (non Business Suite) , Problem
Many times we come accross RFC connections of type TCP/IP connection which are not working or suddenly stop working with most infamous error “Program no registered”
Logon Connection Error
Error Details Error when opening an RFC connection
Error Details ERROR: program <program id> not registered
Error Details LOCATION: SAP-Gateway on host xxxxx / sapgwxx
Error Details DETAIL: TP xxxxx not registered
Error Details COMPONENT: SAP-Gateway
External program should always regsiter on the Gateway of the SAP application to be able to establish connectivity like SLD registers itself using RFC’s SLD_UC or SLD_NUC.
For example a ESB program like WSO2 should register on the gateway using connectors (.jar files normally). While registering, it will use details of the application/server like, gateway host, gateway service, Program ID, user name, password etc..
Once this program is registered you should be able to see this under the logged on clients in transaction SMGW:
You should see the program you registered under TP name. Once this is done, you are ready to create the required TCP/IP RFC using the same program ID under TP name.
If you are not able to see this TP Name registered, check the connectivity from you third party server to SAP gateways host by doing a telnet to gateway port.
If this works, it could be your gateway ACL parameters are blocking the connection.
Check you profile parameters for gw/acl_mode, gw/sec_info and gw/reg_info etc and adjust them accordingly,
2104408 – Checklist for “program <program ID> not registered” errors