Out of the box, Tonic Structural supports SQL Auth login.
To use Structural, your SQL Server Admin must enable SQL Auth login.
The following is an example of how to create a new user, called tonic
, and grant necessary permissions.
For the source database, we recommend that you use a backup of your production database instead of connecting directly to your production environment.
The following statements create a new database user called tonic
that has the SELECT
, VIEW
DATABASE STATE
, and VIEW ANY DEFINITION
grants.
Structural does not create the destination database during data generation. Instead, you must set up the destination database before you generate data.
The destination database must resemble the source database as much as possible. We strongly recommend that you run the CREATE DATABASE
and ALTER DATABASE
statements exactly as they were written for the source database. For example, if your source database contains filegroups, then for Structural to run successfully, you must also create filegroups on the destination database.
Creating the destination database is a one-time step. Once the destination database is created, Structural can successfully update it, including schema-level objects, between generation runs.
The destination database requires a higher level of permissions than the source database.
For ease of use, we recommend that you create a user with the db_owner
role.
To maximize performance, we suggest that you run your destination database with a Simple recovery model. This reduces transactional logging and improves the performance of writes to the destination database during generation runs.
To set this in SQL Server Management Studio:
Right-click the destination database.
From the context menu, select Properties.
Select the Options sub-menu.
From the Recovery Model drop-down, select Simple.
By default, during each data generation job, Structural creates the database schema for the destination database tables, then populates the database tables based on the workspace configuration.
If you prefer to manage the destination database schema yourself, then set the environment setting TONIC_SQL_SERVER_SKIP_CREATE_DB
to true
. You can configure TONIC_SQL_SERVER_SKIP_CREATE_DB
from the Environment Settings tab on Structural Settings.
When TONIC_SQL_SERVER_SKIP_CREATE_DB
is true
, then Structural does not create the destination database schema. Before you run data generation, you must create the destination database with the full schema.
During data generation, Structural deletes the data from the destination database tables, except in the following cases:
Tables that use Preserve Destination or Incremental mode
Upsert data generation
It then populates the tables with the new destination data.