3

I saw that you could use the new portal to create an alias for your database instance. I have already created an internal DNS to point to our Azure SQL instance but of course connecting to it wants username@randomname . How can I make an alias for the "random server name" so it is more usable for my clients?

thanks

3

Your question appears to be a duplicate of this question, but that doesn't have a formal answer which means it technically can't be a duplicate :) so I'll synthesize an answer here. As you can see in this response on StackOverflow the latest version of the Portal should allow you to set the server name. I copied the picture over from that answer for convenience.

Azure portal showing ability to edit server name

If that doesn't work you can go to this blog post as a fall back. The meat of that blog post is here:

To use a meaningful alias, what you need to do is:

  • Using SQL Server Configuration Manager, in the SQL Native Client 11.0 Configuration\Aliases node, create an alias. Pick a meaningful name (ie; HRServer) for the Alias Name, leave the port at the default (ie: 1433), leave the protocol at the default (ie: TCP/IP) and provide your real server name (ie yy2195dk1k.database.windows.net) in the Server field.
  • Create the same alias in the SQL Native Client 11.0 Configuration (32bit)\Aliases node.
  • When connecting to the server in SSMS, enter your new alias (ie: HRServer) for the Server name, SQL Server Authentication for the Authentication method, and for the login, specify your login name followed by an @ symbol, followed by the first segment of the real server name (ie: mylogin@yy2195dk1k), then enter your password.
  • If the user isn't an admin user that has the ability to connect to the master database, you'll also need to manually set the database name using the Options button. (Note that you won't be able to browse for database names).

Later in the blog's comments they state:

After all, an alias is just a registry entry and so it can be pushed out by group policy like any other registry entry.

So you should be able to push out a group policy to any other clients which should allow them to use the alias if the Azure portal method doesn't work.

Please post an answer or comment on my answer if you find this doesn't work. My answer is based on research not field experience.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.