Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 EM bug?

Author  Topic 

davidfb
Starting Member

8 Posts

Posted - 2002-09-23 : 08:55:11
Hi to all,

I´ve been trying to drop a user-defined type that i´ve created, but i´m receiving this message: "Cannot drop. The data type is being used.".

1st observation: I tried to drop using sp_droptype in QA, but i received the same error.

2nd observation: There are no references to that data type.

Any tips?

David.





robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-09-23 : 09:22:01
Try this query first:

SELECT O.Name AS TableName, C.name as ColumnName FROM syscolumns C
INNER JOIN systypes T ON C.xtype=T.xtype
INNER JOIN sysobjects O ON C.id=O.id
WHERE T.name='bigint'
--change "bigint" to match the name of your user datatype

SQL Server has a somewhat notorious reputation for not fully updating dependencies. EM is even more notorious for not having all of the UPDATED information. If you get any results from the above query, it will pinpoint the table/procedure and columns/parameters that use your datatype. You can then alter the table or procedure to remove or change the columns/parameters and then drop the datatype.

Edited by - robvolk on 09/23/2002 09:23:25
Go to Top of Page

davidfb
Starting Member

8 Posts

Posted - 2002-09-23 : 09:55:27
Thanks rob..

I tried that query and..Oh My god!! It returned 534 results!
I forgot to check my stored procs.. oops..

David.

Go to Top of Page
   

- Advertisement -