ALTER USER MAPPING

Change the definition of user map for external servers.

Summary

ALTER USER MAPPING FOR { username | USER | CURRENT_USER | PUBLIC }
    SERVER servername
    OPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ] )

describe

ALTER USER MAPPING Changes the definition of user mapping for external servers.

The owner of an external server can change the user mapping of that server for any user. Similarly, users who are granted USAGE privileges on the server can change the user mapping of their own username.

Parameters

username

  • Map username. CURRENT_USER and USER match the name of the current user. PUBLIC is used to match all current and future user names in the system.

servername

  • User mapped server name.

OPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ] )

  • Change the options for user mapping. The new option will overwrite all previously specified options. ADD, SET, and DROP specify the action to perform. If no action is explicitly specified, the default action is ADD. The option name must be unique. The YMatrix database uses the server's external data wrapper to verify names and values.

Example

Change the password of user map bob, server foo:

ALTER USER MAPPING FOR bob SERVER foo OPTIONS (SET password 'public');

compatibility

ALTER USER MAPPING complies with ISO/IEC 9075-9 (SQL/MED). There is a subtle syntax problem: the standard omits the FOR keyword. Since both CREATE USER MAPPING and DROP USER MAPPING use FOR in similar locations, YMatrix is ​​different from the standard here for consistency and interoperability.

See also

CREATE USER MAPPING , DROP USER MAPPING