Re: Bug in Visio?

From: Daniel Brodsky (danbrodsky_at_earthlink.net)
Date: 02/26/04


Date: 26 Feb 2004 08:00:29 -0800

The bug is in Visio's use of the database stroed procedure
sp_MShelpcolumns.

A work around is to modify the stored procedure witht he following
code after the "as":

------------------------------
--Visio Bug Fix db(2/25/2004)
declare @myTableOwner varchar(64)
select top 1 @myTableOwner=u.name from sysobjects s, sysusers u where
s.uid=u.uid and s.name=@tablename
set @tablename = @myTableOwner + '.' + @tablename
------------------------------

Note that it will only work if table names are unique. Otherwise it
will only return information on the first instance of that table.

v-yshao@online.microsoft.com ("Yuan Shao") wrote in message news:<a5ut15g5DHA.4028@cpmsftngxa07.phx.gbl>...
> Hi Inge,
>
> Thanks for your post. According to your description, I understand that you
> want to verify if this issue is a BUG. The issue was reverse engineering a
> SQL database, with objects owned by
> non-dbo users. Visio would then give the following error:
>
> Error! Cannot extract column definition for the table/view 'TestTable'. The
> definition is not available or you may not have sufficient privileges.
> Please check with your database administrator.
>
> If I have misunderstood, please feel free to let me know.
>
> Based on my research, this is a known issue of Visio. The gist of this
> known issue is the tables which are owned by objects other than the DBO
> object are NOT Reverse Engineered by Visio. The resolution of this problem
> is changing ownership of the Tables and other objects (Stored Procedures,
> etc.) so that the DBO is the owner. The cause of this problem is that Visio
> is unable to Reverse engineer Tables which are not owned by the DBO object.
>
> Thanks for posting in the community.
>
> Best wishes,
>
> Michael Shao
> Microsoft Online Partner Support
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.



Relevant Pages

  • Re: configuration tool
    ... the database table name which ASP.NET SqlProvider ... stored procedure code since ASP.NET providers that deal with SQL Server ... The database contains both dbo. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Simple question
    ... prefixing the owner of an object is a good idea. ... > database you want to look in to find the Employees table. ... > that is owned by dbo. ... In the case of a stored procedure or function, ...
    (microsoft.public.sqlserver.programming)
  • Re: Simple question
    ... Let's say you're connected to the database. ... database you want to look in to find the Employees table. ... that is owned by dbo. ... In the case of a stored procedure or function, ...
    (microsoft.public.sqlserver.programming)
  • Re: Extended Stored Procedure: Get the current db of the client
    ... with the caveat that you don't recommend it because Microsoft ... of a stored procedure versus umpteen of the same stored procedure spread ... I am not going after Gert Sue. ... the database context as a parameter if you need it, ...
    (microsoft.public.sqlserver.odbc)
  • Trying to set up a SQL Server Agent Account and I hit a wall....
    ... Our database is on SQL Server 2005, however it is set to compatibility mode ... You may need to set the compatibility level ... of the current database to a higher value to enable this feature. ... for the stored procedure sp_dbcmptlevel. ...
    (microsoft.public.sqlserver.security)