Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SSIS - best approach


SSIS - best approach

Author
Message
Mark Eckeard
Mark Eckeard
SSC-Enthusiastic
SSC-Enthusiastic (133 reputation)SSC-Enthusiastic (133 reputation)SSC-Enthusiastic (133 reputation)SSC-Enthusiastic (133 reputation)SSC-Enthusiastic (133 reputation)SSC-Enthusiastic (133 reputation)SSC-Enthusiastic (133 reputation)SSC-Enthusiastic (133 reputation)

Group: General Forum Members
Points: 133 Visits: 505
Hi all,

I'm in need of copying tables from DatabaseA to DatabaseB, both of which reside on the same server. This is needed to get the proir days data in to a reporting database (DatabaseB).

A restore would be easy but there are database objects exclusive to DatabaseB and they would get overwritten.

What's the best approach in my scenario? There are dozens of tables that need to be moved and I need the data to identical. I don't know the data well enough to determine what has changed and get just that data. That's why I'm thinking of copying all the tables.

Thanks,
Mark



Richard Warr
Richard Warr
SSCrazy
SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)

Group: General Forum Members
Points: 2578 Visits: 1983
Mark Eckeard (6/25/2013)
Hi all,

A restore would be easy but there are database objects exclusive to DatabaseB and they would get overwritten.



If there aren't too many of these you could copy them to DatabaseC, then restore DatabaseA over DatabaseB and finally copy them back in from DatabaseC.

_____________________________________________________________________
MCSA SQL Server 2012
Tom Van Harpen
Tom Van Harpen
SSC-Addicted
SSC-Addicted (440 reputation)SSC-Addicted (440 reputation)SSC-Addicted (440 reputation)SSC-Addicted (440 reputation)SSC-Addicted (440 reputation)SSC-Addicted (440 reputation)SSC-Addicted (440 reputation)SSC-Addicted (440 reputation)

Group: General Forum Members
Points: 440 Visits: 1056
I would agree with that, you could also skip database c and just overwrite database B and run the SQL statements to recreate/modify the objects that are different or dont exist from database A. only issue would be changes.... dont want to be revisiting this thing all the time.

I would look at what is different and determine if it actually needs to be in database B. You could do your restore to database B and in database C change whatever those things are to point to database B.

Example if you have sprocs that modify the data or views you use to read the data just keep that stuff in database C. Use database C as sort of an access point to get to database B. Then you can run your restore without the need to change anything in database B.

hth - tom
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search