Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Group tables by schema in SSMS

In Visual Studio's Server Explorer window there's a very nice feature that lets you see the DB objects grouped by schema:

It turns this object tree:

Data Connections -> MyServer -> Tables -> MyTable (MySchema)

Into this one:

Data Connections -> MyServer -> Schemas -> MySchema -> MyTable

VS feature


I've been looking for this particular feature in SSMS but was unable to find it.

  • Does it exist?
  • If not, is there a plugin which would provide this feature?
  • Or perhaps is there a plugin which would help ease navigation in DBs which have lots of objects?

Please note I'm aware of SSMS object filters. It's better than nothing but not sufficient, as I'm often accessing objects from multiple schemas at once.

like image 280
Lucas Trzesniewski Avatar asked Jun 26 '14 08:06

Lucas Trzesniewski


People also ask

How do I list all tables in a schema in SQL?

The easiest way to find all tables in SQL is to query the INFORMATION_SCHEMA views. You do this by specifying the information schema, then the “tables” view. Here's an example. SELECT table_name, table_schema, table_type FROM information_schema.

How do I find the database schema in SQL Server Management Studio?

You can get a list of the schemas using an SSMS or T-SQL query. To do this in SSMS, you would connect to the SQL instance, expand the SQL database and view the schemas under the security folder. Alternatively, you could use the sys. schemas to get a list of database schemas and their respective owners.

What is schema folder?

The directory schema describes the types of data that can be stored in a directory. During schema design, each data element is mapped to an LDAP attribute, and related elements are gathered into LDAP object classes. Well-designed schema helps maintain data integrity.


2 Answers

If you want a free tool, SSMS Schema Folders (GitHub repo) is your solution. It does the job beautifully.

Folder per each schema

like image 196
Rafet Avatar answered Sep 20 '22 06:09

Rafet


I love the idea of grouping by schema.

SQL Treeo SSMS Addin is an inexpensive tool that allows you to create your own table structure in the Object Explorer.

like image 20
David Atkinson Avatar answered Sep 19 '22 06:09

David Atkinson