Skip to main content

Restoring .dat data to MSSQL

This is just a document in case I forgot to restore data files to MSSQL. I had this problem before when a colleague gave me a .dat files to be restored to SQL server. I had a 2008 version of the server and had no trouble restoring it. The problem is, I forgot how I did it when I had a new PC and I upgraded it to 2012 SQL server.

But this is a simple task (although I had a full day remembering how I did it and I had no luck finding the solution from google). First off, click restore, like so


I had trouble with the database whether or not to add a new database and restore the file to it, or not. Simple answer is no need. With the next image you can see that the configuration is very simple.


Just set it to device as the source and find the .mdf file. It automatically displays a suggestion for the database name and you're done. Click OK and wait a couple of minutes for SQL server to restore the data.

[EDIT] In case you are restoring a backup file without an extension. You can do so by setting the file name All files (*) when searching for the backup data.

Comments

Popular posts from this blog

My Linux Journey: Hello World with .NET

Today marks the beginning of my journey into the world of Linux. As a lifelong Windows user, venturing into a new operating system felt like stepping into uncharted territory. But armed with curiosity and a desire to explore, I took the leap. My first task? A simple "Hello World" program using .NET. With the installation of .NET 8.0 on my Linux machine, I was ready to dive in. I created a new directory for my project, aptly named "helloworld," and ran the following commands: dotnet new console -o helloworld cd helloworld dotnet run And just like that, the words "Hello World" appeared on my terminal screen, a small victory but a significant milestone in my Linux journey. As I reflect on this humble beginning, I am reminded of the endless possibilities that lie ahead. From mastering the command line to exploring the vast ecosystem of open-source tools and technologies, there is much to learn and discover. Join me as I embark on this exciting adventure, one c...

Python Hydrology

Recently I'm learning Python and encountered the Hydrology book. Had to upgrade some of python packages and some libraries needed to get working with the book. There is an instruction though about mostly using pip install packages need for the book. The problem is I can't get it work. It's missing some things so I did a little google and hopefully this is a compilation of the things I need to work with the examples of the book. First off, I updated the apt-get $ sudo apt-get update Next is I installed the pip package manager. I'm not too sure but I have Ubuntu 10 and it doesn't have the pip installed. So I installed using the command below. $ sudo apt-get install python-pip Now the development packages for python. $ sudo apt-get install python-dev Most of the examples uses the scientific number packages so I installed numpy and other packages I'm not quite aware of. It's just that some of the examples probably in the later part of the book use...

Reasons why you don't apply to some Companies

Just a note, this is just a joke. So for some companies, I would ask you to evaluate me first not base your judgement for hiring me in this post. :) Recently, I planned on getting another job. This time with programming languages I'm not familiar with. Just to get my hands on. Something like Python or Ruby, or JS and NoSQL. You know what I mean. Then came, job posts at some Ads. Recruiters really think they are smart. They're not even reviewing what they're posting and not getting consultation from experts offering a job. For example SEO Experts (20k to 30k) with GREAT “DAYTIME” CAREER OPPORTUNITIES A NEW COMPANY soon to expand OPERATIONS in CEBU!!! I'm sure 30k is not that great. And what's with the DAYTIME? Also Perfect Worklife Balance: “Daytime Work” and Guaranteed 5 day work week only Easy to Manage Accounts Excellent Compensation based on expertise, we are only looking for top talent and pay accordingly Performance and Attendance bonuses...