Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8624753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:36:35+00:00 2026-06-12T07:36:35+00:00

I have created a database on SQL server and a front end user application

  • 0

I have created a database on SQL server and a front end user application in winforms c#.
It’s up and running and working fine, but I’ve now been asked to set up a test version by the client for training new employees, so they can put in dummy data whilst they are trained without effecting the ‘real’ live database.

When I installed the database I had it all scripted, but things have changed since, and I don’t particularly want to script all the tables again.

Is there a fast, convenient way of duplicating the database (and its data) on the same server, but under a different name?

EDIT (subsequent to Tony Hopkinson post)

I’ve got as far as this

exec sp_addumpdevice 'Disk','MyDatabaseBackup',N'D:\MyDatabaseBackup' 
Restore Database MyDatabase From MyDatabaseBackup With File = 1, 
Move 'MyDatabase' To N'C:\Program Files\Microsoft SQL 
Server\MSSQL11.SQLE\MSSQL\DATA\MyDatabaseTEST.mdf', 
Move 'MyDatabase_Log' To N'C:\Program Files\Microsoft SQL 
Server\MSSQL11.SQLE\MSSQL\DATA\MyDatabaseTEST_log.ldf', 
NORECOVERY,  NOUNLOAD,  STATS = 10 
RESTORE LOG [MyDatabaseTEST] FROM  [MyDatabaseBackup] WITH  FILE = 2,  NOUNLOAD,  STATS = 10 
exec sp_dropdevice MyDatabaseBackup 

But I’m getting the following error message

Msg 3234, Level 16, State 2, Line 2
Logical file ‘MyDatabase’ is not part of database ‘MyDatabase’. Use RESTORE FILELISTONLY to list the logical file names.
Msg 3013, Level 16, State 1, Line 2
RESTORE DATABASE is terminating abnormally.
Msg 3154, Level 16, State 4, Line 6
The backup set holds a backup of a database other than the existing ‘MyDatabaseTEST’ database.
Msg 3013, Level 16, State 1, Line 6
RESTORE LOG is terminating abnormally.
Device dropped.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T07:36:36+00:00Added an answer on June 12, 2026 at 7:36 am

    use copy database option in SQL server management studio

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created one user named tuser with create database rights in SQL server
i have created a database in sql server. Now i want to create a
I'm working on an MVC3 project I have created my database on SQL server
I have created a WPF application that connects to a SQL Server database directly
I have created SQL Server database by Visual Studio 2010 Ultimate means in Visual
I am pretty new to C# and SQL Server database. I have created a
I have created SQL Server 2008 Database project using visual studio 2010. after build
I have a database that I have created using SQL Server Developer 2008. I
I have one SQL server database which was created using Import/Export Wizard from an
I'm new to SQL. I have created a new database in SQL Server Management

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.