Rename a database

If you are logged in as the admin user or the owner of a database, you can rename the database by using the ALTER DATABASE command. The data remains of the same type and size.

For example:
MYDB.SCHEMA(USER)=> ALTER DATABASE mydb RENAME TO newdb;
ALTER DATABASE

After you rename a database, recompile any views that are associated with that database. The system converts any materialized views in the database to regular (non-materialized) views.