Skip to main content

We have a SQL .bak file which serves as a template for a database schema. Normally this .bak is restored manually via MSSQL, where the name of the database is specified.

The goal is to be able to dynamically create a database on a known server, where the name of the database is derived from processing within the FME workspace.

Is there a script that can be run from a SQLExecutor in FME to make this possible?

So this article seems pretty helpful:
https://www.ubackup.com/enterprise-backup/sql-restore-database-from-bak-file-1021.html

For the the best answer for you in there is:

By running:

RESTORE DATABASE databasename FROM DISK = 'filepath\filename.bak'

Seems like this should work from an SQLExecutor 


Reply