Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SSIS - best approach Expand / Collapse
Author
Message
Posted Tuesday, June 25, 2013 7:58 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, August 20, 2014 5:24 AM
Points: 128, Visits: 490
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



Post #1467163
Posted Tuesday, June 25, 2013 8:09 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 9:57 AM
Points: 2,141, Visits: 1,738
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.
Post #1467175
Posted Tuesday, June 25, 2013 8:56 AM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Thursday, September 18, 2014 9:33 AM
Points: 407, Visits: 968
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
Post #1467215
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse