Creating Versus Owning Objects in the Hierarchy - Teradata Database

Teradata Database Administration

Product
Teradata Database
Release Number
15.10
Language
English (United States)
Last Update
2018-10-06
Product Category
Software

Creating Versus Owning Objects in the Hierarchy

There is a difference between creating and owning objects in the database hierarchy. Owner privileges and creator privileges are different and determine default settings for undefined parameters during creation.

  • The creator of an object is the user who submitted the CREATE statement. Every object has one and only one creator.
  • Note: If the CREATE statement is executed within a macro, then the user who executed the macro is the creator of the object. The macro is just a vehicle for that creation.

  • The owner of an object is any database or user above the object in the database hierarchy.
  • The immediate owner (or parent) of a new user or database is the owner of the space in which the object resides. (In other words, a database or user that has space subtracted from its own permanent space to create a new object becomes the immediate owner of that new object.) The creator is the user who submitted the CREATE statement, but that user can specify a different database with the FROM database option of the CREATE USER or CREATE DATABASE statement. For details, see “About Creating a Database or User” on page 47.
  • The default database is the database of the creating user, but can be a different database if you precede the object name with the database name and a period separator (databasename.objectname) in the CREATE statement.

    An object must always have an immediate owner; that is, an immediate owner of one or more objects cannot be dropped. However, the immediate owner of a database or user can be changed. (See “Transferring Ownership with GIVE” on page 60.)

    The following table lists the basic rules defining a creator, an owner, and an immediate owner.

     

    IF …

    THEN …

    you execute a CREATE statement that creates an object (anywhere in the Teradata Database)

    you are the creator of that object. You are not necessarily an owner, or the immediate owner, of that object.

    an object is directly below you in the hierarchy

    you are the immediate owner of that object.

    you create an object in your own database

    you are both the creator and the immediate owner of that object.

    you create an object in the space of another user or database (assuming you have the privilege that allows you to do so)

  • you are the creator of the object.
  • the other user or database is the immediate owner of the object.
  • UserA owns UserB
  • UserB creates an object in the database of UserB
  • UserB is the creator of the object.
  • UserB is the immediate owner of the object. UserA is also an owner, but not the immediate owner of the object.
  • you are using directory server integration and UserC is a directory-based user mapped to database-based UserA, and UserC creates a database in UserD

    UserA is recorded as the creator and UserD is recorded as the immediate owner of the new database.