• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 43
  • Last Modified:

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.
0
antonioking
Asked:
antonioking
1 Solution
 
Nakul VachhrajaniTechnical 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

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now