How to Rename Redshift database

You cannot change the name of a database that you are currently connected to. To rename a database, login as a superuser or the database owner with CREATEDB privilege. Below is the command to rename a database where current_db_name is the name of the database and new_db_name is the new name.

ALTER DATABASE current_db_name RENAME TO new_db_name;

See also  How to view all active sessions in Redshift database

Leave a Reply

Your email address will not be published. Required fields are marked *