In a previous blog I showed how to get the database name and the database server name for NAV 2009. I used Automation object to read the service configuration file and pull from there the required information.
Posted inDynamics NAV & BC Tips & tricks