|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, January 08, 2013 4:26 PM
Points: 4,
Visits: 12
|
|
Hello All, I hope and I'm sure to find an answer with all the experts on this forum. Well this is the situation, this is in my home lab and I'm looking to restore an SQl Express 2005 DB to a 2008 SQL server is possible using just the MDF and the LDF files? (no migration no backup and restore) I've looked around the web and what I can see is attaching these two files to the SQL 2008 server would be enough? one other thing is that I no longer have the credentials of the user account where this SQL Express DB is created?
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Tuesday, March 26, 2013 8:41 AM
Points: 2,562,
Visits: 3,451
|
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 8:35 AM
Points: 4,418,
Visits: 7,173
|
|
There shouldn't be a problem with the version difference. Have you tried it, though? That's the best way of finding out. It will depend on whether the database was cleanly shut down - it's possible that the files will be corrupt otherwise. Don't worry about the security - you can fix that once you've successfully attached the databases.
John
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, January 08, 2013 4:26 PM
Points: 4,
Visits: 12
|
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 11:12 AM
Points: 37,665,
Visits: 29,917
|
|
mourad.b (1/8/2013)
Well this is the situation, this is in my home lab and I'm looking to restore an SQl Express 2005 DB to a 2008 SQL server is possible using just the MDF and the LDF files?
Yes, absolutely it is possible
I've looked around the web and what I can see is attaching these two files to the SQL 2008 server would be enough?
Correct, that's all that's needed.
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 11:12 AM
Points: 37,665,
Visits: 29,917
|
|
John Mitchell-245523 (1/8/2013) It will depend on whether the database was cleanly shut down - it's possible that the files will be corrupt otherwise.
That's attaching without the log file. When you have both files, doesn't matter if SQL was cleanly shut down or not.
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, January 08, 2013 4:26 PM
Points: 4,
Visits: 12
|
|
John Mitchell-245523 (1/8/2013) There shouldn't be a problem with the version difference. Have you tried it, though? That's the best way of finding out. It will depend on whether the database was cleanly shut down - it's possible that the files will be corrupt otherwise. Don't worry about the security - you can fix that once you've successfully attached the databases.
John
No I havent tried this yet, but will give it a try this evening. I presume that the SQL Express was cleanly shutdown and I will give it a try later on tonight.
All the best and Thanks
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 8:35 AM
Points: 4,418,
Visits: 7,173
|
|
GilaMonster (1/8/2013)
John Mitchell-245523 (1/8/2013) It will depend on whether the database was cleanly shut down - it's possible that the files will be corrupt otherwise. That's attaching without the log file. When you have both files, doesn't matter if SQL was cleanly shut down or not. Thanks Gail - I didn't realise that. Do you happen to know whether it also applies if, for example, the LDF and MDF were backed up using open file agents?
John
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 11:12 AM
Points: 37,665,
Visits: 29,917
|
|
John Mitchell-245523 (1/8/2013) Do you happen to know whether it also applies if, for example, the LDF and MDF were backed up using open file agents?
Yes I do, and no it doesn't.
Unless the file backup tool either quiesced the IOs prior to the backup or somehow managed to copy the files at exactly the same nanosecond, there's a chance that the files are as of different points in time (small difference, but that's all it takes), and will fail to attach. If the log file was copied a smidgen later than the data file, the resultant files will probably attach. If the data file was copied a smidgen later than the log file, the resultant files probably won't attach.
Files that are copied when SQL is stopped or when the DB is offline or detached are static. Files that are copied while the database is active are not, and that's what may well make them not attach.
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 8:35 AM
Points: 4,418,
Visits: 7,173
|
|
GilaMonster (1/8/2013) Files that are copied when SQL is stopped or when the DB is offline or detached are static. Files that are copied while the database is active are not, and that's what may well make them not attach. Thanks for clarifying, Gail. That's what I was getting at when I talked about the database being cleanly shut down. Since the original post didn't mention how the files were obtained, I thought it safer not to assume.
John
|
|
|
|