Options

UserdefinedDataType changes

mensandmensand Posts: 4
edited June 10, 2009 12:08PM in SQL Compare Previous Versions
Hi is it possible to have a UserDefined referenced type changed by SQLCompare ?

For example i have the following type

EXEC sp_addtype N'FLD_INITIAL', 'varchar (10)', 'NULL'

and it needs to be changed to

EXEC sp_addtype N'FLD_INITIAL', 'varchar (12)', 'NULL'

It's used in multiple tables and StoredProcedures

The script generated by SQL Compare now runs in a error

The following error message was returned from the SQL Server:

[15180] Cannot drop. The data type is being used.

The following SQL command caused the error:

sp_droptype N'FLD_INITIAL'

The following messages were returned from the SQL Server:

[0] Unbinding types from columns
[0] Dropping [dbo].[P_T_Customer_UPD]
[0] Dropping [dbo].[P_T_ReportLocation_INS]
[0] Dropping [dbo].[P_T_MemberBatch_INS]
[0] Dropping [dbo].[P_T_MemberBatch_UPD]
[0] Dropping [dbo].[P_T_Member_UPD]
[0] Dropping types


Greetings Andre Mens

Comments

  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    SQL Compare should drop and create your UDDTs in the correct order, so my first reaction would be to ask you to check your settings and see if your "Include Dependencies" setting is on. If it is not, certain objects that need to be changed first before dropping the datatype may be left intact, causing the error.
Sign In or Register to comment.