dbTalk Databases Forums  

Insert/Update tables between production and testing envts

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Insert/Update tables between production and testing envts in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bob
 
Posts: n/a

Default Insert/Update tables between production and testing envts - 11-02-2005 , 10:07 AM






Hi
I have around 7 tables that get new data or updates in the production envt
and I would like to insert/update these tables on a daily basis in the
testing environment. Can you suggest a script to do this.
Thanks
Bob

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Insert/Update tables between production and testing envts - 11-02-2005 , 02:24 PM






Can you identify the rows?

You could store the row keys in a table and the action performed thereon
so that at synchronisation time you can look to pull only the rows you
need from the production environment and you will know what action you
need to perform also.

On way of kepping things in sync is replication but I would not
recommend that between environments like this.

Allan




"Bob" <Bob (AT) discussions (DOT) microsoft.com> wrote


Quote:
Hi
I have around 7 tables that get new data or updates in the production
envt
and I would like to insert/update these tables on a daily basis in the
testing environment. Can you suggest a script to do this.
Thanks
Bob


Reply With Quote
  #3  
Old   
fleo
 
Posts: n/a

Default RE: Insert/Update tables between production and testing envts - 11-04-2005 , 01:46 PM



First identify the fields that will determine if it's a new or existing record.
Update the existing records using a JOIN with those fields
Insert the new records using a LEFT JOIN WHERE keys from destination are NULL

"Bob" wrote:

Quote:
Hi
I have around 7 tables that get new data or updates in the production envt
and I would like to insert/update these tables on a daily basis in the
testing environment. Can you suggest a script to do this.
Thanks
Bob

Reply With Quote
  #4  
Old   
arbert
 
Posts: n/a

Default Re: Insert/Update tables between production and testing envts - 11-05-2005 , 12:13 PM




Bob wrote:
Quote:
*Hi
I have around 7 tables that get new data or updates in the production
envt
and I would like to insert/update these tables on a daily basis in
the
testing environment. Can you suggest a script to do this.
Thanks
Bob *
Ya, I would avoid replication unless it's absolutely necessary--too
much overhead. Personally, I would look at setting up logshipping and
applying the changes to your development server via log restores.

Brett



--
arbert
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.