简体   繁体   中英

How can I copy tables from one SQL Server database to another using Visual Studio 2010 & SQLEXPRESS

I have two *.mdf databases and trying to copy the ASP.NET membership tables from one to the other.

I have tried the data\\schema compare tool which I am either not using correctly or it won't find anything to add\\update for some reason.

Publish to provider created an sql file with the data and schema. Don't know how I can use it from within VS to pull some tables I need and add to another existing database.

Is there a console or something I can launch a query from for SQL Server Express to copy tables from one of the db's in its DATA directory to another ?

Update: Just used the import/export data wizard. It finally copied all my tables without error but for some reason did not retain the relationship data/foreign keys. The tables that I copied over to the other database did not exist on the database, so no type conflict could arise but it still didn't copy the diagram and relationships.

是否需要实时复制?我已经编写了将数据从Sqlserver复制到MySql的代码,但是它是实时的,如果您不希望实时复制数据,则必须使用Migration工具包。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM