CopyAllObjects (Non dbo Owner)

  • I am using sqldmo and the sp_oa procedures to try and create a blank copy of a database. It looks like CopyAllObjects will work (kind of).

    Most of the objects in the database are owned by an account other than dbo. It looks like it transferred the blank tables even though they were owned by this other account. But only the views, functions and stored procs that have an owner of dbo are being copied. Does anyone know what I am doing wrong or can you point me in the right direction?

    I'll need all objects copied no matter who the owner.

    Thanks,

    George

  • I have found that using Server2 and Transfer2 have helped the issue.

    But I have a new problem. I get an "invalid object" error on a udf. The app is trying to create a constraint that uses this udf. The udf exists in the database that was copied. Any ideas on how to get around this?

    Thanks,

    George

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

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