Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Database Migration Service memanfaatkan Oracle LogMiner API, yang merupakan bagian dari Oracle Database, untuk
mengirim kueri ke file log pengulangan yang diarsipkan. File ini berisi informasi tentang histori aktivitas di database. Setiap database Oracle memiliki serangkaian file log pengulangan online.
Semua catatan transaksi di database dicatat dalam file.
Saat file log redo saat ini dirotasi (atau dialihkan), proses pengarsipan
akan menyalin file ini ke penyimpanan arsip. Sementara itu, database mempromosikan
file lain untuk berfungsi sebagai file saat ini.
Saat menggunakan Oracle LogMiner API, Database Migration Service tidak mengakses file log pengulangan online, tetapi hanya berfungsi dengan file log yang diarsipkan.
Mengakses file log redo yang diarsipkan secara inheren akan menambah beberapa latensi pada proses migrasi. Halaman ini menjelaskan konfigurasi yang disarankan untuk database sumber Oracle Anda guna mengontrol dampak latensi.
Menetapkan parameter konfigurasi untuk file log pengulangan Oracle
Desain ini memiliki implikasi besar pada potensi latensi Database Migration Service. Jika file log pengulangan Oracle sering diganti atau dipertahankan dalam ukuran yang lebih kecil (misalnya, < 256 MB), Database Migration Service dapat mereplikasi perubahan lebih cepat.
Ada parameter konfigurasi yang dapat Anda tetapkan untuk mengontrol frekuensi rotasi file log:
Ukuran: File log pengulangan online memiliki ukuran minimum 4 MB, dan
ukuran default bergantung pada sistem operasi Anda. Anda dapat mengubah ukuran
file log dengan membuat file log online baru dan menghapus file log yang lebih lama.
Untuk menemukan ukuran file log pengulangan online, jalankan kueri berikut:
SELECT GROUP#, STATUS, BYTES/1024/1024 MB FROM V$LOG
Waktu: Parameter ARCHIVE_LAG_TARGET memberikan
batas atas durasi (dalam detik) rentang log saat ini dari database utama.
Ini bukan waktu peralihan log yang tepat, karena memperhitungkan berapa lama waktu yang dibutuhkan untuk mengarsipkan log. Nilai defaultnya adalah 0 (tanpa batas atas),
dan nilai 1800 (atau 30 menit) atau kurang yang wajar disarankan.
Anda dapat menggunakan perintah berikut untuk menetapkan parameter ARCHIVE_LAG_TARGET, baik selama inisialisasi maupun saat database aktif:
SHOW PARAMETER ARCHIVE_LAG_TARGET; Perintah ini menampilkan
berapa detik yang diperlukan untuk mencakup log saat ini.
ALTER SYSTEM SET ARCHIVE_LAG_TARGET = number-of-seconds;
Gunakan perintah ini untuk mengubah batas atas.
Misalnya, untuk menyetel batas atas menjadi 10 menit (atau 600 detik),
masukkan ALTER SYSTEM SET ARCHIVE_LAG_TARGET = 600;
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-05 UTC."],[[["\u003cp\u003eDatabase Migration Service utilizes the Oracle LogMiner API to access archived redo log files, which contain a history of database activity, instead of the online redo log files, introducing some latency.\u003c/p\u003e\n"],["\u003cp\u003eThe frequency of Oracle redo log file switching and their size significantly impact the latency of Database Migration Service, with more frequent switching and smaller file sizes leading to faster replication.\u003c/p\u003e\n"],["\u003cp\u003eYou can modify the size of online redo log files, with a minimum of 4 MB, using guides provided for self-hosted Oracle and Amazon RDS Oracle environments.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eARCHIVE_LAG_TARGET\u003c/code\u003e parameter controls the maximum duration (in seconds) that a current log can span, with a suggested value of 1800 seconds (30 minutes) or less to enhance performance.\u003c/p\u003e\n"],["\u003cp\u003eAlthough it's possible to manually switch redo log files using the \u003ccode\u003eALTER SYSTEM SWITCH LOGFILE;\u003c/code\u003e command, it's not advised for production due to its privilege requirements and potential performance impact.\u003c/p\u003e\n"]]],[],null,["# Work with Oracle database redo log files\n\nDatabase Migration Service leverages the Oracle LogMiner API, which is part of Oracle Database, to\nquery archived redo log files. These files contain information about the history\nof activity on a database. Each Oracle database has a set of online redo log files.\nAll transaction records on the database are recorded in the files.\n\nWhen the current redo log file is rotated (or switched), the archive process\n[copies this file into an archive storage](https://docs.oracle.com/en/database/oracle/oracle-database/19/admin/managing-archived-redo-log-files.html#GUID-9BD00F2E-DC98-4871-8D26-FDB40623909C). Meanwhile, the database promotes\nanother file to serve as the current file.\n\nWhen Database Migration Service uses the Oracle LogMiner API, it doesn't access\nthe online redo log files but only works with the archived log files.\nAccessing archived redo log files inherently adds some latency to the migration\nprocess. This page describes suggested configuration for your Oracle\nsource databases to control the latency impact.\n\nSet configuration parameters for Oracle redo log files\n------------------------------------------------------\n\nThis design has profound implications on Database Migration Service's potential latency. If\nOracle redo log files are switched frequently or kept to a smaller size (for\nexample, \\\u003c 256MB), Database Migration Service can replicate changes faster.\n\nThere are configuration parameters that you can set to control the log file\nrotation frequency:\n\n- **Size:** Online redo log files have a minimum size of 4 MB, and\n the default size is dependent on your operating system. You can modify the size\n 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 ```\n SELECT GROUP#, STATUS, BYTES/1024/1024 MB FROM V$LOG\n ```\n | For self-hosted Oracle, use [this guide](https://logic.edchen.org/how-to-resize-redo-logs-in-oracle/). For Amazon RDS Oracle, use [Performing common log-related tasks for Oracle DB instances](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.Oracle.CommonDBATasks.Log.html#Appendix.Oracle.CommonDBATasks.ResizingRedoLogs) in the Amazon RDS documentation.\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\n it will take to archive the log. The default value is `0` (no upper bound),\n 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`\n 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),\n enter `ALTER SYSTEM SET ARCHIVE_LAG_TARGET = `\u003cvar translate=\"no\"\u003e600\u003c/var\u003e`;`\n\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\n| recommend it for production use-cases because of the privileges it requires\n| and the significant performance impact on the database."]]