1. Direct the output of the statement to file1.sql
unload to file1.sql
select name from sysmaster:sysdatabases where name not in ('sysmaster','sysutils','sysusers');
2. Prefix drop syntax
sed 's/^/drop database /' file1.sql > file2.sql
3. Substitute | with ;
sed 's/|$/;/' file2.sql > file3.sql
4. Review the statements (destructive in nature, be careful!) and execute it.
dbaccess - file3.sql
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.