2014-07-31 13:07:00
Topic starter
I am looking to run a command that can quickly delete the contents of a production installed database, so that we can then run the loadData.sh script to arrive at a clean, new dataset. Does this sort of script currently exist?
I think you can run the delete_data
command yourself.
What that script does is make this call:
SQLPLUS -S -L wks_yyildiz_esg_1_0/password@localhost:1521/ORCL @delete_user_data.sql
and delete_user_data.sql
does:
execute dtb.delete_data();
so you can connect to the database and run execute dtb.delete_data();
command. But I recommend you try this locally before using it in prod.
There is a stored proc which does this. From SQL Developer, run:
exec dtb.delete_data()
This deletes ALL rows from ALL tables. So I assume you know what you're doing by running this. 🙂