How to connect to Azure Database

How to connect to Azure Database

If you want to store the Forecast 5 database on an Azure server, you will need to update the config file to point to the correct server and database.

  1. On the server, go to this path: C:\ProgramData\Forecast 5 Ltd
  2. Edit the file Forecast5Config.xml in notepad.
  3. Find the line below:

<ConnectionString>Data Source=(LocalDB)\MSSQLLocalDB;AttachDBFileName=C:\ProgramData\Forecast 5 Ltd\Data\Forecast5V3_2015.mdf;Initial Catalog=Forecast5V3_2015;Integrated Security=True;</ConnectionString>

4. Replace with the line below and enter the correct database name by changing the coloured lines below to your azure server name and the database name (it is new database, you can create any name that has no spaces or odd characters, e.g. $, % '):

<ConnectionString>Data Source=forecast5server.database.windows.net;Initial Catalog=Forecast5;Persist Security Info=True;Integrated Security=SSPI;</ConnectionString>


Or you can add the SA username and password:


<ConnectionString>Data Source=forecast5server.database.windows.net;Initial Catalog=Forecast5;User Id=myUsername;Password=myPassword;</ConnectionString>

5. Save the config and reopen Forecast 5.