Click here to Skip to main content
15,892,737 members
Articles / Database Development / SQL Server

Simple data export

Rate me:
Please Sign up or sign in to vote.
3.59/5 (7 votes)
9 Oct 2008CPOL4 min read 28.8K   136   21  
Simple export of data from database a to database b using identical tables (SQL Server).
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
	<connectionStrings>
		<!-- Require source and target connection strings -->
		<add name="SOURCE" connectionString="Persist Security Info=True;User ID={USER_ID};PASSWORD={PASSWORD};Data Source={DATA_SOURCE};Initial Catalog={INITIAL_CATALOG};" providerName="Sql.Data.SqlClient" />
		<add name="TARGET" connectionString="Persist Security Info=True;User Id={USER_ID};Password={PASSWORD};Data Source={DATA_SOURCE};Initial Catalog={INITIAL_CATALOG};" providerName="Sql.Data.SqlClient" />
	</connectionStrings>
	<appSettings>
		<!-- Tables that require 'set identity_insert [tablename] on' should set value  to true -->
		<add key="Table1" value="true" />
		<add key="Table2" value="true" />
		<add key="Table3" value="false" />
		<add key="Table4" value="true" />
	</appSettings>
</configuration>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions