There are prerequisites for using maps to distribute table data across AMPs:
- User DBC must grant the LOGON privilege to user TDMaps. TDMaps is a system database that contains the information and SQL stored procedures used for managing maps.
- After the first logon to TDMaps (the initial password is tdmapsadmin), change the password for TDMaps.
- Give TDMaps enough space to store rows in the ActionsTbl and ActionHistoryTbl. A rough guideline is the size of TVM. The following example determines the size of TVM:
SELECT SUM(CurrentPerm) FROM DBC.TableSizeV WHERE TableName='TVM';
- Grant DBAs privileges on TDMaps:
- To grant the use of TDMaps procedures:
GRANT EXECUTE PROCEDURE ON TDMaps TO <User>;
- To grant the ability to query TDMaps tables:
GRANT SELECT ON TDMaps TO <User>;
- To grant the ability to modify TDMaps tables:
GRANT INSERT, UPDATE, DELETE ON TDMaps TO <User>;
- To grant the use of TDMaps procedures:
- Grant DBAs privileges on maps:
- To grant the privileges to create and drop maps, for example:
GRANT CREATE MAP TO Roger WITH GRANT OPTION;
GRANT DROP MAP TO Roger WITH GRANT OPTION;
- To grant the existing contiguous or spare map to a user or role, for example:
GRANT MAP SomeMapName TO Roger WITH GRANT OPTION;
Maps must be granted before they can be used in an SQL statement. This requirement does not apply to default maps.
- To grant the privileges to create and drop maps, for example:
When a user creates a map, the user is granted that map by default. User TDMaps is automatically granted the default sparse maps.