Using xSQL Builder
Creating a package using the user interface
The user interface wizard guides you through the steps of
configuring a package:
- Step 1: Allows you to start a new configuration or modify a
saved one.

- Step 2: Collects the information about the master database.
This is the database the schema of which will be pushed to the
client machine. Note that you should be able to access the master
database from the machine where you are running the xSQL
Builder.

- Step 3: Allows you to choose between synchronizing an existing
destination database or creating a new one.

- Step 4: Depending on the option you selected in the previous
screen as to whether synchronize an existing database or create a
new one, this step presents you one of the followings:
- Synchronize an existing database on the client machine:
When the package is deployed, it will synchronize the client
database with the master database. You can select to backup the
destination before the synchronization. If you choose to do so, you
should provide a location of the backup file, the type of the
backup (full or differential) and the option to overwrite the
backup file. Note that the backup path must exist on the client
machine, the interface cannot check it at the time you configure
the package.

- Create a new blank database: When the package is
deployed, it will create a new database on the client machine first
and then synchronize with the master snapshot. You should specify
the name of the database, the path on which it should be created
and the recovery model. Note that the database creation path should
exist on the client.

- Create the database from a database backup file: When
the package is deployed, it will create the destination database
from the backup file by performing a restore and then synchronize
it with the master database. You should specify a backup file that
will be used to create the client database. If you can choose to
embed the backup file in the executable, xSQL Builder compresses
the backup file and adds it to the executable package. If the
backup file is not embedded, it should exist on client
machine.

- Create a new database from a T-SQL script: When the
package is deployed, it will create the destination database from
the T-SQL script you specify and then synchronize it with the
master database. You can use scripts to create complex database
that contains, for example, multiple filegroups or special
settings.

- Step 5: Provides the custom scripts options. The custom script
is a T-SQL script and should be executed before the synchronization
(pre-sync) or after it (post-sync). You can specify a single file
or the whole content of a folder as custom script. When the folder
is selected, all the files with .sql extensions in that folder will
be executed in the alphabetical order. You have to option to embed
the scripts, in which case xSQL Builder compresses and add them
into the executable package. If you choose not to embed them, the
script files must exist on the client machine on which the package
will be deployed.

- Step 6: Provides logging options. You can choose to generate
three types of logs:
- Operational Log: Contains
information about the actions being performed on client machine
when the package is executed.
- Synchronization Log: Contains
details about the actions performed by the synchronization
script.
- Error Log: Contains information
about errors that have occurred on the client machine.

Note that the log path you specify must exists on the client
machine. You can also choose to overwrite the log files and use a
specific encoding. By default logs are written using ANSI
encoding.
- Step 7: Provides notification options. You can choose to send
an email notification when the package on the client machine fails,
succeeds or when it completes. The notification is email-based and
requires an SMTP mail server along with the necessary credentials.
You can specify a designated email address where the notification
will be sent to and the senders email address. If the process
fails, by default the error log is appended to the failure email
notification.

- Step 8: Presents some additional settings:
- Output Package: It is the full
name of the executable package.
- Template Folder: It is the path
where the C# template classes are located.

Once you have completed the wizard, you can save configuration
settings to a file and generate the package by clicking on the
Finish button.