The database adapter throws error "Attempt to locate entry in sysdatabases for database 'XXX' by name failed" while connecting to SYBASE ASE database
book
Article ID: KB0076232
calendar_today
Updated On:
Products
Versions
TIBCO ActiveMatrix BusinessWorks Plug-in for Database
7.x,8.x
Description
TIBCO ActiveMatrix Adapter for Database will throw the following error while connecting to SYBASE ASE database.: ===== "[tibcosoftwareinc][Sybase JDBC Driver][Sybase] Attempt to locate entry in sysdatabases for database 'xxx' by name failed - no entry found under that name. Make sure that name is entered properly." ===== Cause: ===== This error occurs when Adaptive Server tries to access a database that is not listed in sysdatabases. For example: A user tries to access a database not listed in sysdatabases: 1> use <database_name> 2> go When a user tries to connect to an Adaptive Server where an invalid database is indicated by the defaultdb column of master..syslogins in SYBASE. When the user is only connected to master, or not connected at all, in this scenario the ADB adapter will throw above exception.
Issue/Introduction
The database adapter throws error "Attempt to locate entry in sysdatabases for database 'XXX' by name failed" while connecting to SYBASE ASE database
Environment
Product: TIBCO Adapter for ActiveDatabase
Version: All Supported versions
Database:Sybase ASE
OS: All Supported Operating Systems
Resolution
To resolve the error please follow the below steps:
1. Obtain the list of all databases which are present in sysdatabases by executing sp_helpdb or the following: 1> select name from master..sysdatabases 2> go The list which will be returned that contains only valid databases recognized by Adaptive Server and available for use.
2. Either create the missing database or change the reference to a database from the list created in step 1: If a user-issued use command created the error, either create a database following regular procedures or change the use command to refer to one of the databases from the list created in step 1. step 2: If the defaultdb option of sp_addlogin refers to a invalid database, the System Administrator (“sa”) or user needs to specify a new, valid, default database. To specify a new default database, choose a database name from the list which is pulled using step 1 and use the following procedure: 1> sp_modifylogin <user_name>, defdb, <database_name> 2> go Then can successfully change the default database at any time with sp_modifylogin, and can access the database only if the database owner (“dbo”) has added as a user in the database.