Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Backup and restore MSSQL DB

Posted on 2016-08-12
Medium Priority
Last Modified: 2016-08-17
Hi , what is the step to backup from MSSQL express to the MSSQL SQL 12
Question by:Julio Jose
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +2
LVL 12

Expert Comment

ID: 41754581
This link: Back Up and Restore of SQL Server Databases

... has the latest version of all the backup information. How-to examples are at the bottom of the page.

* Not sure this applies to Express:
 Basically you can right-click on the [database name]  > Tasks > Back Up ... in SSMS, run a full backup to a disk 'device'. Leave the default folder location, append the file name (i.e. myBackup.bak) and make a note of it.

It's likely easiest to copy the backup file to the MSSQL folder (or new subfolder thereof ) on the destination server (i.e. C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\). You should be able to right-click on the 'Databases' folder > Restore Database ... in SSMS.

The link has pretty much all you need to know to do every type of back up and restore. I encourage you to read all of that material sometime, however it is not required for the task at hand.

Examples for back up and restore via SQL command are also available in that link.

Good luck!

Author Comment

by:Julio Jose
ID: 41754820
receive error when I try backup

LVL 16

Expert Comment

ID: 41754876
Do you get the same error using this T-SQL command?
TO DISK = 'C:\JulioPath\dbJulio.BAK'

Open in new window

where "dbJulio" is the name of your database and "C:\JulioPath\" is where you want to put the backup.

If so, as you seem to be attempting to migrate from SQL Server Express 2012 to Enterprise 2014, I believe (I haven't tried it!) that it would be possible to simply detach the database from the Express server (using SSMS) and attach it to the Enterprise one using SSMS - possibly with a file copy in between to get it to the right place. Once you have done that then you could move data between databases using the SSMS tools.

Finally, if all else fails, try creating an equivalent database on the enterprise server. Then use SSIS to move the data from the 2012 database to the new 2014 one.

Hope this helps

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

LVL 12

Expert Comment

ID: 41754968
Good tips, Mike!

Another one would be to Script Database As ... to replicate the database structure. Perhaps that's what Mike meant by "try creating an equivalent database on the enterprise server".
LVL 14

Accepted Solution

Nakul Vachhrajani earned 1000 total points
ID: 41755005
Backing up and restoring from SQL 2012 to SQL 2014 should not be a problem. Based on the screenshots, it looks like you are trying to use SSMS for SQL 2008 - which will result in the Index out of bounds message.

Try to use SSMS for SQL 2012 for backup and SSMS for SQL 2014 for the restore. If those are not available, using the BACKUP DATABASE T-SQL command is your best bet.
LVL 52

Expert Comment

by:Vitor Montalvão
ID: 41756018
receive error when I try backup
What's the error?

Author Comment

by:Julio Jose
ID: 41756483
Follow Rakul step use the same version SMS, I can backup and successful restore the DB on the new DB server.

However when the application try to connect, I get this error from sql log, this is the same application user attempt to connect I can see the user include successful restore, how do I perform password reset for this user
LVL 52

Expert Comment

by:Vitor Montalvão
ID: 41756543
When you restore a backup in a different SQL Server instance you need to guarantee that the same login exists in the target SQL Server instance. If not then you need to create it and match the login with the desired user.
Here's the Microsoft's article about transferring SQL Server logins.

Author Comment

by:Julio Jose
ID: 41756548
why sound so complicated? I need step for SQL express 2012 to SQL Server 2014, the version not listed support on the MS site.
LVL 52

Assisted Solution

by:Vitor Montalvão
Vitor Montalvão earned 1000 total points
ID: 41756557
You're only migrating a database and that's nothing complicated with that. A SQL Server Express database has no difference from any other regular SQL Server edition. The limitation is only handled by the engine and not the database itself.

I wrote 3 articles about SQL Server database migration. Each one with a different method but the goal is the same. Have a read on them so I think it will help you knowing more about the process:
SQL Server database migration - The Detach/Attach method
SQL Server database migration - The Backup & Restore method
SQL Server database migration - The Copy Database Wizard method

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question