Reputation: 291
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:
I then ran this query which resulted in an error:
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
Upvotes: 1
Views: 2020
Reputation: 46
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/
Upvotes: 0
Reputation: 28920
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
Upvotes: 1