On Embarcadero DBArtisan, I see two tablespaces displayed with the same name CS_DATA. This can’t be true!
When I query v$tablespace, I only see one CS_DATA with tablespace number 56.
SQL> select TS#, NAME from v$tablespace where name='CS_DATA';
TS# NAME
---------- ----------------
56 CS_DATA
Okay, two tablespaces (55 and 56) starting with CS_DATA.
SQL> select TS#, NAME from v$tablespace where name like 'CS_DATA%';
TS# NAME
---------- --------------------
55 CS_DATA
56 CS_DATA
Does the tablespace name ‘CS_DATA ‘ have a whitespace? Nope. It has carriage return or line feed after the letters.
SQL> select TS#, NAME from v$tablespace where name='CS_DATA ';
no rows selected
SQL> select TS#, NAME from v$tablespace where name='CS_DATA
2 ';
TS# NAME
---------- ---------------------
55 CS_DATA
Oracle database alert log reveals how this non-printable character was introduced. Maybe we should not use quotes when creating a tablespace.
CREATE TABLESPACE "CS_DATA
"
DATAFILE '/oradata/cs_data_01.dbf' SIZE 2048M AUTOEXTEND ON NEXT 128K MAXSIZE 10240M
EXTENT MANAGEMENT LOCAL AUTOALLOCATE DEFAULT NO INMEMORY
FLASHBACK ON
LOGGING
ONLINE
DEFAULT COMPRESS BASIC
SEGMENT SPACE MANAGEMENT AUTO
/