Hi,
I have been tasked to document/show/create the relationship of all tables in a CRM Database. I generated the script from the entire database (SQL Server 2005) and I can see from the script all the primary/foreign keys and its corresponding constraints of each table. Please see sample script below that I cut and pasted:
Now, what I want to see is the Entity Relationship in graphical form.
Is there a way of doing this in SQL Server 2005?
Thanks in advance for your help.
Mike
I have been tasked to document/show/create the relationship of all tables in a CRM Database. I generated the script from the entire database (SQL Server 2005) and I can see from the script all the primary/foreign keys and its corresponding constraints of each table. Please see sample script below that I cut and pasted:
Code:
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[RSys_Last_Id]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[RSys_Last_Id](
[TblName] [varchar](30) NOT NULL,
[LastIdValue] [binary](8) NULL,
CONSTRAINT [SRSysLastId] PRIMARY KEY CLUSTERED
(
[Table_Name] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
END
Now, what I want to see is the Entity Relationship in graphical form.
Is there a way of doing this in SQL Server 2005?
Thanks in advance for your help.
Mike