Using sp_MSforeachdb in SQL6.5

  • I was trying to use above mentioned stored procedure but hit the following error :

    Msg 229, Level 14, State 2

    SELECT permission denied on object #SQLOLEDbUserProfile00000000F6, database tempdb, owner dbo

    Any idea how to solve it ?

  • My guess (and only a guess) is that you're trying to access a protected temp table. Maybe modify the proc to skip tables that start with a #? And/or skip tempdb altogether?

    Andy

  • The temp object was created once I connected to SQL server. If I choose to skip the temp table, sp_MSforeachdb will complain the object is not found.

    Any suggestion ?

  • I dont have 6.5 installed ANYWHERE. Let me see what I can come up with. Steve?

    Andy

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply