Search code examples
teradatadatabase-administration

Teradata 15: How to move database from one parent to another?


We are using Teradata 15.0. Utilizing Teradata's unique feature that you can create databases under another database as parent. I have created DEV,TEST,CERT, and Prod database "folders" to better orgonaize databases in my company.

After a few months, I realized that I need to clean up some of my earlier mistakes and I want to move some databases to a new folder so that my entire database strucutre looks neat and professional.

I can simply drop and re-create databases so that the new one will be in the new "folder", but my users are using some old databases, so it is not that easy just to drop and re-create.

I look for a simple command or Teradata SQL admin GUI to move dataabses from one parent to another.

Any advise?

Thanks


Solution

  • There's the GIVE command to change the immediate owner of a database. You need DROP rights on the database and CREATE on the new owner.

    This is mainly used for moving perm space within the hierarchy:

    create database dummydb as perm = 10e+9;
    give dummydb to db_where_space_is _needed;
    drop database dummydb;