Will altering the snowflake database name affects any DB grants and its outbound share?

Viewed 114

I have a situation where I need to rename the DB in snowflake, it has an outbound share. I can alter the database name with the below query, but will renaming affect any of the outbound share and the database grants and privileges?

alter database if exists db1 rename to db2

2 Answers

I have tested and can confirm that RENAME a database DOES NOT affect DB grants and its outbound share. All references are updated accordingly, as they are linked by ID, not by name.

However, you might need to update any VIEWs that could still reference the old database name in the VIEW DDL.

You should also be careful with DEFAULT_NAMESPACE values for users. These are stored as strings. They will not create an error, but they will also no longer default users to the correct database.

Related