Renaming Fabric SQL-endpoints in SSMS

Renaming Fabric SQL-endpoints in SSMS

One of the many qualities of OneLake in Microsoft Fabric is, that it automatically builds SQL Analytics Endpoints for all your delta-tables.

In AP Pension, we have a lot of SQL users, who work in Management Studio (SSMS). A very useful feature in Microsoft Fabric is therefore the ability to copy a connection string for the SQL-endpoints and let the users connect to the data in OneLake like if it were a SQL Database, like they are accustomed to.

Copy SQL connection string from Workspace

There is a unique connection string for each workspace, which makes perfect sense. However, at the moment, there is no easy way to change the connection string to make it readable to the human eye. If you are only working with one workspace at a time in SSMS, it doesn’t really matter but if you work with data in more than one workspace, the autogenerated connection names become really tiresome.

Consider the following (realistic) example, where we have 3 workspaces in Microsoft Fabric: Development and Test (that run on the dev-capacity) and production, that run on the production capacity.


Workspaces in Fabric

When working in the Fabric GUI, you are never in doubt about which workspace, you are working in, but in SSMS it is very hard to determine which is which … even if the full names are not anonymized like they are in the screenshot below.


Connectionstrings in SSMS without the use of Registered Servers

To get around this problem, we have found it useful to use an old SSMS feature: Registered Servers.

Servers can be registered manually by opening the Registered Serves Window and making Server and Server Group Registrations, but as I will show later, the process can also be automated via scripting.


View Registered Servers

In the Registered Servers window, you can create new server groups and register specific servers within these groups.


Create new server group

Here I create a server group called Fabric


And within this group, I register the SQL Analytical endpoints for my dev, test and prod workspaces for APData


Registered Servers APData in SSMS

Servers need to be registered with a valid user and can be given a readable name and description. The connection string is copied from the relevant Fabric workspace and entered under "Server name”.

Once saved, registered server will be available whenever SSMS is launched.


Setting up a registered server

Although the registered server name is displayed in SSMS, there can still be some difficulty navigating between open queries against different workspaces in SSMS, since the connection name and not the registered server is dispalayed as the connection at the bottom of the SSMS window.

Therefore we also recommend to update the color scheme for the connections under the tab Connection Properties. A suggested color scheme could be white for dev, grey for test and red or black for production


Adding a custom color to your connection

... and the end result is seen below, where I as a user have all three connections open, and can see, that I am currently querying APData (test)... both from the header and the color of the footer.

Querying the SQL endpoint belonging to the Fabric workspace APData (test)

The registration of servers can also be managed centrally or imported from a script. There is a lot of documentation on this on-line, but I feel that the best way to get acquainted with the notation is to export the scripts, that we have just created, and look at them.


Export registered servers

Importing a registered server is just a matter of pointing to the supplied .regsrvr-file. If the file is manually created by another user, there may be a need for changing the username before saving the result.


Importing registered servers

In AP Pension, we are currently working on a method for automatically generating and distributing the relevant .regsrvr-files for our SQL users as part of our metadata-driven data delivery framework … but more about this later.


?


Hans J?rgen Pedersen

Senior Business Analyst in Business Intelligence and Decision Support

7 个月

Nice idea!

要查看或添加评论,请登录

Jacob R?nnow Jensen的更多文章

  • Going live with the AP Enterprise Fabric

    Going live with the AP Enterprise Fabric

    Some of the most complex projects often start with a simple idea. Noel Yuhanna from Forrester came up with the term Big…

    3 条评论
  • Translating legacy code with GenAI

    Translating legacy code with GenAI

    Introduction Analytics has been a commercial battleground for decades in the financial sector, and the need for data…

    18 条评论
  • SQL Databases in Fabric?

    SQL Databases in Fabric?

    Introduction Much like a thermos that can keep both hot liquids hot and cold liquids cold (but not at the same time)…

    6 条评论
  • Fabric Workspace design for automation and Data Delivery in AP Pension – Part 2

    Fabric Workspace design for automation and Data Delivery in AP Pension – Part 2

    In Part 1 of this article, I discussed the approach, we in AP Pension have taken to workspace design for data delivery…

    19 条评论
  • Fabric Workspace design for automation and data delivery in AP Pension – Part 1

    Fabric Workspace design for automation and data delivery in AP Pension – Part 1

    In AP Pension, we have been working some time on building a modern data platform, AP Data, with Microsoft Fabric and…

    4 条评论
  • Being responsible for data in OneLake

    Being responsible for data in OneLake

    “OneLake is the OneDrive for your data!”. As a user, I understand what it means, and I have seen (and done) countless…

    2 条评论
  • Introducing Mirroring in Fabric

    Introducing Mirroring in Fabric

    At the first anual Microsoft Fabric Community Conference, Microsoft announced that Mirroring is now in Public Preview…

    6 条评论
  • Learning from the future as is emerges

    Learning from the future as is emerges

    A structured and democratized approach to analytical data is one of the cornerstones of AP Pension’s digital strategy…

  • The 2023 Ignite Book of News

    The 2023 Ignite Book of News

    With more than 100 announcements, Microsoft Ignite is pretty intense this year – and if you haven’t already seen Satya…

  • Putting Fabric to the test

    Putting Fabric to the test

    Having worked most of my professional career with data warehouses on the Microsoft platform and Fabric for about a…

    17 条评论

社区洞察

其他会员也浏览了