Oracle
Oracle ingestion reads source tables through SQL time windows. The actual collection host must load matching Oracle client runtime libraries. For scheduled reads, the trigger time, query window length, and per-round processing budget determine when to start, what range to read, and the load per round respectively. If a backlog takes multiple rounds to process, do not change the start point to skip data.
Entry point: taosExplorer → Data In → Oracle.
The actual reading host is taosX or the selected taosX-Agent host. It needs matching Oracle client runtime dependencies and permission to read source tables.
1. Prerequisites
Ask the DBA for the host, port, service identifier, authentication details, and read-only test objects. Confirm that the actual service process can load the client libraries. Working Oracle tools in an interactive terminal do not prove that service dependencies are complete.
| Prerequisite | How to confirm |
|---|---|
| Reading location | Check network access and client dependencies from the actual taosX or taosX-Agent host, not the browser host. The common listener port is 1521; use the actual port supplied by the DBA. |
| Source database and permissions | Use the actual Oracle service identifier. The account needs connection permission and SELECT permission on the corresponding tables/views. Qualify objects in SQL for cross-schema queries. |
| Client runtime libraries | Install a matching Oracle client on the reading host. Check bitness, runtime dependencies, dynamic library paths, and readability by the service identity. A successful source-client connection is only one check. |
| Data and target | Provide a small committed window, column types, and time zone. The TDengine administrator provides a separate target and write permissions. |
This example assumes READINGS contains TS, DEVICE, and TEMPERATURE, with a committed one-minute historical window. Record the source time zone and TS type. An authorized TDengine TSDB administrator prepares a separate database in taosExplorer's Data Browser or the taos CLI:
CREATE DATABASE oracle_demo PRECISION 'ms';
CREATE STABLE oracle_demo.temperatures (ts TIMESTAMP, temperature DOUBLE)
TAGS (device VARCHAR(32));
2. Minimal Configuration
- Add an Oracle data source, select the target database and agent, enter the DBA-provided connection details, and check connectivity.
- Enter the following SQL template, set the confirmed window's start and end times, and specify the time zone. This template is not a statement to execute directly in the taos CLI.
SELECT TS AS "ts", DEVICE AS "device", TEMPERATURE AS "temperature"
FROM READINGS
WHERE TS >= ${start} AND TS < ${end} ORDER BY TS;
- Retrieve samples and check types. Select target
temperaturesand child table templatet_{device}. Map time, value, and device to the timestamp, data column, and tag respectively. Preview, submit, and start.
View authentication and time window locations
Under Authentication, enter the Oracle source username and password. For objects in another schema, qualify names in SQL and confirm authorization. Do not substitute TDengine default credentials for this account.

Under SQL Query, configure this page's template and start/end times known to contain data, then explicitly reduce the query interval. Subtable Fields takes a DISTINCT query only when needed, not just a column name. Delay differs from the scheduled trigger time; see section 3.

2.1 Samples and Mapping
The SQL in this example uses quoted lowercase aliases. Select the recognized ts, device, and temperature rather than copying the uppercase column names in the image below.
For sample retrieval, optional processing, and preview steps, see Relational Database Sample Mapping. Select target temperatures and child table template t_{device}. Map temperature to DOUBLE and device to a tag. The preview should generate t_d001.
View source column case and preview results
The separate example below recognizes Oracle source columns ID, NAME, VALUE, and TS. Preview Parsing Results on the right shows three source records; the left is the target configuration area. This example illustrates source columns and configuration entry points. It is not verification of target mapping or actual writes.

