Database Cloning Missing Temp Datafiles

I don’t pretend to be an Oracle DBA but I can fuddle my way through most of it without too much of an issue, but there are some really odd things with how Oracle works that drive me crazy.  One of the things that drives me crazy is cloning.  In SQL Server I can clone a database very easily and usually very quickly.  Oracle NOT so much.  I have written a procedure to follow for cloning in the past that is missing a very critical element so I am updated that post and also writing it here for future reference.

When I clone the database I simply copy my data directory with houses my temp and perm tablespaces, and the recreate statement I use puts all the permanent tablespaces back in, but the temporary ones need to be re-added as well.  This can be done with the command:

ALTER tablespace {TableSpaceName} add TEMPFILE ‘{Directory Path/TableSpace.dbf}’ reuse;

If you look in the dump file that is mentioned in the cloning post, at the bottom you should find the TEMPFILE reuse statements for the database.  Just copy them and change the paths and add that to the create script or run the steps manually in sqlplus and you will be good to go!