Skip to content

How to set up a SQL database connection

Cristóbal Bordiú edited this page Feb 14, 2020 · 7 revisions

FOCA needs a SQL database to run. In this tutorial we will learn how to set up a SQL Server Express instance, step by step.

Database installation

First, get the latest version of SQL Server Express from the Microsoft official website (don't worry, it's completely free!).

Once downloaded, select "Basic installation" and follow the installation wizard, sticking to the defaults (unless you know exactly what you are doing).

install2

Hopefully, you will end up with a fully working SQL Express instance.

FOCA configuration

When you run FOCA for the first time you will be prompted with a warning...

foca1

... followed by a window to set up a database connection.

First, enter the server name in the textbox. Unless you have manually changed the instance name during the installation, it should be .\SQLEXPRESS.

Then, choose your preferred authentication method. Here you have two options:

  • Use Windows Authentication (integrated authentication). This is the default option, which should work in most cases. It makes use of the Windows user account, so no additional credentials are required.
  • Use the SQL Server Authentication. To do so, you will need to create a login in your SQL server instance (see below), and then enter the credentials in the corresponding text boxes.

foca_integrated

Finally, click on "Connect". FOCA should now work.

Creating a custom SQL login

In case you want to use SQL authentication in FOCA, follow the steps described in the official tutorials: create a database user and create a database role.