Each database has an owner. To change the owner of a history
database, alter both the database and the history configuration to
reflect the new ownership.
About this task
To change the ownership of a history database:
Procedure
- Log in to the Netezza Performance Server system
as the nz user.
- If the new owner does not already have a
user account, create one.
For example:
nzsql -c "create user sam with password 'sk3nk'"
- Grant the List permission to the new owner
for the history database.
For example:
nzsql -c "grant list on histdb1 to sam"
- If you are changing the owner of the database
referred to by the active history configuration:
- Switch to a different history configuration that disables history-data
collection or that specifies a different history database. For example:
nzsql -c "Set history configuration histdb1_off"
- Activate the newly set history configuration by stopping and restarting
the system, that is, by issuing the nzstop and nzstart commands.
- Change the owner of the history database.
For example:
nzsql c "alter database histdb1 owner to sam"
- In each of the non-active history configurations
for the database, change the database owner and password.
For
example:
nzsql -c "alter history configuration histdb1_plan user sam password 'sk3nk'"
nzsql -c "alter history configuration histdb1_col user sam password 'sk3nk'"
- To activate a changed history configuration:
- Set the changed history configuration to be the active configuration.
For example:
nzsql -c "set history configuration histdb1_plan"
- Activate the changed history configuration by stopping and restarting
the system, that is, by issuing the nzstop and nzstart commands.