23c

Oracle/Administration

Read Only PDB User

Oracle 23c에 PDB 유저를 Read Only로 설정할 수 있는 기능이 추가되었습니다. 테스트를 위해 아래와 같이 u1 유저를 생성하겠습니다. -- 1: SYS DROP USER u1 CASCADE; CREATE USER u1 IDENTIFIED BY u1 DEFAULT TABLESPACE users QUOTA UNLIMITED ON users; GRANT CREATE SESSION to u1; 아래와 같이 Read Only로 설정한 u1 유저에서 DML을 수행하면 ORA-28194 에러가 발생합니다. -- 2-1: U1 CREATE TABLE t1 (c1 NUMBER); INSERT INTO t1 VALUES (1); 1 개의 행이 만들어졌습니다. -- 2-2: SYS ALTER USER u1 ..

Oracle/Administration

LOB 세그먼트명 변경 프로시저

Oracle 23c에 LOB 세그먼트명을 변경할 수 있는 기능이 추가되었습니다. To rename an existing LOB segment users perform an operation such as ALTER TABLE ... MOVE, which could perform slowly since the operation physically moves the LOB data as part of the renaming. This enhancement improves the performance of renaming a LOB segment, at the table, partition and subpartition level by eliminating the physical movement of the ..

Oracle/SQL

SYS_ROW_ETAG 함수

