Share via

using SSMS query designer with master

Pablo gil 86 Reputation points
2022-08-26T22:28:10.053+00:00

I'm trying to write a query for master using SSMS query designer, the login server role is sysadmin, I have tried to map to all database roles for master however the add table
window is always empty, you can´t see any table nor any view, please any idea.

SQL Server | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories

0 comments No comments

Answer accepted by question author

Erland Sommarskog 134.7K Reputation points MVP Volunteer Moderator
2022-08-27T07:48:39.197+00:00

I used Profiler to see what queries the Query Designer submits. The pane for tables queries sys.tabels, which only returns user tables, not system tables. The pane for views queries sys.all_views which does return system views. But there is a column IsSystemObject in the result set, and I guess the UI filters out rows where this column is 1. There is not much you can do about it.

You may not like what I will say here, but as I see it, the Query Designer is an aide for very inexperienced SQL persons. But it is something you should grow out of. When your were a kid, I guess your first bicycle was a three-wheeler or and extra supporting wheels to help you with the balance. But as you grew older and learnt to master bicycling, you stopped using them and you progressed to a normal two-wheel bicycle. And the same thing with the Query Designer. While it can be helpful in the beginning, it becomes an obstacle, because there are SQL constructs the Query Designer does not support.

Why SSMS filters out system objects, I don't know. But maybe the reasoning is that if you have become that advanced that you query system objects, you no longer need the Query Designer.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.