If you are on Netezza Performance Server
Replication Services 3.0.1.0 or later, learn how to specify which users might be used as replication
users for capture and apply procedures on a specified replication node.
You can use any existing database users as replication users for capture and apply
procedures.
By default, when the Netezza Performance Server
Replication Services is installed and configured, admin is used as the default
replication user for capture and apply operations.
Procedure
-
Ensure that the user that you want to define for capture and apply procedures exists in the
database.
- Log in to Netezza Performance Server.
- With nzsql, as
admin, list
users:SYSTEM.ADMIN(ADMIN)=> \du
Example:SYSTEM.ADMIN(ADMIN)=> \du
List of Users
USERNAME | VALIDUNTIL | ROWLIMIT | SESSIONTIMEOUT | QUERYTIMEOUT | DEF_PRIORITY| MAX_PRIORITY | USERESOURCEGRPID | USERESOURCEGRPNAME | CROSS_JOINS_ALLOWED
----------+------------+----------+----------------+--------------+--------------+--------------+------------------+--------------------+---------------------
ADMIN | | | 0 | 0 | NONE | NONE | | _ADMIN_ | NULL
(1 row)
If the user that you want to use does not exist, create it.
Typically,
Netezza Performance Server database users are created with
the
CREATE USER command.
Database users might be local users (username and password are maintained within the database) or
defined in an external repository (LDAP or Windows AD servers), which is integrated with
Netezza Performance Server.
Tip: Use local
authentication to speed up the user authentication every time a capture/apply process runs. Use the
AUTH LOCAL option of the CREATE USER command.
SQL
example:
SYSTEM.ADMIN(ADMIN)=> create user myrepluser with password 'test123';
CREATE USER
SYSTEM.ADMIN(ADMIN)=> \q
Tip: You can also check currently registered replication user for each of the
replication nodes. For more information, see
Listing replication users.
- Ensure that the user from step 1 has the
BACKUP and
RESTORE privileges.
SYSTEM.ADMIN(ADMIN) =>\dpu USERNAME
If the user does not have the privileges, grant them.
SQL
example:
SYSTEM.ADMIN(ADMIN)=> grant BACKUP to myrepluser;
GRANT
SYSTEM.ADMIN(ADMIN)=> grant RESTORE to myrepluser;
GRANT
SYSTEM.ADMIN(ADMIN)=> grant SELECT, UPDATE on _t_attribute to myrepluser;
GRANT
SYSTEM.ADMIN(ADMIN)=> grant SELECT, INSERT, UPDATE on _t_backup_history to myrepluser;
GRANT
SYSTEM.ADMIN(ADMIN)=> grant SELECT, INSERT, UPDATE on _t_restore_history to myrepluser;
GRANT
SYSTEM.ADMIN(ADMIN)=> grant SELECT on _t_database to myrepluser;
GRANT
SYSTEM.ADMIN(ADMIN)=> grant SELECT, UPDATE on _t_object to myrepluser;
GRANT
SYSTEM.ADMIN(ADMIN)=> grant ALL on database to myrepluser;
GRANT
SYSTEM.ADMIN(ADMIN)=> \q
What to do next
After you specified which users might be used as replication users, register the
credentials of that user with NRS for the replication node where the user is created. You can
register the user in one of the following ways: