1

I am brand new to SQL. I have not written SQL and do not have any prior experience. I am following an SQL tutorial on Udemy and to follow along I need to restore a database and retrieve both the mdf and ldf files.

I tried using the Northwind sample database which I downloaded from this website: http://northwinddatabase.codeplex.com/

I then click on create new Query in SSMS

and ran the following query which executed successfully:

enter image description here

I then ran this query which resulted in an error:

enter image description here

I naviagted to the my D drive on my file system and there is no folder there named MSSQLDataFiles. My C drive has only 45 GB left of space and I'm wondering if that may be an issue although I don't think that should be an issue at all, at least for what I am trying to achieve.

All I'm interested in is restoring the database file so that I can follow along with the Udemy tutorial.

Any suggestions would be greatly appreciated.

Thank you for your help

2 Answers 2

1

there is no folder there named MSSQLDataFiles. My C drive has only 45 GB left of space and I'm wondering if that may be an issue although I don't think that should be an issue at all, at least for what I am trying to achieve

You need to create folder mssqldatafiles and all the subfolders for the restore to work

Sign up to request clarification or add additional context in comments.

Comments

0

The database will be created once you restored the ".bak" file. System itself created the ".ldf" and ".mdf" files in respective root folder. refer the below site then you can achieve what you requested.

https://www.mssqltips.com/sqlservertip/4933/sql-server-2017-restore-database-error-in-ssms/

1 Comment

Thanks Arunprasanth Easwaran. I will give this a shot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.