This page's temperature SQL uses quoted lowercase aliases. Map the recognized ts, device, and temperature; do not copy the uppercase fields in the image. The test_oracle_001 name and historical times are illustrative and need not be recreated. After previewing the actual task's target mapping, still query the target for the same window.
3. Dates and Scheduling
3.1 Connection and Query Fields
| Setting | Purpose and configuration |
|---|---|
| Server address, port, database | Use the actual listener address and service identifier from the DBA. An Oracle user/schema is not the database field. |
| User and password | Use an Oracle identity that can read the test objects, not TDengine credentials. |
| Minimum/maximum connections | Limit the source connection pool. The minimum cannot exceed the maximum. Set these according to source connection quotas; do not raise the maximum merely to speed up reads. |
| Connection timeout | Although labeled Connection Timeout, this controls recycling of idle pool connections, in seconds. It is not a timeout for connection establishment, pool acquisition, SQL execution, or sample requests. It cannot stop slow queries; see the parameter reference below. |
| Subtable fields | Pair with the SQL template and enter a DISTINCT query. See Table Partitioning Configuration. |
| Query interval, delay | Initial UI values are 1 day and 0 seconds respectively. Reduce the range explicitly for the exercise; set production delay according to lag before committed data becomes visible. |
| Sample rows/request timeout | Initial UI values are 5 rows/30 seconds. These apply only to trial reads, not verification of a complete window. |
${start}/${end} and ${start_no_tz}/${end_no_tz} generate identical Oracle TO_DATE expressions using window bounds as wall-clock time in the task time zone, to second precision. Do not add quotes. ${start_date}/${end_date} have date-only precision: same-day windows are empty, and the window ending at midnight reads the previous full day. In scheduled mode, these date placeholders are recommended only with a 1-day Query Interval. Do not use them for a minute-level initial test.

For pool defaults, environment variable precedence, and the full set of named parameters, see Oracle Read Parameters. Pool parameters not explicitly set in the source DSN may also be affected by environment variables of the actual reading process. Confirm final values and source quotas before adjusting read concurrency. taosX runs ALTER SESSION SET TIME_ZONE to set the source session. For fixed-offset limits and source-type read rules, see Time and Time Zone. taosExplorer writes the start using the page offset in effect when it is set and explicitly writes that offset to time_zone. Editing without changing the start preserves the original start/end times and task time zone.
To set a timeout for an individual database round trip during production reads, see Oracle Source Process Environment. This call timeout requires the corresponding Oracle client. It does not cover the total duration of complete SQL execution or sample retrieval and is not interchangeable with the UI's Connection Timeout.
For query interval and delay in continuous queries, see Common Relational Database Rules. For batch ingestion, consider fixed-interval or Cron scheduled window synchronization. The trigger schedule determines when to query, the query interval determines window length, and the maximum windows per round limits processing per round. Keep these separate.
For scheduled tasks, confirm both the trigger time zone and source SQL time interpretation. Similar displayed times do not mean they use the same setting. Before submission, review upcoming triggers and check weekdays and midnight boundaries. Delay must cover lag before committed data becomes visible. Scheduling does not automatically reread old data already passed by the cursor. Verify a small task first. When switching to scheduled mode, create a separate task; do not reuse checkpoints across modes.
3.2 Configure a Scheduled Window Round
Schedule is a separate area near the bottom of the task creation form, not inside the SQL Query collapsible panel. Schedule settings appear only after selecting Scheduled Window Synchronization. If the area is absent, confirm the delivered taosX and taosExplorer combination first. An externally scheduled script is not the same feature.

- Switch the run mode under Schedule to Scheduled Window Synchronization, then check the page time zone. Confirm both SQL date interpretation and trigger time zone, not just the server's displayed time.
- For a fixed interval, set the first scheduled time and a period in minutes. For Cron, use a five-field minute-level expression. Do not restrict both day of month and day of week.
- After setting the first time and period, or entering valid Cron, check Next Six Triggers. Verify each expected date, time, and time zone. An empty schedule produces no valid preview; a correct schedule does not mean source data is committed.
- Set the query start point, query interval, delay, and Maximum Windows per Round. The latter accepts 1–1000 and defaults to 24. It is a round budget, not read concurrency.
- Preview mappings and submit. At trigger time, check the round's status, latest successful boundary, and target data. If the backlog remains, observe whether the next round advances. Do not change the start point to skip it.

After entering Cron for the business example, the page lists Next Six Triggers. Dates in the following image are calculated from the page's current time. Check the future dates displayed by the actual deployment rather than copying the image's dates.

