Re: Change UDF Owner
- From: "A McGuire" <allen.mcguire@xxxxxxxxxxxxxxxxx>
- Date: Tue, 18 Jul 2006 15:11:38 -0500
But for changing the database owner, the following works:
EXEC sp_changedbowner 'sa'
and this doesn't:
EXEC sp_changedbowner 'dbo'
I suppose changing ownership of databases and objects is different. I have
never had to do this, but the UDFs are owned by 'system_function_schema'
currently. Does it make sense to change the ownership to dbo? I'm trying
to get all database objects owned by dbo (which is the same as the 'sa'
Login Name).
I still don't have the correct syntax - using what you suggested returns:
"Object <object_name> does not exist or is not a valid object for this
operation."
I wonder if it has something to do with the fact that it is a UDF?
"Arnie Rowland" <arnie@xxxxxxxx> wrote in message
news:eWTKcPqqGHA.4760@xxxxxxxxxxxxxxxxxxxxxxx
It's because sa doesn't own the database objects, but dbo can.
EXECUTE sp_changeobjectowner 'fn_replgetagentcommandlinefromjobid', 'dbo'
should work for you.
--
Arnie Rowland
"To be successful, your heart must accompany your knowledge."
"A McGuire" <allen.mcguire@xxxxxxxxxxxxxxxxx> wrote in message
news:Ok8BDKqqGHA.4932@xxxxxxxxxxxxxxxxxxxxxxx
Can I change the owner of a UDF?
Example:
USE master
GO
EXEC sp_changeobjectowner 'fn_replgetagentcommandlinefromjobid', 'sa'
... isn't working. I want dbo to own all the objects in my database -
just a security best practice sort of thing. I can't seem to find my
answer searching the web.
.
- Follow-Ups:
- Re: Change UDF Owner
- From: Arnie Rowland
- Re: Change UDF Owner
- References:
- Change UDF Owner
- From: A McGuire
- Re: Change UDF Owner
- From: Arnie Rowland
- Change UDF Owner
- Prev by Date: Re: Change UDF Owner
- Next by Date: Disable Sysadmin to view metadata in SQL2005
- Previous by thread: Re: Change UDF Owner
- Next by thread: Re: Change UDF Owner
- Index(es):
Relevant Pages
|