jd2591464
jd2591464

Reputation: 41

Is there a way to get the SCN without querying the database?

Today, to get the SCN of the database, we query v$database. Is this the only way to get the database's SCN? Is there any API that exposes this information as part of a connection's metadata, etc?

Upvotes: 2

Views: 583

Answers (1)

Mark Stewart
Mark Stewart

Reputation: 2098

The System Change Number (SCN) is extremely related to the inner details of an Oracle instance; even the function that take a TIMESTAMP and convert it to an SCN (TIMESTAMP_TO_SCN) is limited to a brief period of time per the documentation. Summary: the SCN is updated frequently; and there are several things that affect the update period; commits, Undo management, workload, etc. So as Jon Heller points out in his comment, there is no way to get close to a real SCN without asking Oracle for it.

Upvotes: 1

Related Questions