Oracle 23c에 SYS_ROW_ETAG 함수가 추가되었습니다. 이 함수는 칼럼 입력 순서와 무관하게 입력 값에 대한 고유한 32바이트 RAW 값을 반환합니다. 결과 값을 사용하면 데이터 변경 여부를 확인할 수 있습니다. SYS_ROW_ETAG (([[schema_name.]table_name.]column_name) [,([[schema_name.]table_name.]column_name)]...) 테스트를 위해 아래와 같이 테이블을 생성하겠습니다. -- 1 DROP TABLE t1 PURGE; CREATE TABLE t1 (c1 NUMBER, c2 VARCHAR2(1), c3 VARCHAR2(1), c4 VARCHAR2(1)); INSERT INTO t1 VALUES (1, 'A', 'A', '..

Oracle/Administration

Precheckable Constraints using JSON SCHEMA

Oracle 23c에 Precheckable Constraints using JSON SCHEMA 기능(이후 Precheck 제약 조건)이 추가되었습니다. Precheck 제약 조건의 JSON 값을 사용하면 애플리케이션에서 값을 사전 검증할 수 있습니다. Supported check constraints can be checked outside the database. For this, you mark the check constraint as PRECHECK. For example, you can create a JSON Schema document from a table or column with precheckable check constraint. This means that data could ..

Oracle/Administration

DDL auto commit 비활성화

Oracle 23c에 DDL 문이 수행하는 auto commit을 비활성화하는 기능이 추가되었습니다. 이 기능은 _kql_disable_auto_commit 파라미터와 관련이 있습니다. 이 파라미터를 TRUE로 설정하면 DDL 문 수행 전후에 자동으로 수행되는 커밋이 비활성화됩니다. -- 1 NAME VALUE DEFAULT_VALUE DESCRIPTION ------------------------ ----- ------------- -------------------------------------- _kql_disable_auto_commit FALSE FALSE Disable DDL auto commit in the session 테스트를 위해 아래와 같이 테이블을 생성하겠습니다. -- 2 DRO..

Oracle/Administration

최대 칼럼 수 증가

Oracle 23c부터 테이블과 뷰의 최대 칼럼 수가 1000개에서 4096개로 늘어났습니다. The maximum number of columns allowed in a database table or view has been increased to 4096. This feature allows you to build applications that can store attributes in a single table with more than the previous 1000-column limit. Some applications, such as Machine Learning and streaming IoT application workloads, may require the use of de-nor..

Oracle/Performance

SQL Analysis Report

Oracle 사의 Product Manager인 Nigel Bayliss가 포스팅한 New SQL Analysis Report in Oracle Database 23c Free! 글에서 Oracle 23c에 SQL Analysis Report 기능이 추가된 것을 알 수 있습니다. 테스트를 위해 아래와 같이 테이블을 생성하겠습니다. -- 1 DROP TABLE t1 PURGE; CREATE TABLE t1 (c1, c2) AS SELECT ROWNUM, LPAD ('X', 100, 'X') FROM XMLTABLE ('1 to 10000'); CREATE INDEX t1_x1 ON t1 (c1); 아래 쿼리는 조인 조건이 없어 cartesian product이 발생합니다. 실행 계획 하단에 조인 조건을 추..

Oracle/SQL

에러 메시지 개선

DOAG 2022에서 Gerald Venzl가 발표한 New and cool features for developers in Oracle database 프리젠테이션에 Oracle 23c부터 에러 메시지가 개선된다는 내용이 포함되어 있습니다. 참고로 이 내용은 New Features Guide에 포함되어 있지 않습니다. 테스트를 위해 아래와 같이 테이블을 생성하겠습니다. -- 1 DROP TABLE t1 PURGE; CREATE TABLE t1 (c1 NUMBER, c2 NUMBER); 아래 쿼리로 ORA-00979 에러 메시지가 개선된 것을 볼 수 있습니다. -- 2-1: 23.2 SELECT c1, c2 FROM t1 GROUP BY c1; ORA-00979: "C2": GROUP BY 표현식과 일치..

Oracle/Administration

Automatic Transaction Rollback

Oracle 23c에 Automatic Transaction Rollback 기능이 추가되었습니다. 이 기능은 블로킹이 발생한 후 일정 시간이 경과하면 우선순위 낮은 트랜잭션을 중단시켜 동시성을 향상시킵니다. If a transaction does not commit or rollback for a long time while holding row locks, it can potentially block other high-priority transactions. This feature allows applications to assign priorities to transactions and for administrators to set timeouts for each priority. The data..

Oracle/Administration

스키마 권한

Oracle 23c에 스키마 권한이 추가되어 스키마 단위로 권한을 관리할 수 있게 되었습니다. Oracle Database supports schema privileges in addition to the existing object, system, and administrative privileges. This feature improves security by simplifying authorization for database objects to better implement the least privileges principle. 테스트를 위해 아래와 같이 u1, u2 유저를 생성하겠습니다. -- 1 DROP USER u1 CASCADE; DROP USER u2 CASCADE; CREATE USE..

Oracle/Performance

Lock-Free Reservation #2

개요 지난 글에 이어 2,000개의 세션에서 1,000개의 티켓을 예약하는 시나리오를 가정하고 Lock-Free Reservation, Pessimistic Locking, FOR UPDATE SKIP LOCKED 방식의 성능을 측정해보겠습니다. 참고로 Oracle 23c Free는 2 코어만 지원하므로 향후 추가 테스트가 필요할 것으로 보입니다. Lock-Free Reservation Lock-Free Reservation 방식을 테스트를 위해 아래와 같이 테이블을 생성하겠습니다. -- 1 ALTER TABLE t1 MODIFY (c2 NOT RESERVABLE); DROP TABLE t1 PURGE; DROP TABLE t2 PURGE; CREATE TABLE t1 ( c1 NUMBER , c2 NU..

Oracle/SQL

Lock-Free Reservation #1

Oracle 23c에 Lock-Free Reservation 기능이 추가되었습니다. 해당 기능은 로우 락 대신 Reservation Journal 테이블(이후 저널 테이블)을 통해 잔고, 재고, 예약 가능 좌석 수 등을 갱신하는 트랜잭션의 동시성을 향상시킵니다. Lock-Free Reservations enables concurrent transactions to proceed without being blocked on updates of heavily updated rows. Lock-Free reservations are held on the rows instead of locking them. Lock-Free Reservations verifies if the updates can succeed..

정희락
'23c' 태그의 글 목록