DB Owner changed after Restore

DB Owner changed after Restore

Post by Matt Theul » Wed, 27 Mar 2002 09:30:48



I handled a phone call today from a client who claimed that when he restored
a database via Enterprise Manager, the owner of another database was reset
to 'sa'.
We created a new database (DB-B) that was to be the target of the restore
procedure.  I verified that the db owner of the db in question was what it
should be.  We used Enterprise Manager to restore the database from a file
that was originally a db on a different server.  After the restore was
successful, we looked at a the database in question and the owner had been
changed to 'sa'!

Is it possible to have some procedure or 'trigger' (for lack of a better
term) that would run upon the Restore Event that could (maybe not the
intent) affect a different database?  Would this procedure need to be
somewhere in the Master table?

Thanks

MATT

 
 
 

DB Owner changed after Restore

Post by alle » Wed, 27 Mar 2002 23:39:38


sp_changedbowner.

Quote:>-----Original Message-----
>I handled a phone call today from a client who claimed

that when he restored
Quote:>a database via Enterprise Manager, the owner of another
database was reset
>to 'sa'.
>We created a new database (DB-B) that was to be the

target of the restore
Quote:>procedure.  I verified that the db owner of the db in

question was what it
Quote:>should be.  We used Enterprise Manager to restore the

database from a file
Quote:>that was originally a db on a different server.  After
the restore was
>successful, we looked at a the database in question and
the owner had been
>changed to 'sa'!

>Is it possible to have some procedure or 'trigger' (for
lack of a better
>term) that would run upon the Restore Event that could
(maybe not the
>intent) affect a different database?  Would this

procedure need to be
Quote:>somewhere in the Master table?

>Thanks

>MATT

>.


 
 
 

DB Owner changed after Restore

Post by Matt Theul » Thu, 28 Mar 2002 01:48:30


Yes, but can this stored procedure be run automatically upon a Restore of a
(any) database?

MATT


Quote:> sp_changedbowner.

> >-----Original Message-----
> >I handled a phone call today from a client who claimed
> that when he restored
> >a database via Enterprise Manager, the owner of another
> database was reset
> >to 'sa'.
> >We created a new database (DB-B) that was to be the
> target of the restore
> >procedure.  I verified that the db owner of the db in
> question was what it
> >should be.  We used Enterprise Manager to restore the
> database from a file
> >that was originally a db on a different server.  After
> the restore was
> >successful, we looked at a the database in question and
> the owner had been
> >changed to 'sa'!

> >Is it possible to have some procedure or 'trigger' (for
> lack of a better
> >term) that would run upon the Restore Event that could
> (maybe not the
> >intent) affect a different database?  Would this
> procedure need to be
> >somewhere in the Master table?

> >Thanks

> >MATT

> >.

 
 
 

DB Owner changed after Restore

Post by Sue Hoegemeie » Thu, 28 Mar 2002 07:20:23


Don't think you can do that if you are doing your restores
through Enterprise Manager. You could create a script or a
job to handle it though.

--Sue

On Tue, 26 Mar 2002 08:48:30 -0800, "Matt Theule"


>Yes, but can this stored procedure be run automatically upon a Restore of a
>(any) database?

>MATT



>> sp_changedbowner.

>> >-----Original Message-----
>> >I handled a phone call today from a client who claimed
>> that when he restored
>> >a database via Enterprise Manager, the owner of another
>> database was reset
>> >to 'sa'.
>> >We created a new database (DB-B) that was to be the
>> target of the restore
>> >procedure.  I verified that the db owner of the db in
>> question was what it
>> >should be.  We used Enterprise Manager to restore the
>> database from a file
>> >that was originally a db on a different server.  After
>> the restore was
>> >successful, we looked at a the database in question and
>> the owner had been
>> >changed to 'sa'!

>> >Is it possible to have some procedure or 'trigger' (for
>> lack of a better
>> >term) that would run upon the Restore Event that could
>> (maybe not the
>> >intent) affect a different database?  Would this
>> procedure need to be
>> >somewhere in the Master table?

>> >Thanks

>> >MATT

>> >.

 
 
 

1. Change DB owner/Table owner

I know it is possible to change the database owner, but am I able to
change
the owner of a table as well?  Currently, the owner of the database and
tables
is EXAV.  The problem is for the programmers...  this is the only table
owned by
anyone other than DBO.  We've got some code that is supposed to work
for both tables and it causes them some coding problems because that
qualifier
isn't the same.  For the tables owned by EXAV, they have to code it
EXAV.tablename
and for the tables owned by DBO, they just code the tablename.

Is there anything I can do short of creating a new database and copying
the data over?
Thanks for the advice!
Toni Eibner

2. result set

3. Changing the DB owner

4. Could explain me WM_CTLCOLOREDIT???

5. change db owner from sa to another login with sysadmin provilege

6. Informix 4gl beautifier

7. Changing all DB object owners to DBO

8. ODBC in UNIX?

9. cannot change DB-owner

10. How to change DB owner

11. change Db owner

12. Change the owner of a DB?