Recently I started creating a list and a series of posts on SQL scripts I use when restoring Dynamics AX databases from one environment to another, typically from production to QA or development.
We have so far discussed a number of configurations that must be changed for the new system to operate effectively and starting yesterday we moved onto exploring more optional configurations.
Today we will cover two of these items namely re-configuring the outgoing SMTP server in AX and configuring the settings for the DMF working folder.
Note: In my experience the SMTP server will most likely not change between a production and development server, but you may need to reconfigure it if moving to a new domain etc. Similarly it will work to use the same DMF shared folder between PROD and DEV, however I would recommend changing this to keep the data 100% separate.
To update these 2 settings above we need to do the following:
1. Update the SysEmailParameters table to update the SMTP server name (and additional login parameters)
2. Update the DMFParameters table to reflect the new shared folder path.
The following SQL code will accomplish the above. I have parameterised the SQL for easier reuse or adjustment.
---Outgoing Email Settings--- Declare @SMTP_SERVER varchar(100) = 'smtp.mydomain.com' --Your SMTP Server Declare @SMTP_PORT int = 25 ---DMF Folder Settings --- Declare @DMFFolder varchar(100) = '\\[YOUR FILE SERVER]\AX import\' ---Update Email Parameters--- Update SysEmailParameters set SMTPRELAYSERVERNAME = @SMTP_SERVER, @SMTP_PORT=@SMTP_PORT ---Update DMF Settings--- update DMFParameters set SHAREDFOLDERPATH = @DMFFolder where SHAREDFOLDERPATH != @DMFFolder --Optional to see affected rows
I hope this assists you and will be useful in your management of your AX environments.