Re: Dependencies in Enterprise Manager

From: Dan Guzman (guzmanda_at_nospam-online.sbcglobal.net)
Date: 11/06/04


Date: Sat, 6 Nov 2004 07:30:09 -0600

I agree that SQL Server dependency management leaves much to be desired but
a sanity check is in order here. If you rename an executable (e.g.
MyApp.exe to MyNewApp.exe), do you expect you source code to automagically
get updated to reflect the change? If you rename a function or variable
name in your application program, do you expect existing references to be
changed as well?

IMO, SQL Server database objects should be treated similarly to other
application code. We keep DDL under source control so that these scripts
can be used as the master copy to promote database changes.

-- 
Hope this helps.
Dan Guzman
SQL Server MVP
"DW" <None> wrote in message news:%23AOmYr4wEHA.4040@TK2MSFTNGP11.phx.gbl...
>I have seen several cautions like "don't depend on 'Display
> Dependencies' in Enterprise Manager; it's not reliable".
>
> I have seen evidence of this in SQL 2000 -- if you rename a view, the
> associated 'text' field in the syscomments table is not changed to
> reflect the rename.  Which makes the text field in syscomments pretty
> useless.  And I think there are other causes that make 'Display
> Dependencies' can give the wrong answers, but I don't remember them all.
>
> All of this seems to be a HUGE hole in Enterprise Manager.  SQL is a
> database; why can't it keep actual track of dependencies?
>
> And why can't I rename a table, or a view, or a field in a table, and
> have all the dependent views automatically udpated to reflect the
> rename?  It seems that an enterprise-class database and its tools ought
> to be able to do this with no sweat.
>
> Is sp-depends any different than the dependencies in Enterprise Manager,
> or are they the same thing?
>
> Is there really no reliable way to find out, for example, what views or
> stored procedures in my database use field X from table Y?
>
> Thanks.
>
> David Walker 


Relevant Pages

  • Re: Who is using MSMQ?
    ... I understand about the dependencies; ... the SQL Server Service Manager are the same ones you get from the Windows ... about MSMQ and MSMQTriggers? ...
    (microsoft.public.sqlserver.security)
  • Re: Renaming DB
    ... FILENAME can be specified only for files in the tempdb database. ... file must reside in the server in which SQL Server is installed. ... If the file is on a raw partition, os_file_name must specify only the drive ... Is there a way to rename those files too? ...
    (microsoft.public.sqlserver.setup)
  • Re: Import / Ordering / Script File
    ... Basically SQL Server doesn't handle dependencies as it cannot due to the ... Database change management for SQL Server ... >> I am not sure why you are scripting and creating views in a DTS job? ...
    (microsoft.public.sqlserver.programming)
  • Re: Renaming DB
    ... As Kevin mentioned, you must detach the database, move the file, then reattach. ... you can only rename o/s files for tempdb and then it only takes effect after a restart. ... The new tempdb file name takes effect only after SQL Server is stopped and restarted. ... If the file is on a raw partition, os_file_name must specify only the drive letter of an existing raw partition. ...
    (microsoft.public.sqlserver.setup)
  • Re: Renaming DB
    ... file must reside in the server in which SQL Server is installed. ... log files should not be placed on compressed file systems. ... If the file is on a raw partition, ... Is there a way to rename those files too? ...
    (microsoft.public.sqlserver.setup)