is there a PowerShell command to get the ODBC name for a specific (or all) datasource ?
I found a command that give me the details of datasource and the fact that it's an ODBC datasource, but I can't find a way to get the ODBC name
Get-PWDSConfigEntry -DatasourceName 'MyDatasource"'HostName : projectwise.xxx.frFullName : projectwise.xxx.fr:MyDatasourceName : MyDatasourceInternalName : MyDatasourceType : SQL ServerInterfaceType : ODBCSSO : TrueSTS : False
Not at this time. However, if you are running your session on the ProjectWise Integration server, you could use Get-Content or other means to search through the dmskrnl.cfg file to find the line that looks like this:
And then searching for the database listed, find the one that you are interested:
1 = Datasource name
2 = ODBC name
Dan WilliamsSolution ConsultantBentley Systems, IncorporatedPortland, OR, USA (Pacific Time UTC-08:00)
thanks for your answer
yes i already do this (dnskrnl.cfg) for checking odbc configuration but looked at another solution based directly on pwps to query multiple servers (I have 350+ datasources to check)
What about using the ODBC tools instead of Projectwise tools?
# get all 64-bit odbc connections on remote server
$odbc = Get-OdbcDsn -CimSession 'servername' -Platform '64-bit'
# database server and database are in
# Attribute.Server and Attribute.Database properties
Then you could find the odbc name from server & database name and then check the dmsknrl.cfg? Kind of roundabout.
Doohh! I should have thought of that (but didn't)! : -)
Hello Kevin,My ODBC hasn't the same name that the Projectwise Datasource, but the name of the SQL database,and that's what I want, to check the matching between online published datasources and SQL DatabasesBut thanks for the idea