请帮助我找出为什么在获取足够的空间用于记录角色时,识别标识太长的错误。
例外:
Error report -
ORA-06550: line 14, column 24:
PLS-00114: identifier 'ou=internal,ou=users,dc=chinas' too long
ORA-06550: line 18, column 24:
PLS-00114: identifier 'ou=internal,ou=users,dc=chinas' too long
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
代码:
declare
type app_realm_rec is record
(
resource_filter varchar2(500),
status varchar2(500),
role varchar2(500)
);
type app_realm_tab is table of app_realm_rec index by pls_integer;
realm_tab app_realm_tab;
begin
realm_tab(1).resource_filter := "/secure/records*";
realm_tab(1).status := "true";
realm_tab(1).role := "ou=internal,ou=users,dc=chinastreet,dc=com;ou=external,ou=users,dc=chinastreet,dc=com";
realm_tab(2).resource_filter := "/secure/login";
realm_tab(2).status := "false";
realm_tab(2).role := "ou=internal,ou=users,dc=chinastreet,dc=com;ou=external,ou=users,dc=chinastreet,dc=com";
DBMS_OUTPUT.PUT_LINE('hello');
end;
答案 0 :(得分:8)
在PL SQL中使用单引号作为字符串
declare
type app_realm_rec is record
(
resource_filter varchar2(500),
status varchar2(500),
role varchar2(500)
);
type app_realm_tab is table of app_realm_rec index by pls_integer;
realm_tab app_realm_tab;
begin
realm_tab(1).resource_filter := '/secure/records*';
realm_tab(1).status := 'true';
realm_tab(1).role := 'ou=internal,ou=users,dc=chinastreet,dc=com;ou=external,ou=users,dc=chinastreet,dc=com';
realm_tab(2).resource_filter := '/secure/login';
realm_tab(2).status := 'false';
realm_tab(2).role := 'ou=internal,ou=users,dc=chinastreet,dc=com;ou=external,ou=users,dc=chinastreet,dc=com';
DBMS_OUTPUT.PUT_LINE('hello');
end;