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

Data copy Expand / Collapse
Author
Message
Posted Thursday, June 27, 2013 12:48 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Wednesday, December 17, 2014 12:30 AM
Points: 1,804, Visits: 783
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





Post #1467972
Posted Thursday, June 27, 2013 3:01 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 10:40 AM
Points: 2,480, Visits: 3,023
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’! **
Post #1468030
Posted Thursday, June 27, 2013 7:39 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Wednesday, December 17, 2014 12:30 AM
Points: 1,804, Visits: 783
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 and Oracle support and less than supportive !!!


Hope this helps...

Ford Fairlane
Rock and Roll Detective





Post #1468152
Posted Thursday, June 27, 2013 7:48 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 10:40 AM
Points: 2,480, Visits: 3,023
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’! **
Post #1468159
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse