Before starting to configure Alert Message Processor, you must have "Microsoft OLE DB Provider for ODBC Drivers" enabled on the Alert computer.
You also need to configure your SQL server by following SQL Server: Prerequisite.
When the SQL Server configuration will be done, we will create a UDL file to test the connection easily.
Creating UDL file
To create a UDL file, create a new text file "ScriptDB.txt" and rename it "ScriptDB.udl".
Once the file is created, double-click on it.
Select "Use connection string" and click on "Build...".
Then select the tab "Machine Data Source" and click on "New...":
On new window, select "System data source" and click on “Next”:
Now, select "SQL Server" and click on "Next"
Click on "Finish":
Finally, we must give a name to the data source (here AlertSQL) and enter the SQL server name, in our example PORTGL\SQLEXPRESS and click on "Next":
Check "With SQL Server authentication using a login ID and password entered by the user" and enter the Login ID and Password defined in your SQL Server before:
In new window, check "Change the default database to" and select your database (ex: AlertDB):
On last configuration screen, click on "Finish":
Now you will test if your configuration is good, click on "Test Data Source...":
If you have "TESTS COMPLETED SUCCESSFULLY" you can continue, otherwise you must to check your parameters:
Click on "OK" to close all windows until arrive to this window, and select the data source created (ex: AlertSQL) and click on "OK":
Re-enter the login ID and password created in SQL server and click on "OK":
Now you have the connection string to use in your script to connect to your SQL Server database:
Using connection string in Alert script
Now you can use the connection string directly in your script: