[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now


Using SQL Server Management studio - Take my live database and copy it to my test database.

Posted on 2013-01-12
Medium Priority
Last Modified: 2013-01-30
Using SQL Server Management studio - Take my live database and copy it to my test database.
I need my data to be the same in test as it is in live. I want to learn how to do this using the stuido.
I have SQL 2008 R2.
Question by:scottwoltjer
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
  • 4
  • 3

Accepted Solution

Smighty earned 2000 total points
ID: 38770635
You can do this three ways:

Either by Exporting/import, Backup/Restore or Detach/Copy/Attach the Database.
The result should be the same.

For the Export:
Right click on your Database > Tasks > Export Database.
Import it on the new Server

For the Backup/Restore:
Right click on your Database > Tasks > Backup (Select a full backup)
Create a new (empty) database with the same name on the new Server
Import the Content from the previously made Backup

If you have the Luxury to Take your Database offline, you could simply do that, Copy the MDF/LDF Files to the new server and attach it anew there. (don't forget to reactivate your database on the source server).

Author Comment

ID: 38770875
The export import seems to easy. Any issues with that.

Expert Comment

ID: 38771827
Not that I know of. Have fun exporting :)
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!


Author Comment

ID: 38772477
Well I cant get these to work.
Import / Export gives me all kinds of errors
Restore from other database errors out as well.

All I want to do is have all the data in my tables and views to be the same. Please help have to have this done today!

Expert Comment

ID: 38772647
Please elaborate on the Errors you get while exporting the Database

Author Comment

ID: 38772906
When I import - export I get this:
 Validating (Error)
Error 0xc0202049: Data Flow Task 1: Failure inserting into the read-only column "TimeStamp".
 (SQL Server Import and Export Wizard)
Error 0xc0202045: Data Flow Task 1: Column metadata validation failed.
 (SQL Server Import and Export Wizard)
Error 0xc004706b: Data Flow Task 1: "component "Destination - AbcAnalysis" (79)" failed validation and returned validation status "VS_ISBROKEN".
 (SQL Server Import and Export Wizard)
Error 0xc004700c: Data Flow Task 1: One or more component failed validation.
 (SQL Server Import and Export Wizard)
Error 0xc0024107: Data Flow Task 1: There were errors during task validation.
 (SQL Server Import and Export Wizard)
When I restore I get this:
TITLE: Microsoft SQL Server Management Studio

Restore failed for Server 'sysprosrv'.  (Microsoft.SqlServer.SmoExtended)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600.1+((KJ_RTM).100402-1539+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476


System.Data.SqlClient.SqlError: The tail of the log for the database "SysproCompanyTest" has not been backed up. Use BACKUP LOG WITH NORECOVERY to backup the log if it contains work you do not want to lose. Use the WITH REPLACE or WITH STOPAT clause of the RESTORE statement to just overwrite the contents of the log. (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600.1+((KJ_RTM).100402-1539+)&LinkId=20476


LVL 10

Expert Comment

by:Monica P
ID: 38787117

Use this tool to make ur job much easier..I am in Use of this ..


Install this ..Take a Backup of local or remote Database and restore it in Remote or local Database

Before restoring create Restoring Database Name and then restore..

Just give a try on thiss

Author Closing Comment

ID: 38837078
I have tested what you sent on a differnt database and it worked. The database I needed this on has some files attahed to it that the vendor did not tell me about so it will not copy over with out them doing a list of procedures to unlock these files.


Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
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…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how the fundamental information of how to create a table.

656 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