Drop failed for DefaultConstraint


Author
Message
ChanKK
ChanKK
StrataFrame User (248 reputation)StrataFrame User (248 reputation)StrataFrame User (248 reputation)StrataFrame User (248 reputation)StrataFrame User (248 reputation)StrataFrame User (248 reputation)StrataFrame User (248 reputation)StrataFrame User (248 reputation)StrataFrame User (248 reputation)
Group: Forum Members
Posts: 190, Visits: 1.3K
Hi,



I have a scenario whereby there is a column slip with data type image which allows null and no default value is set since it allows null.



I deleted the slip column in the ddt and save. Then I create the column slip again with data type nvarchar(256) which does not allow null with default value (‘’) and save.



Then I generate the package and run the package. It tries to drop the column but failed. The reason behind it due to it tries to drop the default constraint for the slip column which does not exist in the first place since it allows null.



I’m attaching the log file as a reference for the given problem.



• 04/03/2009 7:43:12 PM   -> Deploying meta-data for database 'VfsDocumentHope'

• 04/03/2009 7:43:12 PM   -> Ensuring Filegroups exist on database 'VfsDocumentHope'

• 04/03/2009 7:43:12 PM   -> Filegroup verification complete.

• 04/03/2009 7:43:12 PM   -> Ensuring Tables exist on database 'VfsDocumentHope'

• 04/03/2009 7:43:14 PM   -> The table 'LVELeaves' is being prepared to be modified.

X 04/03/2009 7:43:15 PM   -> An error occurred while deploying the meta-data to the server.

X 04/03/2009 7:43:15 PM   -> FailedOperationException

X 04/03/2009 7:43:15 PM   -> Drop failed for DefaultConstraint 'DF_LVELeaves_Slip'.

X 04/03/2009 7:43:15 PM   -> InvalidSmoOperationException

X 04/03/2009 7:43:15 PM   -> You cannot execute this operation since the object has not been created.

X 04/03/2009 7:43:15 PM   ->

X 04/03/2009 7:43:15 PM   -> Source : Microsoft.SqlServer.Smo

X 04/03/2009 7:43:15 PM   ->

X 04/03/2009 7:43:15 PM   -> Stack Trace:

X 04/03/2009 7:43:15 PM   -> at Microsoft.SqlServer.Management.Smo.SqlSmoObject.CheckObjectStateImpl(Boolean throwIfNotCreated)

X 04/03/2009 7:43:15 PM   -> at Microsoft.SqlServer.Management.Smo.SqlSmoObject.CheckObjectState(Boolean throwIfNotCreated)

X 04/03/2009 7:43:15 PM   -> at Microsoft.SqlServer.Management.Smo.SqlSmoObject.DropImplWorker(Urn& urn)

X 04/03/2009 7:43:15 PM   -> at Microsoft.SqlServer.Management.Smo.SqlSmoObject.DropImpl()

X 04/03/2009 7:43:15 PM   -> at Microsoft.SqlServer.Management.Smo.DefaultConstraint.Drop()

X 04/03/2009 7:43:15 PM   -> at MicroFour.StrataFrame.DBEngine.SQL.DatabaseMigrator.PrepareColumnForAlter(Column Col, Boolean DropAllDependencies)

X 04/03/2009 7:43:15 PM   -> at MicroFour.StrataFrame.DBEngine.SQL.DatabaseMigrator.VerifyColumns(Table Tbl, TableInfo TblInfo)

X 04/03/2009 7:43:15 PM   -> at MicroFour.StrataFrame.DBEngine.SQL.DatabaseMigrator.VerifyTable(Table Tbl, TableInfo TblInfo)

X 04/03/2009 7:43:15 PM   -> at MicroFour.StrataFrame.DBEngine.SQL.DatabaseMigrator.EnsureTables(Database TblParent, DatabaseInfo DbInfo)

X 04/03/2009 7:43:15 PM   -> at MicroFour.StrataFrame.DBEngine.SQL.DatabaseMigrator.EnsureDatabases()

X 04/03/2009 7:43:15 PM   -> at MicroFour.StrataFrame.DBEngine.SQL.DatabaseMigrator.DeployMetaDataThread()

X 04/03/2009 7:43:15 PM   ->





Thanks.
Replies
Trent Taylor
Trent Taylor
StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Have you tried this with the most recent beta?  This has to do with the default value and this logic has been changed to circumvent these types of issues within certain environments.  Download the most recent beta of 1.6.7 and see if this issue still persists.
ChanKK
ChanKK
StrataFrame User (248 reputation)StrataFrame User (248 reputation)StrataFrame User (248 reputation)StrataFrame User (248 reputation)StrataFrame User (248 reputation)StrataFrame User (248 reputation)StrataFrame User (248 reputation)StrataFrame User (248 reputation)StrataFrame User (248 reputation)
Group: Forum Members
Posts: 190, Visits: 1.3K
Hi,

I download 1.6.7 beta and the issue still happen. I would send you my package and database via PM.



Thank you
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search