Let's say...
The Developer makes a database on their laptop. It's backed up and restored
to a production database server.
Upon investigation, the DBA determines the Developer is unrestricted in the
database (YIKES) and investigates properties of the dbo schema. The dbo
schema is owned by the user account of the developer.
There is, of course, a button to change the owner of the dbo schema to
another entity. But the student did a little probing and SUPPOSEDLY found
warnings that state there are some sort of issues with changing the owner of
the dbo schema.
Please "weigh in" here and let me know if there any gotchas with this, and,
if you've actually done this in production with safe results.
Thanks,
George Squillace
East Lansing, MI> Upon investigation, the DBA determines the Developer is unrestricted in
> the
> database (YIKES) and investigates properties of the dbo schema. The dbo
> schema is owned by the user account of the developer.
The dbo schema owner cannot be changed so I can't think of a scenario where
the dbo schema owner could have gotten changed a user other than 'dbo'.
Verify schema owner using the following query:
SELECT
s.name AS SchemaName,
sp.name AS SchemaOwner
FROM sys.schemas s
JOIN sys.database_principals sp ON
sp.principal_id = s.principal_id
WHERE
s.name = 'dbo'
Perhaps the schema is properly owned by the dbo user but the dbo user
mapping is incorrect, which is determined by database ownership. You can
change database ownership with sp_changedbowner.
Hope this helps.
Dan Guzman
SQL Server MVP
"George Squillace" <GeorgeSquillace@.discussions.microsoft.com> wrote in
message news:80430CCF-BBFC-4E9C-81E6-70779CDD00A8@.microsoft.com...
> Let's say...
> The Developer makes a database on their laptop. It's backed up and
> restored
> to a production database server.
> Upon investigation, the DBA determines the Developer is unrestricted in
> the
> database (YIKES) and investigates properties of the dbo schema. The dbo
> schema is owned by the user account of the developer.
> There is, of course, a button to change the owner of the dbo schema to
> another entity. But the student did a little probing and SUPPOSEDLY found
> warnings that state there are some sort of issues with changing the owner
> of
> the dbo schema.
> Please "weigh in" here and let me know if there any gotchas with this,
> and,
> if you've actually done this in production with safe results.
> Thanks,
> George Squillace
> East Lansing, MI
Showing posts with label dbo. Show all posts
Showing posts with label dbo. Show all posts
Thursday, March 22, 2012
Tuesday, March 20, 2012
Changing table owner SQL database
i'm looking for a script to change the ownership of some tables in SQL
database from a certain user to dbo
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!Hi.
You can utilize something as this:
sp_changeobjectowner [ @.objname = ] 'object' , [ @.newowner = ] 'owner'
This it is a stored procedure of SQL Server and only is able used by the use
rs in the roles SysAdmin and db_owner.
Hermilson Tinoco.
****************************************
*************
i'm looking for a script to change the ownership of some tables in SQL
database from a certain user to dbo|||Thanks for your reply.
Via other sources I've got a mail with the following script which
creates a stored procedure that you can execute to change the ownership
of several tables in one run:
CREATE PROC dbo.up_FixObjOwners
AS
SET NOCOUNT ON
DECLARE @.dynsql varchar(1000)
SET @.dynsql = ''
DECLARE @.Obj_Owner sysname
SET @.Obj_Owner = ''
DECLARE @.Obj_Type VARCHAR(30)
SET @.Obj_Type = ''
DECLARE @.Obj_Name sysname
SET @.Obj_Name = ''
DECLARE @.ObjCounter INT
SET @.ObjCounter = 0
DECLARE @.DBO CHAR(3)
SET @.DBO = 'DBO'
-- temp table to hold all objects not owned
-- by DBO
create table #ChangeOwners(
id int identity(1,1),
Obj_Owner sysname,
Obj_Name sysname,
Obj_Type varchar(30))
-- populate it
INSERT #ChangeOwners (Obj_Owner, Obj_Name, Obj_Type)
select
su.name,
so.name,
case
when type = 'u' then 'table'
when type = 'p' then 'sproc'
when type = 'v' then 'view'
end as obj_type
from sysusers su
join sysobjects so
on su.uid = so.uid
where su.name not in ('information_schema', 'dbo')
and so.type in ('p', 'u', 'v')
-- select * from #ChangeOwners
SET @.ObjCounter = @.@.rowcount -- holds the count of rows inserted into
#ChangeOwners
WHILE @.Objcounter > 0
BEGIN
-- construct string for object ownership change
SELECT @.Obj_Name = Obj_Owner + '.' + Obj_Name FROM #ChangeOwners WHERE
id = @.ObjCounter
SELECT @.Obj_Type = Obj_Type FROM #ChangeOwners WHERE id = @.ObjCounter
SET @.dynsql = 'sp_ChangeObjectOwner ''' + @.Obj_Name + ''', ' + @.DBO
--select @.dynsql
print 'changing ownership on ' + @.Obj_Type + ': ' + @.Obj_Name
EXEC(@.dynsql)
SET @.ObjCounter = @.ObjCounter - 1
END
-- ok all done, collect garbage
drop table #ChangeOwners
I hope u can use some other time too.
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!|||Note that changing the object owner (or renaming the proc) will not change
the underlying source text of the procedure. This can cause problems with
subsequent DDL scripting if the original owner was explicitly specified on
the CREATE statement.
Hope this helps.
Dan Guzman
SQL Server MVP
"stevesilent" <stevesilent@.devdex.com> wrote in message
news:OV1wf8J8DHA.2412@.TK2MSFTNGP09.phx.gbl...
> Thanks for your reply.
> Via other sources I've got a mail with the following script which
> creates a stored procedure that you can execute to change the ownership
> of several tables in one run:
> CREATE PROC dbo.up_FixObjOwners
> AS
> SET NOCOUNT ON
> DECLARE @.dynsql varchar(1000)
> SET @.dynsql = ''
> DECLARE @.Obj_Owner sysname
> SET @.Obj_Owner = ''
> DECLARE @.Obj_Type VARCHAR(30)
> SET @.Obj_Type = ''
> DECLARE @.Obj_Name sysname
> SET @.Obj_Name = ''
> DECLARE @.ObjCounter INT
> SET @.ObjCounter = 0
> DECLARE @.DBO CHAR(3)
> SET @.DBO = 'DBO'
> -- temp table to hold all objects not owned
> -- by DBO
> create table #ChangeOwners(
> id int identity(1,1),
> Obj_Owner sysname,
> Obj_Name sysname,
> Obj_Type varchar(30))
> -- populate it
> INSERT #ChangeOwners (Obj_Owner, Obj_Name, Obj_Type)
> select
> su.name,
> so.name,
> case
> when type = 'u' then 'table'
> when type = 'p' then 'sproc'
> when type = 'v' then 'view'
> end as obj_type
> from sysusers su
> join sysobjects so
> on su.uid = so.uid
> where su.name not in ('information_schema', 'dbo')
> and so.type in ('p', 'u', 'v')
> -- select * from #ChangeOwners
> SET @.ObjCounter = @.@.rowcount -- holds the count of rows inserted into
> #ChangeOwners
> WHILE @.Objcounter > 0
> BEGIN
> -- construct string for object ownership change
> SELECT @.Obj_Name = Obj_Owner + '.' + Obj_Name FROM #ChangeOwners WHERE
> id = @.ObjCounter
> SELECT @.Obj_Type = Obj_Type FROM #ChangeOwners WHERE id = @.ObjCounter
> SET @.dynsql = 'sp_ChangeObjectOwner ''' + @.Obj_Name + ''', ' + @.DBO
> --select @.dynsql
> print 'changing ownership on ' + @.Obj_Type + ': ' + @.Obj_Name
> EXEC(@.dynsql)
> SET @.ObjCounter = @.ObjCounter - 1
> END
> -- ok all done, collect garbage
> drop table #ChangeOwners
>
> I hope u can use some other time too.
>
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!
database from a certain user to dbo
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!Hi.
You can utilize something as this:
sp_changeobjectowner [ @.objname = ] 'object' , [ @.newowner = ] 'owner'
This it is a stored procedure of SQL Server and only is able used by the use
rs in the roles SysAdmin and db_owner.
Hermilson Tinoco.
****************************************
*************
i'm looking for a script to change the ownership of some tables in SQL
database from a certain user to dbo|||Thanks for your reply.
Via other sources I've got a mail with the following script which
creates a stored procedure that you can execute to change the ownership
of several tables in one run:
CREATE PROC dbo.up_FixObjOwners
AS
SET NOCOUNT ON
DECLARE @.dynsql varchar(1000)
SET @.dynsql = ''
DECLARE @.Obj_Owner sysname
SET @.Obj_Owner = ''
DECLARE @.Obj_Type VARCHAR(30)
SET @.Obj_Type = ''
DECLARE @.Obj_Name sysname
SET @.Obj_Name = ''
DECLARE @.ObjCounter INT
SET @.ObjCounter = 0
DECLARE @.DBO CHAR(3)
SET @.DBO = 'DBO'
-- temp table to hold all objects not owned
-- by DBO
create table #ChangeOwners(
id int identity(1,1),
Obj_Owner sysname,
Obj_Name sysname,
Obj_Type varchar(30))
-- populate it
INSERT #ChangeOwners (Obj_Owner, Obj_Name, Obj_Type)
select
su.name,
so.name,
case
when type = 'u' then 'table'
when type = 'p' then 'sproc'
when type = 'v' then 'view'
end as obj_type
from sysusers su
join sysobjects so
on su.uid = so.uid
where su.name not in ('information_schema', 'dbo')
and so.type in ('p', 'u', 'v')
-- select * from #ChangeOwners
SET @.ObjCounter = @.@.rowcount -- holds the count of rows inserted into
#ChangeOwners
WHILE @.Objcounter > 0
BEGIN
-- construct string for object ownership change
SELECT @.Obj_Name = Obj_Owner + '.' + Obj_Name FROM #ChangeOwners WHERE
id = @.ObjCounter
SELECT @.Obj_Type = Obj_Type FROM #ChangeOwners WHERE id = @.ObjCounter
SET @.dynsql = 'sp_ChangeObjectOwner ''' + @.Obj_Name + ''', ' + @.DBO
--select @.dynsql
print 'changing ownership on ' + @.Obj_Type + ': ' + @.Obj_Name
EXEC(@.dynsql)
SET @.ObjCounter = @.ObjCounter - 1
END
-- ok all done, collect garbage
drop table #ChangeOwners
I hope u can use some other time too.
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!|||Note that changing the object owner (or renaming the proc) will not change
the underlying source text of the procedure. This can cause problems with
subsequent DDL scripting if the original owner was explicitly specified on
the CREATE statement.
Hope this helps.
Dan Guzman
SQL Server MVP
"stevesilent" <stevesilent@.devdex.com> wrote in message
news:OV1wf8J8DHA.2412@.TK2MSFTNGP09.phx.gbl...
> Thanks for your reply.
> Via other sources I've got a mail with the following script which
> creates a stored procedure that you can execute to change the ownership
> of several tables in one run:
> CREATE PROC dbo.up_FixObjOwners
> AS
> SET NOCOUNT ON
> DECLARE @.dynsql varchar(1000)
> SET @.dynsql = ''
> DECLARE @.Obj_Owner sysname
> SET @.Obj_Owner = ''
> DECLARE @.Obj_Type VARCHAR(30)
> SET @.Obj_Type = ''
> DECLARE @.Obj_Name sysname
> SET @.Obj_Name = ''
> DECLARE @.ObjCounter INT
> SET @.ObjCounter = 0
> DECLARE @.DBO CHAR(3)
> SET @.DBO = 'DBO'
> -- temp table to hold all objects not owned
> -- by DBO
> create table #ChangeOwners(
> id int identity(1,1),
> Obj_Owner sysname,
> Obj_Name sysname,
> Obj_Type varchar(30))
> -- populate it
> INSERT #ChangeOwners (Obj_Owner, Obj_Name, Obj_Type)
> select
> su.name,
> so.name,
> case
> when type = 'u' then 'table'
> when type = 'p' then 'sproc'
> when type = 'v' then 'view'
> end as obj_type
> from sysusers su
> join sysobjects so
> on su.uid = so.uid
> where su.name not in ('information_schema', 'dbo')
> and so.type in ('p', 'u', 'v')
> -- select * from #ChangeOwners
> SET @.ObjCounter = @.@.rowcount -- holds the count of rows inserted into
> #ChangeOwners
> WHILE @.Objcounter > 0
> BEGIN
> -- construct string for object ownership change
> SELECT @.Obj_Name = Obj_Owner + '.' + Obj_Name FROM #ChangeOwners WHERE
> id = @.ObjCounter
> SELECT @.Obj_Type = Obj_Type FROM #ChangeOwners WHERE id = @.ObjCounter
> SET @.dynsql = 'sp_ChangeObjectOwner ''' + @.Obj_Name + ''', ' + @.DBO
> --select @.dynsql
> print 'changing ownership on ' + @.Obj_Type + ': ' + @.Obj_Name
> EXEC(@.dynsql)
> SET @.ObjCounter = @.ObjCounter - 1
> END
> -- ok all done, collect garbage
> drop table #ChangeOwners
>
> I hope u can use some other time too.
>
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!
Monday, March 19, 2012
Changing sql dbo user password (will this effect current replication)
We have a subscriber that want's to change the dbo password for the
replication user. Will this effect current publications to that
subscriber?
tia
-comb
Comb,
dbo is a database user rather than a login, so whose password is being
changed? Also, are you using SQL or trusted authentication for the
subscription?
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Yes, this account that you are using will have to be updated at the
publisher.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"combfilter" <asdf@.adsf.com> wrote in message
news:MPG.1d53fb2b4158876c9896af@.news.newsreader.co m...
> We have a subscriber that want's to change the dbo password for the
> replication user. Will this effect current publications to that
> subscriber?
> tia
> -comb
replication user. Will this effect current publications to that
subscriber?
tia
-comb
Comb,
dbo is a database user rather than a login, so whose password is being
changed? Also, are you using SQL or trusted authentication for the
subscription?
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Yes, this account that you are using will have to be updated at the
publisher.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"combfilter" <asdf@.adsf.com> wrote in message
news:MPG.1d53fb2b4158876c9896af@.news.newsreader.co m...
> We have a subscriber that want's to change the dbo password for the
> replication user. Will this effect current publications to that
> subscriber?
> tia
> -comb
Labels:
changing,
current,
database,
dbo,
effect,
microsoft,
mysql,
oracle,
password,
publications,
replication,
server,
sql,
subscriber,
thereplication,
user
Changing SP Owner
I maybe using this command incorrectly but here goes:
exec sp_changeobjectowner 'usp_get_blindedversion', 'dbo'.
I want to make this stored procedure created by a developer to owner=dbo.
I cannot get this to execute, the error is "Object usp_get_blindedversion
does not exist or is not a valid object for this operation.you probably need the full path of the sp, i.e.
developerslogin.usp_get_blindedversion
A
"Rich" wrote:
> I maybe using this command incorrectly but here goes:
> exec sp_changeobjectowner 'usp_get_blindedversion', 'dbo'.
> I want to make this stored procedure created by a developer to owner=dbo.
> I cannot get this to execute, the error is "Object usp_get_blindedversion
> does not exist or is not a valid object for this operation.
>|||Hmmmm, so you are thinking the developer's login should be included at the
begining of the name of the stored procedure, let me try that.
"bagman3rd" wrote:
> you probably need the full path of the sp, i.e.
> developerslogin.usp_get_blindedversion
> A
> "Rich" wrote:
>|||This works now however I see this
"Caution: Changing any part of an object name could break scripts and stored
procedures."
This appears to be just a warning, is that correct?
"bagman3rd" wrote:
> you probably need the full path of the sp, i.e.
> developerslogin.usp_get_blindedversion
> A
> "Rich" wrote:
>|||Rich,
You should check dependencies before changing the owner. If you are calling
this sp from others sps or client code, using owner_name.sp_name then after
changing the owner those calls will fail.
Example:
create procedure [test].[p1]
as
select 1 as c1
go
create procedure dbo.p2
as
exec [test].[p1]
go
exec dbo.p2
go
exec sp_depends '[test].[p1]'
go
exec sp_changeobjectowner '[test].[p1]', 'dbo'
go
exec dbo.p2
go
drop procedure [dbo].[p2], [dbo].[p1]
go
Result:
c1
--
1
(1 row(s) affected)
In the current database, the specified object is referenced by the following
:
name
name type
-- --
dbo.p2 stored procedure
Caution: Changing any part of an object name could break scripts and stored
procedures.
Server: Msg 2812, Level 16, State 62, Line 4
Could not find stored procedure 'test.p1'.
AMB
"Rich" wrote:
> This works now however I see this
> "Caution: Changing any part of an object name could break scripts and stor
ed
> procedures."
> This appears to be just a warning, is that correct?
> "bagman3rd" wrote:
>|||Hi Rich
Object names are not necessarily unique, so if you don't specify an owner
for the proc, SQL Server won't be able to find it.
HTH
Kalen Delaney
"Rich" <Rich@.discussions.microsoft.com> wrote in message
news:25743607-5F7A-4BF0-B92E-161947AFCD03@.microsoft.com...
>I maybe using this command incorrectly but here goes:
> exec sp_changeobjectowner 'usp_get_blindedversion', 'dbo'.
> I want to make this stored procedure created by a developer to owner=dbo.
> I cannot get this to execute, the error is "Object usp_get_blindedversion
> does not exist or is not a valid object for this operation.
>
exec sp_changeobjectowner 'usp_get_blindedversion', 'dbo'.
I want to make this stored procedure created by a developer to owner=dbo.
I cannot get this to execute, the error is "Object usp_get_blindedversion
does not exist or is not a valid object for this operation.you probably need the full path of the sp, i.e.
developerslogin.usp_get_blindedversion
A
"Rich" wrote:
> I maybe using this command incorrectly but here goes:
> exec sp_changeobjectowner 'usp_get_blindedversion', 'dbo'.
> I want to make this stored procedure created by a developer to owner=dbo.
> I cannot get this to execute, the error is "Object usp_get_blindedversion
> does not exist or is not a valid object for this operation.
>|||Hmmmm, so you are thinking the developer's login should be included at the
begining of the name of the stored procedure, let me try that.
"bagman3rd" wrote:
> you probably need the full path of the sp, i.e.
> developerslogin.usp_get_blindedversion
> A
> "Rich" wrote:
>|||This works now however I see this
"Caution: Changing any part of an object name could break scripts and stored
procedures."
This appears to be just a warning, is that correct?
"bagman3rd" wrote:
> you probably need the full path of the sp, i.e.
> developerslogin.usp_get_blindedversion
> A
> "Rich" wrote:
>|||Rich,
You should check dependencies before changing the owner. If you are calling
this sp from others sps or client code, using owner_name.sp_name then after
changing the owner those calls will fail.
Example:
create procedure [test].[p1]
as
select 1 as c1
go
create procedure dbo.p2
as
exec [test].[p1]
go
exec dbo.p2
go
exec sp_depends '[test].[p1]'
go
exec sp_changeobjectowner '[test].[p1]', 'dbo'
go
exec dbo.p2
go
drop procedure [dbo].[p2], [dbo].[p1]
go
Result:
c1
--
1
(1 row(s) affected)
In the current database, the specified object is referenced by the following
:
name
name type
-- --
dbo.p2 stored procedure
Caution: Changing any part of an object name could break scripts and stored
procedures.
Server: Msg 2812, Level 16, State 62, Line 4
Could not find stored procedure 'test.p1'.
AMB
"Rich" wrote:
> This works now however I see this
> "Caution: Changing any part of an object name could break scripts and stor
ed
> procedures."
> This appears to be just a warning, is that correct?
> "bagman3rd" wrote:
>|||Hi Rich
Object names are not necessarily unique, so if you don't specify an owner
for the proc, SQL Server won't be able to find it.
HTH
Kalen Delaney
"Rich" <Rich@.discussions.microsoft.com> wrote in message
news:25743607-5F7A-4BF0-B92E-161947AFCD03@.microsoft.com...
>I maybe using this command incorrectly but here goes:
> exec sp_changeobjectowner 'usp_get_blindedversion', 'dbo'.
> I want to make this stored procedure created by a developer to owner=dbo.
> I cannot get this to execute, the error is "Object usp_get_blindedversion
> does not exist or is not a valid object for this operation.
>
Labels:
changing,
command,
database,
dbo,
goesexec,
incorrectly,
microsoft,
mysql,
oracle,
owner,
server,
sp_changeobjectowner,
sql,
usp_get_blindedversion
Wednesday, March 7, 2012
Changing ownership of an existing table?
Can the ownership of an existing SQL table be changed from the a user
to DBO? How? Sorry but I'm a novice.
Randy K
wawork@.dfw.wa.gov
Yes. Read up on sp_changedbowner within Books Online (within the SQL =
Server program group).
--=20
Keith
"Randy K" <wawork@.hotmail.com> wrote in message =
news:40aa55ca.8925156@.msnews.microsoft.com...
> Can the ownership of an existing SQL table be changed from the a user
> to DBO? How? Sorry but I'm a novice.
>=20
> Randy K
> wawork@.dfw.wa.gov
|||Keith,
I assume you meant sp_changeobjectowner.
Dinesh
SQL Server MVP
--
SQL Server FAQ at
http://www.tkdinesh.com
"Keith Kratochvil" <sqlguy.back2u@.comcast.net> wrote in message
news:O25ILdQPEHA.3452@.TK2MSFTNGP10.phx.gbl...
Yes. Read up on sp_changedbowner within Books Online (within the SQL Server
program group).
Keith
"Randy K" <wawork@.hotmail.com> wrote in message
news:40aa55ca.8925156@.msnews.microsoft.com...
> Can the ownership of an existing SQL table be changed from the a user
> to DBO? How? Sorry but I'm a novice.
> Randy K
> wawork@.dfw.wa.gov
|||Yeah, read up on that one sp_changeobjectowner. sp_changeobjectowner =
will work a bit better than sp_changedbowner
My fingers typed one =
thing while my brain was thinking something else.
Dinesh, Thanks for the correction!
--=20
Keith
"Dinesh T.K" <tkdinesh@.nospam.mail.tkdinesh.com> wrote in message =
news:uYnLtARPEHA.3944@.tk2msftngp13.phx.gbl...
> Keith,
>=20
> I assume you meant sp_changeobjectowner.
>=20
> --
> Dinesh
> SQL Server MVP
> --
> --
> SQL Server FAQ at
> http://www.tkdinesh.com
>=20
> "Keith Kratochvil" <sqlguy.back2u@.comcast.net> wrote in message
> news:O25ILdQPEHA.3452@.TK2MSFTNGP10.phx.gbl...
> Yes. Read up on sp_changedbowner within Books Online (within the SQL =
Server[vbcol=seagreen]
> program group).
>=20
> --=20
> Keith
>=20
>=20
> "Randy K" <wawork@.hotmail.com> wrote in message
> news:40aa55ca.8925156@.msnews.microsoft.com...
user
>=20
>
to DBO? How? Sorry but I'm a novice.
Randy K
wawork@.dfw.wa.gov
Yes. Read up on sp_changedbowner within Books Online (within the SQL =
Server program group).
--=20
Keith
"Randy K" <wawork@.hotmail.com> wrote in message =
news:40aa55ca.8925156@.msnews.microsoft.com...
> Can the ownership of an existing SQL table be changed from the a user
> to DBO? How? Sorry but I'm a novice.
>=20
> Randy K
> wawork@.dfw.wa.gov
|||Keith,
I assume you meant sp_changeobjectowner.
Dinesh
SQL Server MVP
--
SQL Server FAQ at
http://www.tkdinesh.com
"Keith Kratochvil" <sqlguy.back2u@.comcast.net> wrote in message
news:O25ILdQPEHA.3452@.TK2MSFTNGP10.phx.gbl...
Yes. Read up on sp_changedbowner within Books Online (within the SQL Server
program group).
Keith
"Randy K" <wawork@.hotmail.com> wrote in message
news:40aa55ca.8925156@.msnews.microsoft.com...
> Can the ownership of an existing SQL table be changed from the a user
> to DBO? How? Sorry but I'm a novice.
> Randy K
> wawork@.dfw.wa.gov
|||Yeah, read up on that one sp_changeobjectowner. sp_changeobjectowner =
will work a bit better than sp_changedbowner
thing while my brain was thinking something else.
Dinesh, Thanks for the correction!
--=20
Keith
"Dinesh T.K" <tkdinesh@.nospam.mail.tkdinesh.com> wrote in message =
news:uYnLtARPEHA.3944@.tk2msftngp13.phx.gbl...
> Keith,
>=20
> I assume you meant sp_changeobjectowner.
>=20
> --
> Dinesh
> SQL Server MVP
> --
> --
> SQL Server FAQ at
> http://www.tkdinesh.com
>=20
> "Keith Kratochvil" <sqlguy.back2u@.comcast.net> wrote in message
> news:O25ILdQPEHA.3452@.TK2MSFTNGP10.phx.gbl...
> Yes. Read up on sp_changedbowner within Books Online (within the SQL =
Server[vbcol=seagreen]
> program group).
>=20
> --=20
> Keith
>=20
>=20
> "Randy K" <wawork@.hotmail.com> wrote in message
> news:40aa55ca.8925156@.msnews.microsoft.com...
user
>=20
>
Changing owner of DB objects
I have a database where all objects within it and owned by a user not dbo.
Is there any way I can change all the object ownerships to dbo? I'm talking
thousands of objects so I'm thinking some form of script.
thanks
GavGav
SELECT 'EXEC sp_changeobjectowner '''+ROUTINE_NAME+''',''dbo'''
FROM INFORMATION_SCHEMA.ROUTINES
WHERE OBJECTPROPERTY(OBJECT_ID(ROUTINE_SCHEMA+
'.'+ROUTINE_NAME),
'IsMsShipped')=0
AND ROUTINE_SCHEMA != 'dbo'
"Gav" <gav@.nospam.com> wrote in message
news:455c2cce$0$696$88260bb3@.news.teranews.com...
>I have a database where all objects within it and owned by a user not dbo.
>Is there any way I can change all the object ownerships to dbo? I'm talking
>thousands of objects so I'm thinking some form of script.
> thanks
> Gav
>|||What version of SQL Server?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Gav" <gav@.nospam.com> wrote in message news:455c2cce$0$696$88260bb3@.news.teranews.com...[vb
col=seagreen]
>I have a database where all objects within it and owned by a user not dbo.
Is there any way I can
>change all the object ownerships to dbo? I'm talking thousands of objects s
o I'm thinking some form
>of script.
> thanks
> Gav
>[/vbcol]|||Sorry, forgot the obvious. :o) 2000 SP3a.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:eVnJq0WCHHA.3604@.TK2MSFTNGP03.phx.gbl...
> What version of SQL Server?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Gav" <gav@.nospam.com> wrote in message
> news:455c2cce$0$696$88260bb3@.news.teranews.com...
>|||See Uri's post (sp_changeobjectowner).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Gav" <gav@.nospam.com> wrote in message news:455c42c8$0$709$88260bb3@.news.teranews.com...[vb
col=seagreen]
> Sorry, forgot the obvious. :o) 2000 SP3a.
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n message
> news:eVnJq0WCHHA.3604@.TK2MSFTNGP03.phx.gbl...
>[/vbcol]
Is there any way I can change all the object ownerships to dbo? I'm talking
thousands of objects so I'm thinking some form of script.
thanks
GavGav
SELECT 'EXEC sp_changeobjectowner '''+ROUTINE_NAME+''',''dbo'''
FROM INFORMATION_SCHEMA.ROUTINES
WHERE OBJECTPROPERTY(OBJECT_ID(ROUTINE_SCHEMA+
'.'+ROUTINE_NAME),
'IsMsShipped')=0
AND ROUTINE_SCHEMA != 'dbo'
"Gav" <gav@.nospam.com> wrote in message
news:455c2cce$0$696$88260bb3@.news.teranews.com...
>I have a database where all objects within it and owned by a user not dbo.
>Is there any way I can change all the object ownerships to dbo? I'm talking
>thousands of objects so I'm thinking some form of script.
> thanks
> Gav
>|||What version of SQL Server?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Gav" <gav@.nospam.com> wrote in message news:455c2cce$0$696$88260bb3@.news.teranews.com...[vb
col=seagreen]
>I have a database where all objects within it and owned by a user not dbo.
Is there any way I can
>change all the object ownerships to dbo? I'm talking thousands of objects s
o I'm thinking some form
>of script.
> thanks
> Gav
>[/vbcol]|||Sorry, forgot the obvious. :o) 2000 SP3a.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:eVnJq0WCHHA.3604@.TK2MSFTNGP03.phx.gbl...
> What version of SQL Server?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Gav" <gav@.nospam.com> wrote in message
> news:455c2cce$0$696$88260bb3@.news.teranews.com...
>|||See Uri's post (sp_changeobjectowner).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Gav" <gav@.nospam.com> wrote in message news:455c42c8$0$709$88260bb3@.news.teranews.com...[vb
col=seagreen]
> Sorry, forgot the obvious. :o) 2000 SP3a.
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n message
> news:eVnJq0WCHHA.3604@.TK2MSFTNGP03.phx.gbl...
>[/vbcol]
Changing owner of DB objects
I have a database where all objects within it and owned by a user not dbo.
Is there any way I can change all the object ownerships to dbo? I'm talking
thousands of objects so I'm thinking some form of script.
thanks
Gav
Gav
SELECT 'EXEC sp_changeobjectowner '''+ROUTINE_NAME+''',''dbo'''
FROM INFORMATION_SCHEMA.ROUTINES
WHERE OBJECTPROPERTY(OBJECT_ID(ROUTINE_SCHEMA+'.'+ROUTIN E_NAME),
'IsMsShipped')=0
AND ROUTINE_SCHEMA != 'dbo'
"Gav" <gav@.nospam.com> wrote in message
news:455c2cce$0$696$88260bb3@.news.teranews.com...
>I have a database where all objects within it and owned by a user not dbo.
>Is there any way I can change all the object ownerships to dbo? I'm talking
>thousands of objects so I'm thinking some form of script.
> thanks
> Gav
>
|||Sorry, forgot the obvious. :o) 2000 SP3a.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:eVnJq0WCHHA.3604@.TK2MSFTNGP03.phx.gbl...
> What version of SQL Server?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Gav" <gav@.nospam.com> wrote in message
> news:455c2cce$0$696$88260bb3@.news.teranews.com...
>
Is there any way I can change all the object ownerships to dbo? I'm talking
thousands of objects so I'm thinking some form of script.
thanks
Gav
Gav
SELECT 'EXEC sp_changeobjectowner '''+ROUTINE_NAME+''',''dbo'''
FROM INFORMATION_SCHEMA.ROUTINES
WHERE OBJECTPROPERTY(OBJECT_ID(ROUTINE_SCHEMA+'.'+ROUTIN E_NAME),
'IsMsShipped')=0
AND ROUTINE_SCHEMA != 'dbo'
"Gav" <gav@.nospam.com> wrote in message
news:455c2cce$0$696$88260bb3@.news.teranews.com...
>I have a database where all objects within it and owned by a user not dbo.
>Is there any way I can change all the object ownerships to dbo? I'm talking
>thousands of objects so I'm thinking some form of script.
> thanks
> Gav
>
|||Sorry, forgot the obvious. :o) 2000 SP3a.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:eVnJq0WCHHA.3604@.TK2MSFTNGP03.phx.gbl...
> What version of SQL Server?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Gav" <gav@.nospam.com> wrote in message
> news:455c2cce$0$696$88260bb3@.news.teranews.com...
>
Changing owner of DB objects
I have a database where all objects within it and owned by a user not dbo.
Is there any way I can change all the object ownerships to dbo? I'm talking
thousands of objects so I'm thinking some form of script.
thanks
GavGav
SELECT 'EXEC sp_changeobjectowner '''+ROUTINE_NAME+''',''dbo'''
FROM INFORMATION_SCHEMA.ROUTINES
WHERE OBJECTPROPERTY(OBJECT_ID(ROUTINE_SCHEMA+'.'+ROUTINE_NAME),
'IsMsShipped')=0
AND ROUTINE_SCHEMA != 'dbo'
"Gav" <gav@.nospam.com> wrote in message
news:455c2cce$0$696$88260bb3@.news.teranews.com...
>I have a database where all objects within it and owned by a user not dbo.
>Is there any way I can change all the object ownerships to dbo? I'm talking
>thousands of objects so I'm thinking some form of script.
> thanks
> Gav
>|||What version of SQL Server?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Gav" <gav@.nospam.com> wrote in message news:455c2cce$0$696$88260bb3@.news.teranews.com...
>I have a database where all objects within it and owned by a user not dbo. Is there any way I can
>change all the object ownerships to dbo? I'm talking thousands of objects so I'm thinking some form
>of script.
> thanks
> Gav
>|||Sorry, forgot the obvious. :o) 2000 SP3a.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:eVnJq0WCHHA.3604@.TK2MSFTNGP03.phx.gbl...
> What version of SQL Server?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Gav" <gav@.nospam.com> wrote in message
> news:455c2cce$0$696$88260bb3@.news.teranews.com...
>>I have a database where all objects within it and owned by a user not dbo.
>>Is there any way I can change all the object ownerships to dbo? I'm
>>talking thousands of objects so I'm thinking some form of script.
>> thanks
>> Gav
>|||See Uri's post (sp_changeobjectowner).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Gav" <gav@.nospam.com> wrote in message news:455c42c8$0$709$88260bb3@.news.teranews.com...
> Sorry, forgot the obvious. :o) 2000 SP3a.
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:eVnJq0WCHHA.3604@.TK2MSFTNGP03.phx.gbl...
>> What version of SQL Server?
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "Gav" <gav@.nospam.com> wrote in message news:455c2cce$0$696$88260bb3@.news.teranews.com...
>>I have a database where all objects within it and owned by a user not dbo. Is there any way I can
>>change all the object ownerships to dbo? I'm talking thousands of objects so I'm thinking some
>>form of script.
>> thanks
>> Gav
>>
>
Is there any way I can change all the object ownerships to dbo? I'm talking
thousands of objects so I'm thinking some form of script.
thanks
GavGav
SELECT 'EXEC sp_changeobjectowner '''+ROUTINE_NAME+''',''dbo'''
FROM INFORMATION_SCHEMA.ROUTINES
WHERE OBJECTPROPERTY(OBJECT_ID(ROUTINE_SCHEMA+'.'+ROUTINE_NAME),
'IsMsShipped')=0
AND ROUTINE_SCHEMA != 'dbo'
"Gav" <gav@.nospam.com> wrote in message
news:455c2cce$0$696$88260bb3@.news.teranews.com...
>I have a database where all objects within it and owned by a user not dbo.
>Is there any way I can change all the object ownerships to dbo? I'm talking
>thousands of objects so I'm thinking some form of script.
> thanks
> Gav
>|||What version of SQL Server?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Gav" <gav@.nospam.com> wrote in message news:455c2cce$0$696$88260bb3@.news.teranews.com...
>I have a database where all objects within it and owned by a user not dbo. Is there any way I can
>change all the object ownerships to dbo? I'm talking thousands of objects so I'm thinking some form
>of script.
> thanks
> Gav
>|||Sorry, forgot the obvious. :o) 2000 SP3a.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:eVnJq0WCHHA.3604@.TK2MSFTNGP03.phx.gbl...
> What version of SQL Server?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Gav" <gav@.nospam.com> wrote in message
> news:455c2cce$0$696$88260bb3@.news.teranews.com...
>>I have a database where all objects within it and owned by a user not dbo.
>>Is there any way I can change all the object ownerships to dbo? I'm
>>talking thousands of objects so I'm thinking some form of script.
>> thanks
>> Gav
>|||See Uri's post (sp_changeobjectowner).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Gav" <gav@.nospam.com> wrote in message news:455c42c8$0$709$88260bb3@.news.teranews.com...
> Sorry, forgot the obvious. :o) 2000 SP3a.
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:eVnJq0WCHHA.3604@.TK2MSFTNGP03.phx.gbl...
>> What version of SQL Server?
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "Gav" <gav@.nospam.com> wrote in message news:455c2cce$0$696$88260bb3@.news.teranews.com...
>>I have a database where all objects within it and owned by a user not dbo. Is there any way I can
>>change all the object ownerships to dbo? I'm talking thousands of objects so I'm thinking some
>>form of script.
>> thanks
>> Gav
>>
>
Saturday, February 25, 2012
Changing object ownership back to dbo
Hi:
I have a database where objects are owned by different users. I would like
to revert ownership of all objects to dbo. What is the best way to do this?
Thanks,
Charliesp_changeobjectowner
David Portas
SQL Server MVP
--
"Charlie@.CBFC" <charle1@.comcast.net> wrote in message
news:Oe9b3gfzFHA.1132@.TK2MSFTNGP10.phx.gbl...
> Hi:
> I have a database where objects are owned by different users. I would
> like
> to revert ownership of all objects to dbo. What is the best way to do
> this?
> Thanks,
> Charlie
>|||Hi,
Use the below script. Execute the script by replacing oldobjectowner and new
user. This query will give you script for changing the object.
Just cut and paste the output to a new query analyzer window and execute to
change the object owner.
set quoted_identifier off
select 'sp_changeobjectowner '+name+"'"+'newusername' +"'"+char(10)+'go'
from sysobjects where user_name(uid)='oldobjectowner'
set quoted_identifier on
Thanks
Hari
SQL Server MVP
"Charlie@.CBFC" <charle1@.comcast.net> wrote in message
news:Oe9b3gfzFHA.1132@.TK2MSFTNGP10.phx.gbl...
> Hi:
> I have a database where objects are owned by different users. I would
> like
> to revert ownership of all objects to dbo. What is the best way to do
> this?
> Thanks,
> Charlie
>
I have a database where objects are owned by different users. I would like
to revert ownership of all objects to dbo. What is the best way to do this?
Thanks,
Charliesp_changeobjectowner
David Portas
SQL Server MVP
--
"Charlie@.CBFC" <charle1@.comcast.net> wrote in message
news:Oe9b3gfzFHA.1132@.TK2MSFTNGP10.phx.gbl...
> Hi:
> I have a database where objects are owned by different users. I would
> like
> to revert ownership of all objects to dbo. What is the best way to do
> this?
> Thanks,
> Charlie
>|||Hi,
Use the below script. Execute the script by replacing oldobjectowner and new
user. This query will give you script for changing the object.
Just cut and paste the output to a new query analyzer window and execute to
change the object owner.
set quoted_identifier off
select 'sp_changeobjectowner '+name+"'"+'newusername' +"'"+char(10)+'go'
from sysobjects where user_name(uid)='oldobjectowner'
set quoted_identifier on
Thanks
Hari
SQL Server MVP
"Charlie@.CBFC" <charle1@.comcast.net> wrote in message
news:Oe9b3gfzFHA.1132@.TK2MSFTNGP10.phx.gbl...
> Hi:
> I have a database where objects are owned by different users. I would
> like
> to revert ownership of all objects to dbo. What is the best way to do
> this?
> Thanks,
> Charlie
>
Friday, February 24, 2012
Changing login for dbo object (SQL Server 2000)
I've got a SQL Server 2000 database (ASOQA) that has the dbo User linked to
my Windows-based domain login. This has been causing me problems when tryin
g to add permissions to my account; I get an error that I can't make any cha
nges to the dbo object.
The fix, as I understand it, is to change the dbo User to use the sa login a
nd add another administrative User for my Windows-based login. I note that
a companion database on the same server is setup that way and I have no prob
lems with assigning roles on that one. I was directed to use sp_change_user
s_login but that also produces errors stating that the dbo object is invalid
for the User parameter.
Basically, here's what I see now for users in Enterprise Manager on ASOQA:
Name Login Name
dbo noe\ranarnol *
dev dev
reportuser reportuser
(etc)
Here's how the other database is setup, and how I want ASOQA done:
Name Login Name
dbo sa *
dev dev
ranarnol noe\ranarnol *
reportuser reportuser
(etc)
noe\ranarnol is my usual login. Any ideas how I go about accomplishing this
?
Thanks,
Randall ArnoldIt sound like what you are looking for is sp_changedbowner.
In Query Analyzer, change your database context to the
database you are having problems with and execute:
sp_changedbowner 'sa'
-Sue
On Tue, 16 May 2006 11:27:25 -0500, "Randall Arnold"
<randall.nospam.arnold@.nospamnokia.com.> wrote:
>I've got a SQL Server 2000 database (ASOQA) that has the dbo User linked to
my Windows-based domain login. This has been causing me problems when tryi
ng to add permissions to my account; I get an error that I can't make any ch
anges to the dbo object.
>The fix, as I understand it, is to change the dbo User to use the sa login and add
another administrative User for my Windows-based login. I note that a companion dat
abase on the same server is setup that way and I have no problems with assigning rol
es
on that one. I was directed to use sp_change_users_login but that also produces errors stat
ing that the dbo object is invalid for the User parameter.
>Basically, here's what I see now for users in Enterprise Manager on ASOQA:
>Name Login Name
>dbo noe\ranarnol *
>dev dev
>reportuser reportuser
>(etc)
>Here's how the other database is setup, and how I want ASOQA done:
>Name Login Name
>dbo sa *
>dev dev
>ranarnol noe\ranarnol *
>reportuser reportuser
>(etc)
>noe\ranarnol is my usual login. Any ideas how I go about accomplishing thi
s?
>Thanks,
>Randall Arnold|||Thanks, Sue, I'll give it a shot!
Randall
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:jl9k62p4ipgkbppvhglaqlbkgsnpt745fo@.
4ax.com...
> It sound like what you are looking for is sp_changedbowner.
> In Query Analyzer, change your database context to the
> database you are having problems with and execute:
> sp_changedbowner 'sa'
> -Sue
> On Tue, 16 May 2006 11:27:25 -0500, "Randall Arnold"
> <randall.nospam.arnold@.nospamnokia.com.> wrote:
>
>|||Worked like an absolute charm! Exactly what I needed! Thanks again.
Randall
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:jl9k62p4ipgkbppvhglaqlbkgsnpt745fo@.
4ax.com...
> It sound like what you are looking for is sp_changedbowner.
> In Query Analyzer, change your database context to the
> database you are having problems with and execute:
> sp_changedbowner 'sa'
> -Sue
> On Tue, 16 May 2006 11:27:25 -0500, "Randall Arnold"
> <randall.nospam.arnold@.nospamnokia.com.> wrote:
>
>|||Your welcome Randall - thanks for posting back!
-Sue
On Wed, 17 May 2006 15:05:12 -0500, "Randall Arnold"
<randall.nospam.arnold@.nospamnokia.com.> wrote:
>Worked like an absolute charm! Exactly what I needed! Thanks again.
>Randall
>"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
> news:jl9k62p4ipgkbppvhglaqlbkgsnpt745fo@.
4ax.com...
>
my Windows-based domain login. This has been causing me problems when tryin
g to add permissions to my account; I get an error that I can't make any cha
nges to the dbo object.
The fix, as I understand it, is to change the dbo User to use the sa login a
nd add another administrative User for my Windows-based login. I note that
a companion database on the same server is setup that way and I have no prob
lems with assigning roles on that one. I was directed to use sp_change_user
s_login but that also produces errors stating that the dbo object is invalid
for the User parameter.
Basically, here's what I see now for users in Enterprise Manager on ASOQA:
Name Login Name
dbo noe\ranarnol *
dev dev
reportuser reportuser
(etc)
Here's how the other database is setup, and how I want ASOQA done:
Name Login Name
dbo sa *
dev dev
ranarnol noe\ranarnol *
reportuser reportuser
(etc)
noe\ranarnol is my usual login. Any ideas how I go about accomplishing this
?
Thanks,
Randall ArnoldIt sound like what you are looking for is sp_changedbowner.
In Query Analyzer, change your database context to the
database you are having problems with and execute:
sp_changedbowner 'sa'
-Sue
On Tue, 16 May 2006 11:27:25 -0500, "Randall Arnold"
<randall.nospam.arnold@.nospamnokia.com.> wrote:
>I've got a SQL Server 2000 database (ASOQA) that has the dbo User linked to
my Windows-based domain login. This has been causing me problems when tryi
ng to add permissions to my account; I get an error that I can't make any ch
anges to the dbo object.
>The fix, as I understand it, is to change the dbo User to use the sa login and add
another administrative User for my Windows-based login. I note that a companion dat
abase on the same server is setup that way and I have no problems with assigning rol
es
on that one. I was directed to use sp_change_users_login but that also produces errors stat
ing that the dbo object is invalid for the User parameter.
>Basically, here's what I see now for users in Enterprise Manager on ASOQA:
>Name Login Name
>dbo noe\ranarnol *
>dev dev
>reportuser reportuser
>(etc)
>Here's how the other database is setup, and how I want ASOQA done:
>Name Login Name
>dbo sa *
>dev dev
>ranarnol noe\ranarnol *
>reportuser reportuser
>(etc)
>noe\ranarnol is my usual login. Any ideas how I go about accomplishing thi
s?
>Thanks,
>Randall Arnold|||Thanks, Sue, I'll give it a shot!
Randall
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:jl9k62p4ipgkbppvhglaqlbkgsnpt745fo@.
4ax.com...
> It sound like what you are looking for is sp_changedbowner.
> In Query Analyzer, change your database context to the
> database you are having problems with and execute:
> sp_changedbowner 'sa'
> -Sue
> On Tue, 16 May 2006 11:27:25 -0500, "Randall Arnold"
> <randall.nospam.arnold@.nospamnokia.com.> wrote:
>
>|||Worked like an absolute charm! Exactly what I needed! Thanks again.
Randall
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:jl9k62p4ipgkbppvhglaqlbkgsnpt745fo@.
4ax.com...
> It sound like what you are looking for is sp_changedbowner.
> In Query Analyzer, change your database context to the
> database you are having problems with and execute:
> sp_changedbowner 'sa'
> -Sue
> On Tue, 16 May 2006 11:27:25 -0500, "Randall Arnold"
> <randall.nospam.arnold@.nospamnokia.com.> wrote:
>
>|||Your welcome Randall - thanks for posting back!
-Sue
On Wed, 17 May 2006 15:05:12 -0500, "Randall Arnold"
<randall.nospam.arnold@.nospamnokia.com.> wrote:
>Worked like an absolute charm! Exactly what I needed! Thanks again.
>Randall
>"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
> news:jl9k62p4ipgkbppvhglaqlbkgsnpt745fo@.
4ax.com...
>
Subscribe to:
Posts (Atom)