변경 데이터 캡처 중에 Datastream은 Oracle 재실행 로그 파일을 읽어 소스 데이터베이스의 변경사항을 모니터링하고 이를 대상 인스턴스로 복제합니다. 각 Oracle 데이터베이스에는 온라인 재실행 로그 파일 세트가 있습니다. 데이터베이스의 모든 트랜잭션 레코드가 파일에 기록됩니다. 현재 재실행 로그 파일이 순환 (또는 전환)되면 보관처리 프로세스가 이 파일을 Archive Storage에 복사합니다. 한편 데이터베이스는 다른 파일을 현재 파일로 승격합니다.
Datastream Oracle 커넥터는 보관처리된 Oracle 재실행 로그 파일에서 변경 데이터 캡처 (CDC) 이벤트를 추출합니다.
재실행 로그 파일 액세스
Datastream은 Oracle LogMiner API 또는 바이너리 리더 메서드를 사용하여 재실행 로그 파일에 액세스할 수 있습니다.
Oracle LogMiner: Oracle 데이터베이스에 포함된 기본 유틸리티입니다.
Oracle LogMiner API를 사용하도록 Datastream을 구성하면 Datastream은 보관처리된 재실행 로그 파일만 사용할 수 있으며 온라인 재실행 로그 파일은 지원되지 않습니다.
LogMiner API 메서드는 단일 스레드이며 트랜잭션 수가 많은 소스 데이터베이스로 작업할 때 지연 시간이 길어지고 처리량이 낮아집니다.
LogMiner는 대부분의 데이터 유형과 Oracle 데이터베이스 기능을 지원합니다.
바이너리 리더 (미리보기): 온라인 및 보관된 재실행 로그 파일 모두와 작동하는 전문적인 고성능 유틸리티입니다. 바이너리 리더는 자동 스토리지 관리 (ASM)를 사용하여 로그 파일에 액세스하거나 데이터베이스 디렉터리 객체를 사용하여 파일을 직접 읽을 수 있습니다.
바이너리 리더는 멀티 스레드이며 지연 시간이 짧은 CDC를 지원합니다. 또한 데이터베이스 작업 외부에서 redo 로그가 파싱되므로 소스 데이터베이스에 미치는 영향이 적습니다. 바이너리 리더 CDC 메서드는 특정 데이터 유형이나 기능을 제한적으로 지원합니다. 자세한 내용은 알려진 제한사항을 참고하세요.
Oracle 재실행 로그 파일의 구성 매개변수 설정
이 설계는 Datastream의 잠재적 지연 시간에 큰 영향을 미칩니다. Oracle의 재실행 로그 파일이 자주 전환되거나 더 작은 크기(예: 256MB 미만)로 유지되면 Datastream에서 변경사항을 더 빠르게 복제할 수 있습니다.
로그 파일 순환 빈도를 제어하기 위해 설정할 수 있는 구성 매개변수는 다음과 같습니다.
크기: 온라인 재실행 로그 파일의 최소 크기는 4MB이며 기본 크기는 운영체제에 따라 다릅니다. 새 온라인 로그 파일을 만들고 이전 로그 파일을 삭제하여 로그 파일의 크기를 수정할 수 있습니다.
온라인 재실행 로그 파일의 크기를 확인하려면 다음 쿼리를 실행합니다.
SELECTGROUP#,STATUS,BYTES/1024/1024MBFROMV$LOG
시간:ARCHIVE_LAG_TARGET 매개변수는 기본 데이터베이스의 현재 로그가 도달할 수 있는 시간의 상한(초)을 제공합니다.
로그를 보관처리하는 데 걸리는 시간을 고려하기 때문에 정확한 로그 전환 시간은 아닙니다. 기본값은 0(상한값 없음)이며 1800(또는 30분) 이하의 합리적인 값이 권장됩니다.
초기화 중에 또는 데이터베이스가 실행되는 동안 다음 명령어를 사용하여 ARCHIVE_LAG_TARGET 매개변수를 설정할 수 있습니다.
SHOW PARAMETER ARCHIVE_LAG_TARGET;: 이 명령어는 현재 로그가 스팬되는 데 걸리는 시간(초)을 표시합니다.
ALTER SYSTEM SET ARCHIVE_LAG_TARGET = number-of-seconds; 이 명령어를 사용하여 상한을 변경합니다.
예를 들어 상한을 10분(또는 600초)으로 설정하려면 ALTER SYSTEM SET ARCHIVE_LAG_TARGET = 600;을 입력합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eDatastream utilizes Oracle redo log files to capture changes in source databases and replicate them to the destination instance.\u003c/p\u003e\n"],["\u003cp\u003eDatastream can access redo logs using either the Oracle LogMiner API, which only supports archived files and is single-threaded, or the binary reader method, which supports both online and archived files and is multi-threaded.\u003c/p\u003e\n"],["\u003cp\u003eThe frequency of Oracle redo log file switching, controlled by size and time parameters, significantly impacts Datastream's latency, with smaller, more frequently switched files enabling faster replication.\u003c/p\u003e\n"],["\u003cp\u003eConfiguration parameters, including file size (ideally under 1GB) and the \u003ccode\u003eARCHIVE_LAG_TARGET\u003c/code\u003e parameter (recommended to be 1800 seconds or less), can be adjusted to optimize redo log file rotation for Datastream's performance.\u003c/p\u003e\n"],["\u003cp\u003eWhile manual switching of redo log files via \u003ccode\u003eALTER SYSTEM SWITCH LOGFILE;\u003c/code\u003e is possible for testing, it is not recommended for production due to required privileges and performance impact on the database.\u003c/p\u003e\n"]]],[],null,["# Work with Oracle database redo log files\n\nDuring change data capture, Datastream reads Oracle redo log files to\nmonitor your source databases for changes and replicate them to the destination\ninstance. Each Oracle database has a set of online redo log files. All\ntransaction records on the database are recorded in the files. When the current\nredo log file is rotated (or switched), the archive process\n[copies this file into an archive storage](https://docs.oracle.com/cd/B19306_01/server.102/b14231/archredo.htm#i1006148). Meanwhile, the database promotes\nanother file to serve as the current file.\n\nDatastream Oracle connector extracts change data capture (CDC) events\nfrom **archived** Oracle redo log files.\n\nAccess redo log files\n---------------------\n\nDatastream can use the Oracle LogMiner API or the binary\nreader method to access the redo log files:\n\n- **Oracle LogMiner** : an out-of-the-box utility included in Oracle databases.\n If you configure Datastream to use Oracle LogMiner API, Datastream\n can only work with *archived* redo log files, online redo log files aren't supported.\n The LogMiner API method is single-threaded and is subject to higher latency and\n lower throughput when working with large transaction number source databases.\n LogMiner supports most data types and Oracle database features.\n\n- **Binary reader** ([Preview](/products#product-launch-stages)):\n a specialized, high-performance utility that works with both online and archived\n redo log files. Binary reader can access the log files using Automatic Storage\n Management (ASM) or by reading the files directly using database directory objects.\n Binary reader is multithreaded and supports low-latency CDC. It also creates low\n impact on the source database as redo logs are parsed outside of the database\n operations. The binary reader CDC method has limited support for certain data\n types or features. For more information, see\n [Known limitations](/datastream/docs/sources-oracle#binary-reader-limitations).\n\nSet configuration parameters for Oracle redo log files\n------------------------------------------------------\n\nThis design has profound implications on Datastream's potential latency. If Oracle's redo log files are switched frequently or kept to a smaller size (for example, \\\u003c 256MB), Datastream can replicate changes faster.\n\nThere are configuration parameters that you can set to control the log file rotation frequency:\n\n- **Size:** Online redo log files have a minimum size of 4 MB, and the default size is dependent on your operating system. You can modify the size of the log files by creating new online log files and dropping the older log files.\n\n To find the size of the online redo log files, run the following query: \n\n ```sql\n SELECT GROUP#, STATUS, BYTES/1024/1024 MB FROM V$LOG\n ```\n | Generating very large log files might cause Datastream to time out, which can lead to stream failure. The recommended redo log file size is below 1GB.\n |\n | For information about resizing redo logs for a self-hosted Oracle instance, see [How to resize redo logs in Oracle](https://logic.edchen.org/how-to-resize-redo-logs-in-oracle).\n |\n | For information about resizing redo logs for an Amazon RDS Oracle instance, see [Resizing online redo logs](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.Oracle.CommonDBATasks.Log.html#Appendix.Oracle.CommonDBATasks.ResizingRedoLogs).\n- **Time:** The `ARCHIVE_LAG_TARGET` parameter provides an upper limit of how long (in seconds) the current log of the primary database can span.\n\n This isn't the exact log switch time, because it takes into account how long it will take to archive the log. The default value is `0` (no upper bound), and a reasonable value of `1800` (or 30 minutes) or less is suggested.\n\n You can use the following commands to set the `ARCHIVE_LAG_TARGET` parameter, either during initialization or while the database is up:\n - `SHOW PARAMETER ARCHIVE_LAG_TARGET;` This command displays how many seconds it will take for the current log to span.\n - `ALTER SYSTEM SET ARCHIVE_LAG_TARGET = `\u003cvar translate=\"no\"\u003enumber-of-seconds\u003c/var\u003e`;` Use this command to change the upper limit.\n\n For example, to set the upper limit to 10 minutes (or 600 seconds), enter `ALTER SYSTEM SET ARCHIVE_LAG_TARGET = `\u003cvar translate=\"no\"\u003e600\u003c/var\u003e`;`\n| You can switch the redo log files manually by running the following command:\n|\n| `ALTER SYSTEM SWITCH LOGFILE;`\n|\n| Although using this command is effective for testing purposes, we don't recommend it for production use-cases because of the privileges it requires and the significant performance impact on the database.\n\nWhat's next\n-----------\n\n- Learn more about [Oracle as a source](/datastream/docs/sources-oracle).\n- Learn more about [configuring a source Oracle database](/datastream/docs/configure-your-source-oracle-database)."]]