cannot find object because not exist or not have permissions

steve1_rmsteve1_rm Posts: 2
edited March 20, 2007 2:00PM in SQL Compare Previous Versions
Hello,

When I use the script file I get many of these errors. When I sychronization wizard it works fine, and not errors.

The customer requires the script file, so I need to get this working. However, the errors are listed below. If anyone could give me some advice.

I have set all the options to the default settings.

In step 2 i have no independances.

Altering permissions on [dbo].[getContactDetails]
Msg 15151, Level 16, State 1, Line 1
Cannot find the object 'getContactDetails', because it does not exist or you do not have permission.

Msg 208, Level 16, State 6, Procedure RefEquipmentTypes_Update, Line 1
Invalid object name 'dbo.RefEquipmentTypes_Update'.

Many thanks in advance,

Steve

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi Steve,

    SQL Compare can run synchronization scripts internally, as you've pointed out. When it does this, however, it is running the same script that you save using the save script button. The only reason I can offer for why it works inside SQL Compare and the script fails, is because your user is running the script under a different SQL account. This can potentially cause objects to be created with different ownership if, for instance, you run SQL Compare as sa, and the customer runs the script as a different user which does not have the dbo role, objects can be created with the wrong user name when the ownership is implicit.

    Hopefully this points you in the right direction.
Sign In or Register to comment.