Is is possible to 'restore' the database from the 'raw' .mdf and .ldf files of the old computer to the new computer / database

stevenvw

Distinguished
Nov 25, 2011
19
0
18,560
I'm not sure if this is the correct forum to post the question, but I didn't know where else to place it.

I have a client that has POS software called Restaurant Pro Express (RPE) from www.pcamerica.com

Their old POS computer had a hardware failure, but I was able to attach the hard-drive to another computer and recover the data.
RPE uses a MSSQL database system. However, my client doesn't seem to make backups very often - the last one is dated January 5, 2015.
I was able to copy the C:\Program Files\Microsoft SQL Server\ folder over which contained the instance as well as all the data files - and has up-to-date information.
The instance in the recovered Microsoft SQL Server folder was called MSSQL10_50.PCAMERICA. I installed the RPE software on their new computer, and it too now has an instance with the same name.

I am no DBA expert, especially when it comes to MSSQL. Is is possible to 'restore' the database from the 'raw' .mdf and .ldf files of the old computer to the new computer / database instance? If so, how should I proceed?

EDIT:
On the old computer the instance folder was called: MSSQL.1, while on the new computer the instance folder is called: MSSQL10_50.PCAMERICA.
The new computer is using MSSQL 2008 R2, and I believe that the old computer was probably using MSSQL 2005. I assume this would complicate the process to some degree unfortunately.

Thanks in advance!
 
Solution
You better contact software vendor. There is no way to know how they have attached their application to the backend database - it is quite possible the connection string is hard-coded into application and you must replicate it exactly. File location will not help you a lot.

You need to install (on "server" computer) download "MS SQL Management Studio", if it is not already there. I would recommend putting database files (.mdf, .log) outside of "Program Files" folder. Create an "PCAMERICA" SQL Server instance, then attach the raw data files, and make sure you can see schemas, tables etc. Once you have that in order, start working with POS application.
You better contact software vendor. There is no way to know how they have attached their application to the backend database - it is quite possible the connection string is hard-coded into application and you must replicate it exactly. File location will not help you a lot.

You need to install (on "server" computer) download "MS SQL Management Studio", if it is not already there. I would recommend putting database files (.mdf, .log) outside of "Program Files" folder. Create an "PCAMERICA" SQL Server instance, then attach the raw data files, and make sure you can see schemas, tables etc. Once you have that in order, start working with POS application.
 
Solution