Visual Guard Class Library Documentation

Storing your repository in a database

This feature requires Visual Guard Enterprise Edition and it is not available in Visual Guard Small Business Edition.

Visual Guard allows you to store its repository in a database. Visual Guard supports Microsoft SQLServer (2000 or higher) and Oracle (9i or higher). Visual Guard needs to create tables, stored procedures and roles to store its information.

To do that, you must run the "Repository Creation" wizard in Visual Guard console (select the root item in the treeview, right-click and select the option "Add repository").

Select the option "Create a new empty repository" then click on the "Next" button.

In the next page, select the item corresponding to your database (Oracle or SQLServer) then click on the "Next" button.

The following page allows you to indicate the information used to connect to the database. You must provide a user account that will be able to create the database objects (tables, stored procedures...). When you click on the "Next" button, Visual Guard creates the database objects in the database. All Visual Guard database objects are prefixed by "vg_".

If the wizard does not detect Visual Guard database objects, Visual Guard will use the SQL script files to create the database objects.

If the wizard detects that the database objects are already created, the wizard will ask if you want to drop them or keep them. If you have created the database objects manually, you must answer that you want to keep them.

In the next page, you must indicate which authentication mode you want to use.

For Visual Guard authentication mode: Visual Guard will use the Visual Guard built-in users to authenticate the user. In this case, Visual Guard will use the connection string specified in the VisualGuardConfiguration.config to connect to the database.

For Windows authentication mode: Visual Guard will use the current Windows account to authenticate the user. In this case, Visual Guard will use the connection string specified in the VisualGuardConfiguration.config to connect to the database.

For Database authentication mode: Visual Guard will use the database authentication mechanism to authenticate the user.  In this case, Visual Guard will use the connection string specified in the VisualGuardConfiguration.config and replace the current credentials with the credentials provided by the user.

The last page allows you to define the name of the repository and the user account used as the default Master Administrator of the repository. When you click on the button "Finish", the wizard will initialize the repository.

How to grant access to the Visual Guard repository

When Visual Guard needs to authenticate a user, it must be connected to the database. The database account used to connect to the database must have access to the Visual Guard database objects. This account is specified in the configuration file or provided by the user for Database authentication mode. (If you use Integrated Security options in the connection string, the Windows account must have access to the Visual Guard database objects.)

To grant access to these database objects, Visual Guard uses four database roles:

During the authentication process, if the database account does not have access to the repository, the process will fail and the user will not be authenticated.