-1

I have SQL Server 2005 .mdf file and now I need to attached the same to SQL Server 2008

so how can I do the same.

Is any such tool is available , which convert 2005 .mdf file to 2008 .mdf file ?

As I do not have access to SQL Server 2005 at all .

BJ Patel
  • 6,148
  • 11
  • 47
  • 81

2 Answers2

1

Best practice is to backup the database using SQL Server Management Studio with SQL Server 2005, and then restore it on SQL Server 2008.

But you can simply attach the SQL Server 2005 .MDF file to SQL Server 2008. SQL Server will convert it for you - it is able to read data files from older versions of SQL Server.

I would suggest attaching to SQL Server 2008, performing an SQL Server backup, then restoring it back to SQL Server 2008. This will cause the database to be recreated, and will alert you to any data issues.

Cheers, Peter

kiwi pete
  • 11
  • 2
0

When you restore database backup(2005) to SQL Server 2008 , SQL Server restore your backup and update it's to new version. But SQL Server don't change compatible level of your database. you can change compatible level of your database by following query.

ALTER DATABASE test SET COMPATIBILITY_LEVEL=100;
mehdi lotfi
  • 11,194
  • 18
  • 82
  • 128