Using Database Publishing Wizard

Topics: Database Publishing Wizard
Feb 9, 2007 at 3:20 PM
When I try to script my db with data , this error appears,.what should i do.

User-defined function fn_diagramobjects has the execution context ExecuteAsUser. Scripting user-defined function with the execution context ExecuteAsUser is not supported.
Feb 9, 2007 at 9:27 PM
Edited Feb 15, 2007 at 10:47 PM
Hi

Can you run the following TSQL statement on your database and provide us the results?

select
major_id , sys.extended_properties.name
from
sys.extended_properties, sys.all_objects as udf
where
udf.name = N'fn_diagramobjects' and
SCHEMA_NAME(udf.schema_id)=N'dbo' and
major_id = udf.object_id and
minor_id = 0 and
class = 1


Thanks
Himanshu
Mar 14, 2007 at 8:24 AM
Edited Mar 14, 2007 at 5:56 PM
I am able to reproduce this. I ran the above query on both instances of my database and it didn't return any results. At first I thought it was a local remote issue (I assumed the databases were exactly the same because they're under replication - they aren't apparently)

It works on my replicated/backup instance, but not the production instance.

jacob lewallen
Mar 14, 2007 at 5:32 PM
Edited Mar 14, 2007 at 5:55 PM
Oops, it's not a local remote issue.
Mar 14, 2007 at 6:17 PM
Hi Jacob

Are you getting this error for fn_diagramobjects or for another object? You may need to change the query above if it is a different object for which you are getting the error.

Thanks
Himanshu
Oct 14, 2007 at 5:19 AM
I had to remove my diagram pieces, both the fn_diagramobjects and the user scripts for the diagrams and things ran properly.
Jun 2, 2008 at 3:13 AM


Hi, I get a similiar type error when I attempt to deploy a user defined function called "fn_diagramobjects" to my web-site hosted by GoDaddy.  The error is:

"User-defined function fn_diagramobjects has the execution context ExecuteAsUser. Scripting user-defined function with the execution context ExecuteAsUser is not supported.(SqlPubWiz)"

I am using the "TheBeerHouse" as a base, and on my local machine this "user defined fucnction" works just fine.  When I use the "Database Publishing Wizard" (DPW) I get the above listed error.  So, in essence DPW is telling me I cannot deploy this user defined function called "fn_diagramobjects" (which I have not altered).
Does anyone have have a work around?