set echo on
--
@@deleteSchema
--
-- Create home directory for target user...
--
call xdb_utilities.createHomeFolder()
/
declare
  res boolean;
begin
  if (dbms_xdb.existsResource('/home/%USER%/diff')) then
    dbms_xdb.deleteResource('/home/%USER%/diff',dbms_xdb.DELETE_RECURSIVE_FORCE);
  end if;
  res := dbms_xdb.createFolder('/home/%USER%/diff');
  dbms_xdb.changeOwner('/home/%USER%/diff','%USER%');
end;
/
--
quit

