Link to home
Start Free TrialLog in
Avatar of cipriano555
cipriano555

asked on

Moving a database from SQL Server 2008R2 to 2012

I have a database in sql server 2008.  I want to move it over to 2012.  I have tried doing a backup of the 2008 database, and then restoring it in 2012, but I get an error message.

What is the best way to move the database from the old environment to the new.  I want both the structure and the data to be moved.

Thanks,

C
ASKER CERTIFIED SOLUTION
Avatar of Om Prakash
Om Prakash
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Lee
I prefer back up and restore. What is the error message?
As per lsavidge's comment. I would also go down the backup & restore route after troubleshooting the restore error.
can u please share the error you are geting
Avatar of Rich Weissler
Rich Weissler

I have to agree with most of the other experts... restoring a backup has always been the 'best' way for me to move a database between servers.  Of course, logins have to be created on the server, and there are some options on scripting those those and fixing the orphan users.  If, however, you've already tried this and received an error... I'd want to try to resolve that error first.  It's very possible (probable) that whatever is causing the error will plague any effort to move the database, regardless of the method.  So, sorry to echo the other experts... What error did you receive when you previously attempted to restore the database on the new server?
Avatar of cipriano555

ASKER

Who knows what the problem is.  I decided to script out the database and all the data, and that worked.  Doing a backup and restore did not work, I guess because I was going from 2008R2 to 2012.  Nothing fancy in the db, by the way, no triggers, stored process, etc, just basic tables and a couple of views.
We can always go to higher version. When you restore the DB. Keep 2-3 thing in mind.


1. File relocation to folder (Which is exist)
2. Overwrite the existing (if any)
3. Close connection to destination DB (if any)
4. Make sure you have permissions to restore the DB and access permissions of that folder.