I have lots of tables and I know there are relationships between them because I can see some of them from Microsoft AX AOT. When I go to SQL server management studio and use database diagrams option I can add the tables I want but I cant see relationships? How can I see them?
Asked
Active
Viewed 1,754 times
0
-
1If no relationships show up in the diagram, they probably don't exist. You may for example have an id in a table that relates to another table, but there may not be a foreign key relationship to actually join them, meaning a relationship is implied but doesn't actually exists. Check to see if table keys exist – Tanner Jul 18 '14 at 11:00
-
Tanner is correct here. If they do not appear in the diagram they do not exist as foreign keys in the database. Try this query. select * from sys.foreign_keys. This is a start but could be expanded considerably based on what you find. – Sean Lange Jul 18 '14 at 13:30
2 Answers
1
If you're interested in table diagrams, and you have both AX 2012 and Visio installed, you can go to AX → Tools → Reverse engineer → Visio UML data model.
Or just right-click an AX project with tables → Add-Ins → Reverse engineer.
More info online: http://msdn.microsoft.com/en-us/library/aa499193.aspx

10p
- 5,488
- 22
- 30
0
If you are using Management Studio 2008 :
Expand the root Database, try and expand the Database Diagrams folder, it should say something like "no diagrams".
If it asks you to create a diagram say yes, then add the tables.
If not, right on Database Diagrams folder and create new Diagram.
-
Yes I have done that already and added tables I wanted to the diagram. But I dont see relationships between them. – Henrik R Jul 18 '14 at 09:37