SDK Script PX code to get db hostname
In Script PX code, how can I get the Agile database hostname into a String? I see there is a PropertyConstants.PROP_DB_SERVER_HOSTNAME , but am unsure of what the code should look like to get it.
Hi MrMathison,
This works for me…
IAgileSession session = AgileLoginCalls.connect();
IAdmin admin = session.getAdminInstance();
INode locationsNode = admin.getNode(NodeConstants.NODE_SERVER_LOCATION);
IProperty prop = locationsNode.getProperty(PropertyConstants.PROP_DB_SERVER_HOSTNAME);
System.out.println("Current Value: " + prop.getValue());