2

Our application uses an Azure SQL Database.

Apart from our local dev setup, we have two environments:

  • Staging (for quality assurance and client testing), and
  • Production (live)

The Staging database and Production database are stored on two separate SQL Database servers. In both servers, the databases are named the same.

Problem:

Since the server names are automatically and uniquely generated (and are a bunch of randomly generated letters), it is very difficult to distinguish between Staging and Production. Screenshot from the Azure portal below:

enter image description here

This also increases the possibility of pointing to the wrong database when running change scripts, queries, etc. If it was possible to alias/rename the servers, then this wouldn't be a problem, but I know that this isn't possible.

Any suggestions? What do you do in your environment?

4

2 回答 2

3

如果您想要语音数据库 URL,您可以为 SQL Azure 服务器使用自定义 DNS 名称。

因此,您可以像这样对您的自定义域进行 CNAME:

liveDB.mydomain.com 到 random2323LIVE32323.database.windows.net

stageDB.mydomain.com 到 random43435STAGE34.database.windows.net

但有一个警告:

您仍然需要服务器名称,因为您需要以 user@random2323LIVE32323 身份登录。

无论如何...如果您使用这种情况,最坏的情况可能是拒绝登录,如果您混合了真实的服务器名称。

有关详细说明,请参见此处

于 2013-06-12T16:21:28.980 回答
1

尽管这需要更多的管理工作,但我通常会为 Stage 与 Prod 推荐不同的 Live ID。那是因为我通常希望为我的云服务设置一组不同的管理员。如果您将一个 Live ID 命名为 PRODAppName 和 STGAppName,您可以让自己成为这两个 Live ID 的共同管理员,并且只需使用门户的过滤功能,仅在您需要知道哪个服务是哪个服务时才查看 PROD 或 STG . 希望这是有道理的。

于 2013-06-13T13:15:19.310 回答