简体   繁体   English

Azure Powershell - 重命名 PostgreSQL 服务器实例的数据库

[英]Azure Powershell - rename Database for PostgreSQL Server instance

We have a Database for PostgreSql Server resource in Azure, with Locally redundant backup option set for Point in Time restoration as needed.我们在 Azure 中有一个用于 PostgreSql Server资源的数据库,并根据需要为时间点恢复设置了本地冗余备份选项。

When restoring - a new server name is specified as part of the process.恢复时 - 指定一个新的服务器名称作为该过程的一部分。
Is there a way to rename the Server Name using Azure Powershell, post restore?有没有办法在还原后使用 Azure Powershell 重命名服务器名称?

If not - is there any other known method to achieve that?如果没有 - 还有其他已知的方法可以实现吗?

(the reason for asking is to test Disaster Recovery options, without losing original Server Resource, whilst maintaining the same server name) (询问原因是为了测试灾难恢复选项,不丢失原始服务器资源,同时保持相同的服务器名称)

You cannot rename Database for PostgreSQL Server instance.您不能为 PostgreSQL 服务器实例重命名数据库。

But you can rename Azure SQL database through powershell by using the following command.但是您可以使用以下命令通过 powershell 重命名 Azure SQL 数据库。

Ex:前任:

Set-AzSqlDatabase -ResourceGroupName "GroupAzure" -ServerName 'mysql1000' -DatabaseName 'DemoDB' -NewName 'DemoDatabase'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM