Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I change DB/table owner

Status
Not open for further replies.

nontrad

MIS
Jan 10, 2001
83
US
I am the (student) DBA and I need to change the owner of tables/DB from the (departed) DBA username to my own before I delete her from the system. How do I do that?
 
I would export from the old id and then import to your id.
 
Do you mean stop the DB, export the DB, and then create a new DB, importing the data and then starting this?

Since this is a working DB, that may cause problems.

E.
 
No, I didn't mean for you to create a whole new database just because one id has changed. Just create your id on the existing database and import using this id. That will create copies of all objects owned by the previous dba in your schema.


You should check DBA_DEPENDENCIES to find objects in other schemas that reference objects in the departed DBA's schema. These dependent objects will have to be manually adjusted to refer to the new objects in your schema. This sounds like a real pain if there are a lot of dependencies. That might be incentive to give the new id a fairly generic name. That way it can be passed on to a new DBA when you leave without deleting the entire account. Just change the password and the new DBA is ready to take over.
 
OK. I'll research it. I have already created a new name called DBOWNER with DBA privileges that I plan to transfer all the DBs and table ownership to.

I checked DB_DEPENDENCIES and her username is not listed as an owner or referenced_owner.

My Oracle 8i book only uses import/export in moving DB data. Are you talking about something else?

How would I import her stuff into the DBOWNER schema? Will that change the ownership of the DB/table to DBOWNER?

I am accessing Oracle at a Sun workstation (Unix).

E.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top