Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle standby database #1180

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<TargetCollectionExt EXT_NAME="ME$MATERIALIZED_VIEW_REFRESH_TIME" EXT_VERSION="2" TARGET_TYPE="host"><CollectionItem NAME="ME$MATERIALIZED_VIEW_REFRESH_TIME" UPLOAD="YES">
<TargetCollectionExt EXT_NAME="ME$MATERIALIZED_VIEW_REFRESH_TIME" EXT_VERSION="3" TARGET_TYPE="host"><CollectionItem NAME="ME$MATERIALIZED_VIEW_REFRESH_TIME" UPLOAD="YES">
<Schedule>
<IntervalSchedule INTERVAL="15" TIME_UNIT="Min"/>
</Schedule>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<MetricExtensionArchive name="MEAME$MATERIALIZED_VIEW_REFRESH_TIME">
<MetricExtension name="ME$MATERIALIZED_VIEW_REFRESH_TIME" type="host" version="2" is_repos="FALSE" display_name="Time Since Oldest Materialized View Refresh" description="Calculated in Minutes" version_comment=" " metadata_digest="7fdba0582d18a1f457a28e5e55fe306e" coll_digest="e512a32d93873389d91fe9ba77450e53" attach_digest="049b8ec6eeb5c26d4bf997b8524925c5">
<MetricExtension name="ME$MATERIALIZED_VIEW_REFRESH_TIME" type="host" version="3" is_repos="FALSE" display_name="Time Since Oldest Materialized View Refresh" description="Calculated in Minutes" version_comment=" " metadata_digest="7fdba0582d18a1f457a28e5e55fe306e" coll_digest="e512a32d93873389d91fe9ba77450e53" attach_digest="dd076a9f5d3844dd7ead88e125ebe129">
<scripts name="time_since_oldest_mv_refresh.sh">
</scripts>
</MetricExtension>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<TargetMetadataExt EXT_NAME="ME$MATERIALIZED_VIEW_REFRESH_TIME" EXT_VERSION="2" TARGET_TYPE="host"><Metric NAME="ME$MATERIALIZED_VIEW_REFRESH_TIME" TYPE="TABLE">
<TargetMetadataExt EXT_NAME="ME$MATERIALIZED_VIEW_REFRESH_TIME" EXT_VERSION="3" TARGET_TYPE="host"><Metric NAME="ME$MATERIALIZED_VIEW_REFRESH_TIME" TYPE="TABLE">
<Display>
<Label NLSID="NLS_METRIC_hostME$MATERIALIZED_VIEW_REFRESH_TIME">Time Since Oldest Materialized View Refresh</Label>
<Description NLSID="NLS_DESCRIPTION_hostME$MATERIALIZED_VIEW_REFRESH_TIME">Calculated in Minutes</Description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
# Exit without failure if database is not up
srvctl status database -d $ORACLE_SID >/dev/null || exit 0

# Exit without failure if the database is mounted and not open (probably a standby database)
(srvctl status database -d $ORACLE_SID -v | grep -q Mounted) && exit 0

sqlplus -s / as sysdba <<EOSQL
SET ECHO OFF
SET FEEDBACK OFF
Expand Down
Loading