SQL>INSERT INTO test_conversion (id, char_data, clob_data, description, mixed_content) VALUES (2, 'This is a CHAR field containing English characters.', NULL, 'Description: CHAR field with English characters', NULL);
SQL>INSERT INTO test_conversion (id, char_data, clob_data, description, mixed_content) VALUES (3, NULL, '包含特殊字符的CLOB字段:$#@!&*()', 'Description: CLOB field with special characters', NULL);
SQL>INSERT INTO test_conversion (id, char_data, clob_data, description, mixed_content) VALUES (4, NULL, '包含表情符号的CLOB字段:😊😂👍 ', 'Description: CLOB field with emojis', NULL);
SQL>set line2222 pages1000 wrap off tab off col char_data for a80 col clob_data for a80 col description for a80 col mixed_content for a80 select*from lucifer.test_conversion orderby id;
SQL>set line2222 pages1000 col owner for a10 col object_name for a30 col object_type for a20 SELECT OWNER, OBJECT_NAME, OBJECT_TYPE FROM dba_objects WHERE OBJECT_ID IN (SELECTUNIQUE obj# FROM sys.source$ WHERE rowid IN (SELECT row_id FROM system.dum$exceptions WHERE obj# = ( select OBJECT_ID FROM dba_objects where OWNER='SYS'AND OBJECT_NAME ='SOURCE$') and TYPE ='8')) ORDERBY owner;
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 21-FEB-2025 13:13:45
Copyright (c) 1991, 2019, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=orcl19c)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production Start Date 21-FEB-2025 13:13:32 Uptime 0 days 0 hr. 0 min. 13 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/product/19.3.0/db/network/admin/listener.ora Listener Log File /u01/app/oracle/diag/tnslsnr/orcl19c/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orcl19c)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) Services Summary... Service "lucifer" has 1 instance(s). Instance "lucifer", status RESTRICTED, has 1 handler(s) for this service... Service "luciferXDB" has 1 instance(s). Instance "lucifer", status RESTRICTED, has 1 handler(s) for this service... The command completed successfully
重启数据库:
1 2
SQL> shutdown immediate SQL> startup
查看数据库字符集:
1 2 3 4 5 6 7 8
SQL>set line2222 pages1000 col parameterfor a30 col valuefor a20 select*from nls_database_parameters whereparameter='NLS_CHARACTERSET';
SQL>set line2222 pages1000 wrap off tab off col char_data for a80 col clob_data for a80 col description for a80 col mixed_content for a80 select*from lucifer.test_conversion orderby id;