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
2 Likes
I am looking for a way to get a list of what databases I’m connecting to, and the ConnectURL looks like it has the most information … is there a way to GetDataSourceConnectURL? Since we can do a SET … thought it’d be possible to do a GET …
Not in v8.1. The OpenAPI for v8.3 opens up all of this kind of stuff.