0

I have developed a database in SQL Server 2022 (and have SSMS), I need to recreate and include all data from that database on a different server which contains SQL Server 2019 Express.

When in SSMS, I right click and do a restore it doesn't find my .bak file anywhere. I see the .bak file but it won't find it for me to select.

I have moved the filed to multiple locations all in the root of folders I see in the selection window but the file never shows for selection

I have also tried to do it via script

RESTORE DATABASE [new database name] 
FROM DISK = 'filelocation\filename.bak'

Can anything be done easily where the database gets created inclusive all of the data in each of the tables?

I did a restore through SSMS and a direct query and I was expecting that it would create the database, all of the tables.

I also created a new database and tried to restore the .BAK file to the newly created database it also didn't work.

  • You would not be able to RESTORE a 2022 database on a 2019 instance. Though, if you can't see the database backup, you're looking in the wrong place. – Thom A Nov 09 '23 at 21:16
  • 3
    You CANNOT go back from a newer version (2022) to an older version (2019) using .bak files. SQL Server isn't and has never been backwards compatible in that regard. You'll need to script out all your db objects into .sql files, and also script out the data into SQL files with INSERT statements (you can do this from SSMS) – marc_s Nov 09 '23 at 21:16
  • 1
    Also, the Express edition has a file size limit of 10 GB - so if your original database is larger than this, you won't be able to get it up and running in an Express edition database. – marc_s Nov 09 '23 at 21:17
  • UPDATE: for what its worth, the linked (duplicate) didnt help however. I did figure out how to do it. I simply saved each table as a CREATE query script individually and ran them one by one in EXPRESS , then for the data I did a task - > generate script options and then choose the to only include the DATA and it scripted all the insert records for me.. sadly I am have a problem with my larger datasets because they have over a mil records – mchapman13 Nov 13 '23 at 20:55

0 Answers0