Skip to content

Workarounds for Oracle11G#1

Open
Stef-33560 wants to merge 2 commits intoMOODLE_36_STABLEfrom
MOODLE_36_STABLE-ORA11G
Open

Workarounds for Oracle11G#1
Stef-33560 wants to merge 2 commits intoMOODLE_36_STABLEfrom
MOODLE_36_STABLE-ORA11G

Conversation

@Stef-33560
Copy link
Copy Markdown
Owner

@Stef-33560 Stef-33560 commented Jun 3, 2021

  • Workaround for ORA-01722

SQL error “ORA-01722: invalid number”, triggered when used on Oracle 11g (database charset Unicode AL32UTF8).
NLS_NUMERIC_CHARACTERS seems linked ; Oracle differs from mariadb on dates (bug when especially creating a quizz "pairing"). Check with SELECT TO_NUMBER('-,5') FROM DUAL

=> Workaround in oci_native_moodle_database.php solves the problem.

  • Workaround for ORA-06502

When searching in a glossary, box "search in definitions" uncheck, a debug info appears. It deals with ORA-06502 complaining about a string too short on MOODLELIB:86 (stacktrace lib/dml/moodle_database.php:486 dmi_read_exception thrown)

=> workaround in MOODLELIB function FUNCTION TRICONCAT to use DMBS_LOB solves the problem.

  • Oracle Requirements

The following requirements are needed to use moodle 36 ; must install :

DBMS_LOB to manage CLOB ; execute GRANT EXECUTE ON dmbs_lob to <<schema>>
DBMS_RANDOM
DBMS_LOCK

Workaround for ORA-01722 SQL error “ORA-01722: invalid number”, triggered when used on Oracle 11g database charset Unicode AL32UTF8.
NLS_NUMERIC_CHARACTERS seems linked ; Oracle differs from mariadb on dates (bug when especially creating a quizz "pairing")

This workaround solves the problem.
Check with SELECT TO_NUMBER('-,5') FROM DUAL

Please note following requirement to use moodle 36 on Oracle ; install :
 * DBMS_LOB to manage CLOB ; execute ```GRANT EXECUTE ON dmbs_lob to <<schema>>```
 * DBMS_RANDOM
 * DBMS_LOCK
@Stef-33560 Stef-33560 added the bug Something isn't working label Jun 3, 2021
@Stef-33560 Stef-33560 self-assigned this Jun 3, 2021
When searching in a glossary, box "search in definitions" uncheck, a debug info appears.
It deals with ORA-06502 complaining about a string too short on MOODLELIB:86 (stacktrace lib/dml/moodle_database.php:486 dmi_read_exception thrown)

Apply this workaround and recompile package moodlelib brings things OK.
@Stef-33560 Stef-33560 marked this pull request as ready for review June 3, 2021 19:17
@Stef-33560 Stef-33560 changed the title DRAFT : workaround for ORA-01722 DRAFT : workaround for Oracle11G Jun 3, 2021
@Stef-33560 Stef-33560 changed the title DRAFT : workaround for Oracle11G Workarounds for Oracle11G Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant