我正在尝试将角色应用于用户并收到此错误:SQL Error: ORA-00990: missing or invalid privilege
。这是我创建角色的地方,它以 SYSTEM 身份登录时运行良好。
CREATE ROLE LahmanDBDev;
GRANT CREATE SESSION TO LahmanDBDev;
GRANT CREATE TABLE TO LahmanDBDev;
GRANT CREATE TABLESPACE TO LahmanDBDev;
GRANT CREATE VIEW TO LahmanDBDev;
GRANT CREATE ANY INDEX TO LahmanDBDev;
GRANT CREATE SEQUENCE TO LahmanDBDev;
GRANT CREATE SYNONYM TO LahmanDBDev;
GRANT SELECT ON BASEBALL.MASTER TO LahmanDBDev;
GRANT SELECT ON BASEBALL.BATTING TO LahmanDBDev;
GRANT SELECT ON BASEBALL.FIELDING TO LahmanDBDev;
然后我继续创建用户并向其授予角色,这里我授予角色的第二条语句是我收到错误的地方:
CREATE USER BudSelig
IDENTIFIED BY BudSelig;
GRANT ROLE LahmanDBDev
TO BudSelig;
正确的语法是: