Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

Want to be able to create or view database diagrams
Our MS SQL (SQL Server 2000) DBA has database privileges locked down
pretty tightly.  We end users/developers do not have administrator
privileges for most databases.  That arrangement has worked out OK for
the most part.  However, it's a bit aggravating that we can't even
create our own database diagrams.  When we attempt to do so (in
Enterprise Manager), we get a dialog that says "You do not have
sufficient privilege to create a new database diagram."

Our DBA is so busy that it's difficult to get them to create ones for
us.  And even when they do, it seems that we can't even view it online
-- we rely on the DBA to give us printed copies or screenshots for our
documentation.  How ridiculous is that?  We'd also like to be able to
manipulate the diagrams online so that we can more easily study our
table structures, indexes, foreign key constraints, etc.  In fact,
there doesn't even seem to be any other way to easily view current
foreign key constraints.

I realize that this might have to do with the diagramming tool having
the ability to actually manipulate the database in ways we aren't
supposed to do (e.g., like creating new tables).  However, isn't there
a "read-only" version of this tool that will give us what I'm looking
for?  Short of that, are there any other free or cheap tools that will
provide this?  Thanks!

(Please forgive my ignorance if this has been hashed out before.
However, I did search news groups and the web before posting, figuring
this had been covered before, but I didn't find anything that
specifically addressed this issue.)


Report this thread to moderator Post Follow-up to this message
Old Post
teedilo@gmail.com
01-21-06 01:24 AM


Re: Want to be able to create or view database diagrams
I was able to create a diagram using Enterprise Manager for SQL Server
2000 SP4, when logged as a user which has db_datareader and
db_datawriter roles. I got the following warning at start:
"You are not logged on as the database owner or system administrator.
You might not be able to save changes to tables that you do not own.
Certain edits require CREATE TABLE permission".

As long as the relationships (foreign keys) between the tables were
already created, I was able to arange the tables and save the diagram
without any problem. If I added two tables that are related using a
foreign key, the line between the tables appeared. If you want to see
what foreign keys are created for a table, right click on the table and
choose Relationships. You can also see this way the indexes and the
check constraints defined on the table.

However, if I want to draw a new relationship (even if I uncheck
"Enforce relationship"), this would require creating a foreign key, so
I would need permissions to ALTER TABLE. This permissions are granted
to: the table owner, members of the sysadmin fixed server role, and the
db_owner and db_ddladmin fixed database roles.

My suggestion is to ask the DBA to make you member of the db_ddladmin
role, if you have the responsability of creating foreign keys in the
database. This will allow you to create, alter or drop any object in
the database (but you will not be able to grant any priviledges to
other users).

If you are not allowed to create/modify the foreign keys, you can use
the diagramming tools only as long as you are satisfied with the
relationships (foreign keys) that are already created. If you want to
draw new relationships between the tables (without creating foreign
keys for them), you would have to use another tool (I will let others
respond about which tools are suitable for this purpose).

Razvan


Report this thread to moderator Post Follow-up to this message
Old Post
Razvan Socol
01-21-06 08:23 AM


Re: Want to be able to create or view database diagrams
Razvan -- Thank you so much for your thourough and informative reply.
I ran the "EXEC sp_helpuser" command for the user account in question,
and it appears that it already has db_datareader and db_datawriter
roles assigned -- those were in fact the only two roles returned by
this command.  Were those the only two roles you had assigned when you
tested this?

I'm afraid that our DBA probably won't assign roles other than those
two for this user account.  They don't want to give us the ability to
create foreign key constraints, or anything structural -- we can only
manipulate the data.  And we're basically OK with that, but we'd still
like to create or at least view diagrams.  :-(  Any other ideas?
Thanks.


Report this thread to moderator Post Follow-up to this message
Old Post
teedilo@gmail.com
01-21-06 06:23 PM


Re: Want to be able to create or view database diagrams
Actually, I just figured out that visio (for which everyone here has
licenses) has some pretty decent database reverse engineering features.
I was able to use it to develop my own database diagram that is pretty
much the same as what Enterprise Manager's diagramming tool provides.
While it might still be nice to have access to EM's tool, it ooks like
Visio will essentially satisfy my needs.  Case closed.


Report this thread to moderator Post Follow-up to this message
Old Post
teedilo@gmail.com
01-22-06 01:23 AM


Sponsored Links





Last Thread Next Thread
Post New Thread

Microsoft SQL Server forum archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 04:06 AM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006