Get Data Source Connect URL

There is an existing system function called:

system.db.setDatasourceConnectURL

Would it be possible to have a "get" equivalent? Or does anyone out there already have a scripting method to get the database connection URL for a given connection name?

Thanks,

Nick

Hi Nicholas,

Currently, there is not an inherent way to achieve this. What are you trying to do with the returned connection URL?

@Gabriel_Hernandez we have multiple versions of a database, usually when we need to upgrade it's easiest just to standup a new database. We look at them centrally in order to have monitoring of memory remaining, etc.

It would be convenient if we could see the JDBC connection string so we can dynamically determine which version of the database is on the other side.

Now that I'm tying this, I'm also wondering if I can determine which database version it is via query, probably so....

Thanks,

Nick

2 Likes

I can give the ones that I know of:

PostreSQL and MySQL: SELECT VERSION()
SQL Server:          SELECT @@VERSION
1 Like