Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: SQL-Server-2008
hello friends,
I want to generate script to move DB entities from one DB to another.
I have 3 different servers (development, test and live)
I will generate script on development server, this script should be common to all servers
I tried following
DB->Tasks->Generate Scripts..
It opens script generating wizard
In this wizard i select entities and select types of data to script option to
Schema and data
Problem is, all 3 server will have different data so running this script will copy wrong data
Any idea how to do it..?
Thanks in advance
Posted 15-Oct-12 21:31pm
@AmitGajjar at 16-Oct-12 2:33am
So do you want to synchronize database or just want to copy from source to destination and ignore conflicted one ?
dhage.prashant01 at 16-Oct-12 2:47am
I want to move the as it is table from one DB to another, including all constraints
Even i want to change the name of table, it should be prefix with RR_TableName
Any idea how to do it??
@AmitGajjar at 16-Oct-12 2:49am
If you have linked server then you can directly write select....insert statement to insert record in another table.
dhage.prashant01 at 16-Oct-12 2:59am
I have 100 tables, it will be tedious task
Any automation??
@AmitGajjar at 16-Oct-12 3:01am
see my answer, also let me know if mirroring is possible.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Write your own stored procedure to to the job as you need and call that from the agent task.
dhage.prashant01 at 16-Oct-12 2:59am
Any link for reference?
Zoltán Zörgő at 16-Oct-12 3:27am
Any google? Reference for what: for how to make a stored procedure that transfers the data ( or how to make the job start a stored procedure (
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Check[^] discussion. although i have not tested but you can try it.

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

  Print Answers RSS
0 OriginalGriff 7,215
1 DamithSL 5,114
2 Maciej Los 4,866
3 Sergey Alexandrovich Kryukov 4,747
4 Kornfeld Eliyahu Peter 4,514

Advertise | Privacy | Mobile
Web01 | 2.8.141223.1 | Last Updated 16 Oct 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100