Options

defaults & duplicate creation

dbagurudbaguru Posts: 12
edited March 23, 2006 4:09PM in SQL Packager Previous Versions
I have 2 defaults defined in my sql2k db that are named the same except for the owner (ie. dbo.counties and application.counties). When I run packager on another sql2k server to recreate the db, I get an error that the default already exists. Is packager not identifying the default with the owner name (dbo) ?

Comments

  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    I think that this goes back to the ownership issues that Bundle has had since day one. SQL Packager goes by the script that created the object rather than what the system tables say about the ownership. If I create a default CREATE DEFAULT MyDefault... and I am logged in with a db_owner role, my object will be listed in Enterprise Manager as [dbo].[MyDefault], but when SQL Packager creates it, it will simply re-run the original creation script and the logged-in user will be the assumed owner.

    The only workaround is to edit the object and save it again, this time explicitly stating ownership: CREATE DEFAULT [dbo].[MyDefault].
Sign In or Register to comment.