Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Change Oject Schema?

Change Oject Schema?

Change Oject Schema?

Hi, help anyone?
Is it possible to change the schema an object is related to? eg change schemaA.table1 to schemaB.table1

Also, Is it possible to change the Owner of a schema? Eg, say I created a bunch of tables while accidentally being logged on as sysadm and now want to change the schema owner to a new ident.

Thanks in advance.

RE: Change Oject Schema?

At the SQL level you have to do this by recreating the tables in the new schema and then copying the rows (insert into schemaB.table1 select * from schemaA.table1).

To do this with the mimload utility you can save all SYSADM's tables and data to a file:

mimload -u SYSADM -p PASSWORD unload to 'data.sql' from current user

You can then change the file data.sql and change all "SYSADM" to whatever new user you want. Then recreate the tables and data with:

mimload -u USER1 -p U1PASS "load from 'a.sql' log stderr"

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close