Why Can't I get sql 2019 to restore from backup files

Kevin Harris 21 Reputation points
2021-07-30T18:09:13.783+00:00

When we do the restore for the SQL 2019 DB, when selecting the device and going to the DB Backup file and add it. it says no Backup set selected. what could we be doing wrong. It worked great for a long time , but now noting. And we have tried different DB BU files and even ones i have use to restore before.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,361 questions
{count} votes

Accepted answer
  1. YufeiShao-msft 7,091 Reputation points
    2021-08-02T06:03:22.183+00:00

    Hi @Kevin Harris

    It's best to show the error screenshot to locate the error
    For your description, No Backupset Selected to be Restore maybe because:
    119751-1.png

    1、you are trying to restore your database to a lower version of sql server

    2、The backup file is unreadable or corrupted,you can use the following script to confirm
    119697-2.png

    3、it may also be the permission of your account, please check your account permissions,

    https://stackoverflow.com/questions/12119891/no-backupset-selected-to-be-restored-sql-server-2012


1 additional answer

Sort by: Most helpful
  1. Erland Sommarskog 107.2K Reputation points
    2021-07-30T21:17:39.1+00:00

    The simple version of RESTORE is:

    RESTORE DATABASE db FROM DISK = 'C:\somepath\somefile.bak'
    

    If you are taking a copy of a database from a different server, the path for the files may not work, and in this case, you get an error. In this case, you need to use the WITH MOVE clause:

    RESTORE DATABASE db FROM DISK = 'C:\somepath\somefile.bak'
    WITH MOVE 'db' TO 'D:\somdatapath\db.mdf',
        MOVE 'db_log' TO 'D:\somelogpath\db.ldf',
    

    In this command 'db' is the logical name of the data file. This often the same as the database name, but not always. 'db_log' is the logical name of the log file, and again this is often the database name with _log tacked on, but not always.

    If these names do not work, you can use this command:

    RESTORE FILELISTONLY FROM DISK = 'C:\somepath\somefile.bak'
    

    And you will have the logical files in the first column.

    When it comes to the paths for the database files (those that follows TO), you may or may not where to put them. When in doubt, run sp_helpdb on another database and copy the paths for this database and changes. The file-name part should preferably agree with the database name and with .mdf for the data file and .ldf for the log file.

    0 comments No comments