-2

How to get current database name in advantage database server? I don't know which query will answer this question. I have tried select top 10 * from system.logins but I got below error message:

Error 7200: AQE Error: State = HY000; NativeError = 5004; [iAnywhere Solutions][Advantage SQL][ASA] Either ACE could not find the specified file, or you do not have sufficient rights to access the file. Table name: logins AdsCommand query execution failed.

ypercubeᵀᴹ
  • 99,450
  • 13
  • 217
  • 306
Arpit
  • 1
  • 1

1 Answers1

0

In Advantage/SQLAnywhere, the database names are stored in sysdbspaces

To access the name of the database you are currently in use the db_name() function.

select db_name()
Michael Gardner
  • 492
  • 3
  • 11