Scripting of dependent objectsq

V

V T

Hello,

I am using Visio for ER database modelling and generating a SQL Server 2005
db from that model.

What I noticed, that generated DDL script fails because the order of create
statements does not respect dependency between objects.

e.g.
I have View1 based on table and View2 based on View1. If "CREATE View2"
statement is above "CREATE View1" statement in DDL script then script
obviously fails.

Similar problem but more likely to occur is dependency of stored procedures
(one sp has exec statement of another calling another sp).

My question: Since Visio itself cannot parse the code and detect those
dependencies, is it possible to set-up manually those dependencies or at
list control the order in which objects appear in ddl script.

Thanks,
VT
 
C

chrisb

You can re-order the tables and views in the tables and views list. By
default, they're sorted alphabetically, r-click and turn off sorting.
Then you can drag and drop to change the order.
Chris.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top