Transferring a SQL database

I have SQL Express 2008 R2 with an instance called "SQLEXpress" installed on Windows XP Pro machine.

I need to replace the Windows XP machine
I have installed SQL Express 2012 on a Windows 7 Pro machine.
Created an instance called "SQLExpress"

What is the best way to transfer the SQLExpress databases from the XP machine to the 7 machine?
The Import/Export function does not transfer schema.
The generate scripts function generates a 8GB SQL file. I have tried to run using sqlcmd command line tool but fails with some syntax errors and due to the size of the file I can't open and fix.

Any advice would be greatly received.
antoniokingAsked:
Who is Participating?
 
Nakul VachhrajaniConnect With a Mentor Technical Architect, Capgemini IndiaCommented:
I would vouch for a simple backup/restore of the database.
0
 
Nakul VachhrajaniTechnical Architect, Capgemini IndiaCommented:
0
 
Jelle DedoyardCommented:
Does dettach/ attach work in express? Because then you only need to copy over the file and attach it again at the other side.
0
 
Lee SavidgeCommented:
Back up and restore every time. You'll need to handle any users and maintenance jobs separately as these won't transfer that way.
0
 
antoniokingAuthor Commented:
Thanks, backup and restore worked a treat - feel stupid now for not thinking of this myself!
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.