SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Data copy


Data copy

Author
Message
Ford Fairlane
Ford Fairlane
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2234 Visits: 836
Hi,

I have been looking around bu tnot found what I am looking for as yet...

I have a production system that has the underlying database built by the application. All thables, indexes, constraints etc are all there. My porblem is that the currnet db seems to be dodgy and I need to get all the data out and into a vanilla database with all the pre built stuff - any ideas as how to get around all the constraints - pks and fks etc ?

Appreciate any and all ideas.

Hope this helps...

Ford Fairlane
Rock and Roll Detective





HanShi
HanShi
SSCarpal Tunnel
SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)

Group: General Forum Members
Points: 4456 Visits: 3672
It depends on your "dodgy" data. Why is your data 'dodgy'?

One option is to drop the keys on the target, insert all data and recreate the keys. Perhaps a better approach is to analyse all foreign keys, so you can insert all data in the proper sequence. This last approach will have an instant check on the relationships when inserting data.

** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
Ford Fairlane
Ford Fairlane
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2234 Visits: 836
Not sure why the data is "dodgy" but I am unable to use certain functions of the application against the current database but they work perfect with a newly created database. I have checked the schema's etc and everything seems ok...

I am using Primavera P6 8.2 with SQL 2008 R2 SP2 and the import / export with MS project do not work Sad and Oracle support and less than supportive !!!

Hope this helps...

Ford Fairlane
Rock and Roll Detective





HanShi
HanShi
SSCarpal Tunnel
SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)

Group: General Forum Members
Points: 4456 Visits: 3672
To transfer data you can use BCP or SSIS (create from scratch or use import/export wizard from SSMS). These perform real good. Keep in mind the key-relations between the tables or remove them temporarily.
You could also use scripts (search SSC scripts or internet) to generate INSERT commands of your data, but that will perform much slower.

Post error messages if transferring data fails to work...

** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
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