For the Unreal dedicated server, you can specify the port and map at launch. We use a batch file to make this simple. For example a batch file could have the command: “c:/unreal_server/gameserver.exe Map1 -log port=7777” The next server instance run on the same physical server would change the port to 7778 and so forth. For the dungeon zones, we simply specify a different map on the new server instance, i.e. Dungeon1Map. To zone between the main map and a dungeon, we use a trigger box and a function on the client that uses the OpenLevel node. This disconnects the player from the landscape map server and connects him to the dungeon map server. The port and ip address are set as variables. You could set these in any way that suits your design.
For db server communication we use the Sockets plugin and server that is available on the Marketplace. Inventory, stats, location, and etc storage is all handled by communication between the UE4 server and the socket server. Many use the VaRest plugin that is also available on the marketplace.
I would suggest that you investigate the MMO-Kit (about $100) that is discussed here on the forums. Much of what you want to do is built in to that kit and at the very least it would provide working examples for your project.