Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am using an oracle database and want to generate test data from a live database, but I do not want to copy the whole database content.

Given a database DB(S, D) consisting of the database schema S (everything described with DDL (tables, columns, constraints,...)) and data D (the actual data in the db, everything described with DML), a query Q and a result set R that is the result of the query when run on the DB. In pseudocode:

R = runQuery(Q, DB(S, D))

Is there a tool which can generate data D2 such that I get the same result set R with query Q?

D2 = generateTestData(S, Q, R)
R2 = runQuery(Q, DB(S, D2))

assert(R == R2)

Is this possible in general? Can toad generate these insert statements?

share|improve this question
    
A very general and complicated problem. But I think I have an idea for something else: generateTestData(Q, DB(S, D)). Would it be of any use in your situation? –  kubanczyk Dec 2 '11 at 19:24
    
Yes, this would also be interesting. Could you please describe in more detail. (Sorry for the late reply.) –  Ben Dec 12 '11 at 11:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.