Forum Stats

  • 3,734,240 Users
  • 2,246,920 Discussions
  • 7,857,197 Comments

Discussions

Oracle 18 XE and Label Security, cannot create policy

Hi,

I'm using Oracle 18 Express edition because I want to learn about Oracle Label Security.

Among other documents, I mostly used following as reference:

https://docs.oracle.com/database/121/OLSAG/getting_started.htm#OLSAG3727

Label security seems to be registered and enabled, but I cannot create a policy.

Here are the details:


sqlplus [email protected]/xepdb1 as sysdba

Check if Oracle Label Security has been registered with the database.

SELECT STATUS FROM DBA_OLS_STATUS WHERE NAME = 'OLS_CONFIGURE_STATUS';

=> TRUE

Check if Oracle Label Security is enabled.

SELECT VALUE FROM V$OPTION WHERE PARAMETER = 'Oracle Label Security';

=> TRUE


Now connect as lbacsys

sqlplus lbacsys/[email protected]/xepdb1

BEGIN

 SA_SYSDBA.CREATE_POLICY (

 policy_name     => 'emp_ols_pol',

 column_name     => 'ols_col',

 default_options => 'read_control, update_control');

END;

/


FEHLER in Zeile 1:

ORA-06502: PL/SQL: numerischer oder Wertefehler: Fehler beim Konvertieren von

Zeichen zu Zahl

ORA-06512: in "LBACSYS.LBAC_LGSTNDBY_UTIL", Zeile 100

ORA-06512: in "LBACSYS.LBAC_SYSDBA", Zeile 146

ORA-06512: in "LBACSYS.LBAC_LGSTNDBY_UTIL", Zeile 76

ORA-06512: in "LBACSYS.SA_SYSDBA", Zeile 16

ORA-06512: in Zeile 2


Translation of German error message:

ORA-06502: PL/SQL: numeric or value error: character to number conversion error

"FEHLER" = error, "Zeile" = line. ;-)


Any idea what's going wrong?

Answers

  • bb_as
    bb_as Member Posts: 7 Red Ribbon

    Update: I found following solution:

    Although I don't understand why there is a number conversion error (I cannot see any number in this statement), it brought me to the idea that this could be an issue with NLS parameters.

    NLS_NUMERIC_CHARACTERS are set to ',.' as usual in Germany.

    Then I tried to set these to American settings:

    alter session set NLS_NUMERIC_CHARACTERS = '.,';

    Surprise: the call to SA_SYSDBA.CREATE_POLICY succeeded!

    This behaviour is totally unexpected for me. Why should calls to Oracle-functions depend on a specific NLS-setting?

Sign In or Register to comment.