How to convert existing (.MDF file) SQL Server 2000 database to SQL Server 2005

How  to convert existing (.MDF file)
SQL Server 2000 database to SQL Server 2005   without using database publishing wizard.

                              OR
Moving Data from SQL Server 2000 to SQL Server 2005.

plz explain step by step instructions
prashanth agsoftware engineer Asked:
Who is Participating?
 
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
You are mixing up things here.
Attach the database in Management Studio: right-click on Databases, All Tasks, Attach. Select the MDF, adjust paths if required, done.
After that you can navigate to the table, and use the context menu to generate a create script.
0
 
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
If you have a MDF file,  I assume you detached it from the 2000 instance. Is there a logfile (LDF), too?
0
 
prashanth agsoftware engineer Author Commented:
Yes i had both mdf and ldf files
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
prashanth agsoftware engineer Author Commented:
how to generate SQL script  plz explain in detail
0
 
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
Do you need a SQL really?
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
You just need to attach .mdf and .ldf files in SQL Server 2005 instance.
Then run this command (replace DBName with the real database name):
ALTER DATABASE DBName SET COMPATIBILITY_LEVEL = 90

Open in new window

0
 
prashanth agsoftware engineer Author Commented:
@Qlemo

I need table structure .
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.