Today I'd like to share with the way how to create Entity-Relation Diagram in Visio 2007, from SQL 2008 (which natively don't so like each other) .
While you create ERD in SQL, it's not so complicate, but what if you want share your ERD with some one who has no ability to look at your DB? Create Visio (*.vsd).
Well, the steps are next:
1. Open your Visio 2007.
2. Open "File-New-Software and Database-Database Model Diagram(metric)" (metric – because we use metric system, in other countries – you can choose appropriate measuring system).
3. On toolbar find "Database" button, click and choose "Reverse Engineer".
4. Click it, there opens a window, where you should select "Generic OLE DB Provider" (this is the trick – because according to Microsoft – Visio 2007 does not support SQL 2008 for this very specific feature (I checked it here for example http://social.msdn.microsoft.com/forums/en-US/sqltools/thread/051ffce7-0638-4921-9f92-35c56a1d1ef4/)), then press "Next" where you should choose Microsoft OLE DB Provider for ODBC drivers (maybe other options do work – didn't check ’em all 🙂 )
5. In next window you need to configure connection properties for your server.
6. After configuring connection – you'll get three windows, where you should choose all DB Objects relevant for your diagram (stored procedures, tables etc')
7. In a last window you'll be asked rather create Visio Shapes immidiately, or you will create them later (I choosed immidiately), press finish.
8. After those actions – you should have nicely created VSD with relations of your DB.
Have a nice day!