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.
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 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 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. |