views:

172

answers:

6

I installed SQL Server 2005, and I want to create a database but I can't. When I right click on the Database Diagrams folder for my database in SQL Server Management Studio 2005, I don't see any choice for creating database diagram. I see two things:

  1. Working With sql server 2000 Diagrams
  2. Refresh
A: 

Expand folder, it should prompt to install objects. Then you should be able to add diagrams.

dove
+1  A: 

The ERD diagram created by the wizard in SQL Server Management Studio is a physical ERD, not a logical one. It's not like using Oracle Designer...

You need to create your table(s) first, and relate as necessary. Once you have at least one table defined, the ability to create a Database Diagram should appear.

OMG Ponies
A: 

i can create database diagram with this database when i reinstall sql server 2005 i can't

Mojtaba
@Mojitaba: Did you reinstall SQL Server 2005, or SQL Server Management Studio 2005?
OMG Ponies
Sucks you have to have a reputation of 50 before you can comment :/
OMG Ponies
A: 

This folder doesn't expand and I created tables previously.

Mojtaba
A: 

I have tried this in the past and tried it again now after seeing this post. Here is my experience with SQL 2005 Management Studio (connected to SQL Server 2005):

  1. If you create a blank database (no tables) and click on "Database Diagrams" you are prompted with: "This database does not have the objects required to create database diagrams. Do you want to create them?"

  2. If you answer yes, you can right click on Database Diagrams node and click "New Database Diagram". The default prompt comes up with the title "Add Table". This is good if you already have tables and want to add to diagram. However, it only gives options to "Refresh". The add button though present is disabled (we do not have tables yet).

  3. Now to create a table, you can close the "Add Table" dialogue and right click in the right hand side pane and click "New Table"

  4. From hereon, the process of creating a table is intuitive. When you save the diagram, the table gets created in the database.

mishrsud
A: 

In the first place, you shoud be creating tables by writing scripts not using the GUI.

The symptoms you describe indicate the database was created as a SQL Server 2000 database and thus you cannot use the diagram creator in SSMS for 2005. If you feel you must do this with a diagram instead of with a script, then you must use Enterprise Manager. If you had clicked on the 1.Working With sql server 2000 Diagrams choice, then SQl Server would have told you this.

HLGEM