Scheduled mode requires whole-second start and end times and window lengths, with a minimum window length of 1 second. Once an end time is set, records beyond it are not queried. Once the checkpoint reaches the end time, the task completes automatically and its schedule is removed; do not verify it as a continuous task. If a round fails, retain unconfirmed windows and the schedule, then check the retry result at the next trigger. After resuming, still compare source and target data rather than only checking that the failure status disappeared.
Scheduled SQL must use a complete pair from ${start}/${end}, ${start_no_tz}/${end_no_tz}, or ${start_date}/${end_date}. Do not use only ${start_time}/${end_time} as the scheduled cursor. For date pairs, still check day-boundary granularity. The end time must be later than the start. Each round advances only to the earlier whole-second boundary of current time minus delay and the end time. Returning when the budget is exhausted does not mean the backlog is complete.
In a direct source DSN, run_mode=scheduled_window selects only a single round of window reads; it configures neither Cron nor a period. A single taosx run invocation does not become an automatic scheduled loop. Configure graphical task schedules in the Schedule area described above. Repeating the same taosx run command periodically does not provide the persistent checkpoints and recovery semantics of a service task. Continuous mode uses a fixed 10-second minimum real-time window; there is no separately configurable live_sync_min_window query key.
3.3 Schedule Triggers Around Business Batches
For example, suppose ingestion begins daily at 00:00, 04:00, 08:00, 12:00, 16:00, and 20:00, and each batch takes at most 2.5 hours. After DBA confirmation, set the first trigger to the next 03:00 in Asia/Shanghai, with a 240-minute period, or use 0 3,7,11,15,19,23 * * *. Both trigger six times daily. This is a business example, not a recommendation for all Oracle systems.
If business time READING_TS differs from ingestion time INGEST_TS, use a cursor that tracks committed batches while retaining business time:
SELECT ID, METER_ID, READING_TS, INGEST_TS, READING_VALUE
FROM METER_READINGS
WHERE INGEST_TS >= ${start} AND INGEST_TS < ${end}
ORDER BY INGEST_TS, ID;
Map READING_TS to target business time and METER_ID to the child table identifier/tag. Do not put this example directly into the earlier test database containing only READINGS. Start the assessment with a 1-hour query interval and at most 4 windows per round. Processing up to four windows per round does not guarantee catching up with all data within four hours. Downtime backlogs can span multiple rounds; catching up requires sustained processing capacity greater than the incoming rate. Delay must cover the maximum lag from INGEST_TS until data is queryable after commit. Records added later with times before the confirmed boundary need a separate lookback.
4. Advanced Options and Write Error Policies
Before submission, expand Advanced Options and check read concurrency, batches, write queues, and source connection pool quotas separately. Higher concurrency does not replace scheduling rounds or window budgets. Error policies affect only target writes; they do not fix OCI loading, source queries, or uncommitted Oracle data. Check NULLs, numeric boundaries, long strings, and times in the same window, and decide whether truncation, column expansion, or discarding is allowed before saving the task.
Read concurrency and output batches do not increase the window budget per round. For effective settings and direct DSN defaults and zero values, see Advanced Query Source Parameters. Validate tuning one setting at a time using Tuning and Resource Control, retaining rollback configuration.
For archive retrieval and assessing affected scope, see Write Errors and Invalid Data and Logs and Performance.
5. Verification
Query the actual device child table in taosExplorer's Data Browser or the taos CLI, for example SELECT ts, temperature, device FROM oracle_demo.t_d001 ORDER BY ts LIMIT 20;. Compare times, values, nulls, and devices against the same Oracle window. Use the column case shown by the mapping preview.
6. Troubleshooting
| Symptom | Checks |
|---|---|
| Oracle client cannot be loaded | Check the reading host, library bitness, service environment variables, and installation dependencies, not just the browser host. |
| Date conversion error or empty window | Check the TS type, time zone, and expanded date expressions. Do not quote placeholders twice. |
| Scheduled task does not execute | Check the schedule time zone and next trigger time. |
| Backlog never catches up | Check window size, maximum windows per round, source query duration, and incoming rate. Assess acceptable load with the DBA first. |
For other task, write, and runtime issues, see Troubleshooting by Symptom.
7. Stop, Resume, and Limitations
Stop the original task and save queries, schedules, mappings, and verified boundaries. After resuming, check interrupted windows. Failure retries can reread unconfirmed windows. Do not manufacture an appearance of catching up by skipping backlogs or changing the start time. Historical changes, deletions, and Oracle business objects are outside this task's general replication scope.