Failed to restore from .sql file

Hello,

I been using free version of program to backup SQL Server Express 2019 database to one .sql file, as secondary bakup. Today its only backup i have and when i started to restore i facing with schema recreation problem

13/08/2025 6:11 PM Connecting to “Remote SQL Server”: “SHON3I\SQLEXPRESS”.
13/08/2025 6:11 PM Connected to “SQL RTM Express Edition (64-bit)”.
13/08/2025 6:11 PM Uncompressing “D:\Baze\MFP202508131731.zip” file with Internal archiver.
13/08/2025 6:11 PM Restoring “MFP1” database from files: “MFP202508131731.sql”.
13/08/2025 6:11 PM Failed to restore “MFP1” database. T-SQL command error: ALTER TABLE [dbo].[Serije] WITH NOCHECK ADD CONSTRAINT [Serije_FK00] FOREIGN KEY([ArtikalID])
REFERENCES [dbo].[Artikli] ([ArtikalID])

Foreign key ‘Serije_FK00’ references invalid table ‘dbo.Artikli’.
Could not create constraint or index. See previous errors.
13/08/2025 6:11 PM Job execution error: T-SQL command error: ALTER TABLE [dbo].[Serije] WITH NOCHECK ADD CONSTRAINT [Serije_FK00] FOREIGN KEY([ArtikalID])
REFERENCES [dbo].[Artikli] ([ArtikalID])
Foreign key ‘Serije_FK00’ references invalid table ‘dbo.Artikli’.
Could not create constraint or index. See previous errors. Server name: “SHON3I”.
13/08/2025 6:11 PM Deleting temporary files.
13/08/2025 6:11 PM Job “Restore Job - 2” finished with “2” errors.

How to solove this problem and restore db?

Thanks
Nenad

Hi Nenad,

To help us investigate the issue, could you please export the database schema only (no data) from SSMS and send it over to support@sqlbackupandftp.com?

Steps in SSMS

  1. Connect to the server → right-click the database → Tasks → Generate Scripts…

  2. Choose Objects: select Script entire database and all database objects (or pick specific ones).

  3. Set Scripting Options: Save as script file, Single file, UTF-8 → Advanced… → set:

  • Types of data to script: Schema only

  • Script Indexes: True

  • Script Primary Keys: True

  • Script Foreign Keys: True

  • Script Triggers: True

  • (optional) Script Extended Properties: True

  • (optional) Include IF NOT EXISTS: True

  1. Next → Finish. Zip the resulting .sql and send it back.

Thanks!

Hi Oleg,

I am sending you mail right now.

Thanks
Nenad

Hi Nenad,

Thank you for providing schema.

We are aware of this issue and have identified that it affects some users. Our team is actively investigating the root cause and working on a fix.

We will share an update as soon as more details are available.

Thank you for your patience and understanding.

Hi Oleg,

Thank you. I’m glad you’re working on the fix and I look forward to the update when it’s ready. Somehow i managed to import .sql and restore database via sqlcmd command, so i now not in trouble :slight_smile:

Best regards
Nenad

Hi Nenad,

Thank you for your patience.

Please download and install the alpha version with the latest fixes from the link below:

https://sqlbackupandftp.com/download/alpha

This version includes all the latest fixes and can be installed directly over your current installation—no uninstallation is required.

Once installed, please test both backup and restore.