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 6553427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:34:50+00:00 2026-05-25T12:34:50+00:00

I have a local SQL Server Express database that I want to copy to

  • 0

I have a local SQL Server Express database that I want to copy to a SQL Server database on a server. I do not have full permissions to the server, so I cannot directly attach it. Somebody told me I could do this by using the SqlBulkCopy[MSDN] class.

I can’t figure out how to use it. I haven’t done enough database programming to be familiar with how this sort of thing is done.

Basically, I want to copy all the tables in one database to another. There are relationships between the tables, I don’t know if that will make a difference in the copying or not. There aren’t very many, so it wouldn’t be a big deal to just copy the data and then manually reassign the relationships.

This is as far as I could go

var localDatabase = new SqlConnection("connection string");
var serverDatabase = new SqlConnection("other connection string");
SomehowCopyAllTables(localDatabase, serverDatabase);

but unfortunately, Mr. C# didn’t want to acknowledge the existence of the SomehowCopyAllTables method.

How can I copy all the tables from one database to another?

  • 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-05-25T12:34:51+00:00Added an answer on May 25, 2026 at 12:34 pm

    Use SQL Server’s Generate Scripts command within SQL Server Management Studio.

    • right click on the database; Tasks -> Generate Scripts
    • select your tables, click Next
    • click the Advanced button
    • find Types of data to script – make the choice as you like: include data or not.
    • you can then choose to save to file, or put in new query window.
    • results in INSERT statements for all table data selected in bullet 2.
    • copy/paste that output in the new query window onto your target server.

    SQL Server Generate Scripts Data

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

Sidebar

Related Questions

Assume that you have a running SQL Server Express instance named (local)\SQLEXPRESS. Its database
I have a database working in my local sql server 2005 express edition. I
I have just restored a database backup to my local SQL Server express instance.
I have a web service that stores data in a local SQL Server 2008
I have been experimenting with writing applications that use a local SQL Database to
I have a table in a database on my development(local workstation) SQL Server 2008
First a little introduction. We have an SQL Server Express 2008 database, which schema
I want to install an application (ASP.Net + SQL server 2005 express) in local
I am developing an app where i have a local database in SQL Server
Tables have been created in our SQL Server 2008 R2 database on a local server,

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.