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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Qlemo"Batchelor", 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
prashanth agsoftware engineer Author Commented:
how to generate SQL script  plz explain in detail
0
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

Qlemo"Batchelor", 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
Qlemo"Batchelor", 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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.