SQL Restore databse error

João Resende (1141504) 6 Reputation points
2021-10-20T16:29:30.987+00:00

142127-sql.png

Hello community

I just started learning SQL and I am already facing a problem. When I try to restore the database it keeps appearing this error and I can't import the database., as you can see in the image.
Do you have some idea how can I solve it??

Azure SQL Database
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,737 questions
0 comments No comments
{count} vote

6 answers

Sort by: Newest
  1. Olaf Helper 40,816 Reputation points
    2021-10-26T09:58:56.78+00:00

    Microsoft SQL Server 2016

    You can not restore a 2019 database on a lower SQL Server version like here 2016, that's impossible and cause the error you got.

    1 person found this answer helpful.

  2. João Resende (1141504) 6 Reputation points
    2021-10-26T09:18:36.913+00:00

    Microsoft SQL Server 2016 (SP2-GDR) (KB4583460) - 13.0.5103.6 (X64) - i think now I understand . But I downloaded the latest version from the site.


  3. Olaf Helper 40,816 Reputation points
    2021-10-26T09:16:21.123+00:00

    Which SQL Server version are you using? You get the info with

    select @@version
    
    0 comments No comments

  4. João Resende (1141504) 6 Reputation points
    2021-10-26T09:11:03.417+00:00

    Hello,
    Thank you for the help.
    So, I tried all the steps above, and I still can't work with the 'AdventureWorks2019'. But I tried to import the 'AdventureWorks2012' just to see what happens and it worked just fine and I'm now doing the course with that database.

    0 comments No comments

  5. YufeiShao-msft 7,056 Reputation points
    2021-10-21T06:04:20.347+00:00

    Hi @João Resende (1141504)

    backup media verification failed

    run the following code to verify the backup is not corrupted:

    RESTORE VERIFYONLY FROM DISK = 'D:\AdventureWorks.bak';  
    GO  
    

    about possible media errors:
    https://learn.microsoft.com/en-us/sql/relational-databases/backup-restore/possible-media-errors-during-backup-and-restore-sql-server?view=sql-server-ver15

    and try to disable checksums during a restore operation

    RESTORE DATABASE AdventureWorks2012     
     FROM DISK = 'Z:\SQLServerBackups\AdvWorksData.bak'    
       WITH NO_CHECKSUM;    
    GO    
    

    if backup file is really corrupted, you can use DBCC CHECKDB repair: https://learn.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-transact-sql?view=sql-server-ver15

    -------------

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.