How do I generate random sample data in my Oracle database?
Does anyone know of a tool that can inspect a specified schema and generate random data based on the tables and columns of that schema?
Does anyone know of a tool that can inspect a specified schema and generate random data based on the tables and columns of that schema?
Another alternative is Swingbench Data Generator
It is useful to use the SAMPLE clause (for example generating order lines for a random combination of orders and products)
This is an interesting question. It is easy enough to generate random values - a simple loop round the data dictionary with calls to DBMS_RANDOM would do the trick.
Except for two things.
One is, as @FrustratedWithForms points out, there is the complication of foreign key constraints. Let's tip lookup values (reference data) into the mix too.
The second is, random isn't very realistic. The main driver for using random data is a need for large volumes of data, probably for performance testing. But real datasets aren't random, they contain skews and clumps, variable string lengths, and of course patterns (especially where dates are concerned).
So, rather than trying to generate random data I suggest you try to get a real dataset. Ideally your user/customer will be able to provide one, preferably anonymized. Otherwise try taking something which is already in the public domain, and massage it to fit your specific requirements. The Info Chimps are the top bananas when it comes to these matters. Check them out.