Skip to content

Increase Text Size Limit of Oracle RDS Instance

0

How can I increase the Text Size Limit to completely display one of the query via Performance Insights?

By default, Performance Insights displays up to 4096 bytes for each SQL statement. To download the entire SQL text, update the text size limit parameter for your DB instance.
1 Answer
1

Hi,

For viewing the complete SQL Text for the SQL Query captured in RDS performance insights console, you can get the sql id of the sql query and use the Oracle dictionary view v$sql / v$sqlarea in the RDS for Oracle database instance to get the full text for the SQL Query.

For example,

Below is the sql id - cm7zuq7ub80up captured in the RDS performance insights,

RDS for Oracle Performance Insights

Login in to RDS for Oracle database and run the below query to get the complete SQL Text for the Query,

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.20.0.0.0

SQL> set lines 200 pages 1000
SQL> set long 9999999
SQL> select sql_fulltext from v$sql where sql_id='cm7zuq7ub80up';

SQL_FULLTEXT
--------------------------------------------------------------------------------
INSERT /*+ APPEND */ INTO SPORTING_EVENT_TICKET(ID,SPORTING_EVENT_ID,SPORT_LOCAT
ION_ID,SEAT_LEVEL,SEAT_SECTION,SEAT_ROW,SEAT,TICKET_PRICE) SELECT SPORTING_EVENT
_TICKET_SEQ.NEXTVAL ,SPORTING_EVENT.ID ,SEAT.SPORT_LOCATION_ID ,SEAT.SEAT_LEVEL
,SEAT.SEAT_SECTION ,SEAT.SEAT_ROW ,SEAT.SEAT ,(CASE WHEN SEAT.SEAT_TYPE = 'luxur
y' THEN 3*:B2 WHEN SEAT.SEAT_TYPE = 'premium' THEN 2*:B2 WHEN SEAT.SEAT_TYPE = '
standard' THEN :B2 WHEN SEAT.SEAT_TYPE = 'sub-standard' THEN 0.8*:B2 WHEN SEAT.S
EAT_TYPE = 'obstructed' THEN 0.5*:B2 WHEN SEAT.SEAT_TYPE = 'standing' THEN 0.5*:
B2 END ) TICKET_PRICE FROM SPORTING_EVENT ,SEAT WHERE SPORTING_EVENT.LOCATION_ID
 = SEAT.SPORT_LOCATION_ID AND SPORTING_EVENT.ID = :B1

Regarding the SQL Text limit for Oracle databases, you can refer to the below document,

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Oracle.Concepts.ExtendedDataTypes.html

The default size limits are 4,000 bytes for the VARCHAR2 and NVARCHAR2 data types, and 2,000 bytes for the RAW data type for Oracle database engine.

Following is the Oracle vendor documentation regarding the MAX_STRING_SIZE database parameter - https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/MAX_STRING_SIZE.html

AWS

answered 2 years ago

EXPERT

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.