Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7871501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:55:31+00:00 2026-06-03T01:55:31+00:00

BACKUP DATABASE [MPRM] TO DISK = N’\\rauf\shared\MPRM_15_5_10.BAK’ WITH NOFORMAT, NOINIT, NAME = N’MPRM-Full Database

  • 0
BACKUP DATABASE [MPRM] TO  DISK = N'\\rauf\shared\MPRM_15_5_10.BAK' 
WITH NOFORMAT, NOINIT,  NAME = N'MPRM-Full Database Backup', 
SKIP, NOREWIND, NOUNLOAD,  STATS = 10

The backup process worked, and I got a file named MPRM_15_5_10.BAK in my shared folder (D:\shared\). This is a backup created from another machine.

When I try to restore the backup, using the following script

RESTORE DATABASE [MPRM] 
FROM DISK = N'\\rauf\shared\MPRM_15_5_10.BAK' 
WITH FILE = 1,  NOUNLOAD, STATS = 10

I get the following errors

Msg 5133, Level 16, State 1, Line 1
Directory lookup for the file “E:\DATABASES\MPRM.mdf” failed with the operating system error 2(The system cannot find the file specified.).
Msg 3156, Level 16, State 3, Line 1
File ‘MPRM’ cannot be restored to ‘E:\DATABASES\MPRM.mdf’. Use WITH MOVE to identify a valid location for the file.
Msg 5133, Level 16, State 1, Line 1
Directory lookup for the file “E:\DATABASES\MPRM_log.ldf” failed with the operating system error 2(The system cannot find the file specified.).
Msg 3156, Level 16, State 3, Line 1
File ‘MPRM_log’ cannot be restored to ‘E:\DATABASES\MPRM_log.ldf’. Use WITH MOVE to identify a valid location for the file.
Msg 3119, Level 16, State 1, Line 1
Problems were identified while planning for the RESTORE statement. Previous messages provide details.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

Why the system asks about *.mdf, *.ldf files ? Is it anything related with Backup option rather than Restore script ?

I logged in with Windows Authentication

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T01:55:33+00:00Added an answer on June 3, 2026 at 1:55 am

    You need to specify where to store the physical files when you restore a .bak if your target server doesn’t have the same disk/directory layout as the original source server. The backup file contains the logical SQL Server files along with the original location on the source server (the full physical path where the .mdf and .ldf where located).

    So you need to use something like this:

    RESTORE DATABASE [MPRM] 
    FROM DISK = N'\\rauf\shared\MPRM_15_5_10.BAK' 
    WITH FILE = 1,  
    MOVE N'MPRM' TO N'D:\MSSQL\Data\MPRM.mdf',  
    MOVE N'MPRM_Log' TO N'D:\MSSQL\Data\MPRM_Log.ldf',  
    NOUNLOAD, REPLACE,  
    STATS = 10
    

    This command here:

    MOVE N'MPRM' TO N'D:\MSSQL\Data\MPRM.mdf',  
    

    specifies that the logical file called MPRM (that’s the default when you didn’t specify anything else when creating your SQL Server database) should be moved during restore to the physical location D:\MSSQL\Data\MPRM.mdf (adapt this as needed)

    To just see what is contained inside a backup file, you can use this command here:

    RESTORE FILELISTONLY
    FROM DISK = N'\\rauf\shared\MPRM_15_5_10.BAK' 
    

    This will show you all the logical files inside your backup, along with their original physical file that they were backed up from (on the source server, where you ran the backup command).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have this script: BACKUP DATABASE timeclockplus TO DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Backup\backup.bak'
I realise there is a command: BACKUP DATABASE [DB Name] TO DISK [PATH] Is
I have been using this query: BACKUP DATABASE RentalEase TO DISK = 'C:\RentalEaseBackup\RentalEase.bak' WITH
I backed up a database: BACKUP DATABASE MyDatabase TO DISK = 'MyDatabase.bak' WITH INIT
I'm storing SQL database backup file (*.bak) in the Visual Studio solution and checking
I try to backup database using code below : backup database RestaurantManagement to disk
I can backup a database on hard disk with the following method : void
sql command BACKUP DATABASE [databasesample] TO DISK = N'D:\kkk\test.bat' WITH INIT , NOUNLOAD ,
I googled but cannot find proper simple code for using backup database full and
Hi I need to backup MySQL database and then deploy it on another MySQL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.