|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: 2 days ago @ 6:41 AM
Points: 4,
Visits: 34
|
|
Hi,
I have 2 databases - one Development and one Production. About 50 applications insert data into Production DB. I would like to test my Development DB and insert the data that go into Production into Development DB as well.
What is the best way how to do it?
Thanks kurin
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Wednesday, April 24, 2013 5:02 AM
Points: 2,365,
Visits: 1,825
|
|
Are both the databases identical in every way - table structures , constraints etc How much data are you looking at?
I assume you would want to port the data from production to development. You could use SSIS or BulkImport.
"Keep Trying"
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: 2 days ago @ 6:41 AM
Points: 4,
Visits: 34
|
|
The structure is identical. What I want to test are new triggers and scheduled tasks.
Data are inserted into Production DB every minute from different applications. For each insert trigger is fired. When new row is inserted into Production DB I want to insert the same row into Development DB as well and that way test new triggers and performance.
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Wednesday, April 24, 2013 5:02 AM
Points: 2,365,
Visits: 1,825
|
|
Hi
Why do you want to insert the production data in to development. ? And what are the triggers for? Do they have any purpose other than inserting data into devlopment db.
Is it possible for you take a backup of the production db and restore in development. These triggers will slow down your production system.
"Keep Trying"
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Friday, May 10, 2013 11:59 AM
Points: 445,
Visits: 896
|
|
This does not sound like a good idea, as the other posters say, you should import the data into development from your production system using SSIS or a bulk method.
But to answer the question better, we need a bit of background information; What are the triggers you want to test? What do they do? Why do you want to get the data into development?
----------------------------------------------- SQL Server posts at my blog, Grapefruitmoon.Net
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: 2 days ago @ 6:41 AM
Points: 4,
Visits: 34
|
|
Background: From few manufacturing lines i'm getting data every minute. There are few triggers those fire on insert and they do some calculation and based on them they insert data into new table, send email etc.
I know it's not the best way to do it. But its the way it has been done... I want to change it to work better, remove most of the triggers and replace them with sheduled tasks and so on.
Because this change is quite big, so I would like to test it for a while. The best way for me is to insert real production data (as they are comming from the manufacturing line) into my development DB and see how it behaves and if the performance is better or not.
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 4:39 PM
Points: 6,260,
Visits: 1,977
|
|
I think you want to probably capture an SQL "trace" and then replay it on the "development" database at will.
* Noel
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Wednesday, April 24, 2013 5:02 AM
Points: 2,365,
Visits: 1,825
|
|
Do you mean to say insert real time production data into development db. Then how will you put the data back to production?
What i would suggest is
Create a development db as close to production db. Simulate the same kind of activity that happens on production in your development environment. Make the changes and test it properly If test goes fine deploy to production.
"Keep Trying"
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: 2 days ago @ 6:41 AM
Points: 4,
Visits: 34
|
|
noeld (12/3/2008) I think you want to probably capture an SQL "trace" and then replay it on the "development" database at will.
THX man!! That wont be easy to automaticaly process the trace script, but it is worth a try.
|
|
|
|
|
UDP Broadcaster
      
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 6:45 AM
Points: 1,441,
Visits: 2,485
|
|
Here's what you might do.
Take a backup from production and restore it as a TEST database. Then run Profiler on the production db and save the trace to a new table in the TEST db. There are 100's of events that you can trace, but you'll probably be most interested in the T-SQL events like Statement start / end, Batch start / end and so on.
Then, you can go into your TEST db and review the trace table. You can copy the SQL statements from the trace table and execute them one-by-one in your TEST db.
Profiler will have some impact on the performance of the production db so you'll probably want to run it only for brief periods, but during times of fairly high activity so you can get a complete picture of the workload.
|
|
|
|