21
Views
2
Comments
Solved
Runtime retrieve database connection name

Hi community,

I would like to provide the name of the current database connection name to the user so they know which database they are connected to.

In our scenario we have multiple copies of the same code attached to different databases for regression testing purpose.

I would like to display the database to the user

For example this database extension connects to "oms.bau.local"


is there are server action of database system table I can interrogate to retrieve this in runtime?

Running O11 on premises. 

thanks,

Andy

UserImage.jpg
Andy Cody
Solution

Thanks Mohd for the response. For those searching on this we used the following query to get the information:

 Filtering on Application name

seems to work ok.


Regards,

Andy

2024-08-01 09-19-00
Mohd Shuaib

Hi @Andy Cody ,


You can use advanced query to serve the purpose.

The query will be written according to your database type (MySQL or SQL server or maybe any other database).

Hope this helps!

UserImage.jpg
Andy Cody
Solution

Thanks Mohd for the response. For those searching on this we used the following query to get the information:

 Filtering on Application name

seems to work ok.


Regards,

Andy

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.