Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Monitor or count the storage capacity and backup of multiple databases

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

In order to reduce the workload of monitoring or multiple sets of database storage capacity or backup checks at the same level, consider using a dedicated monitoring server,

By configuring some configuration tables that need to be obtained, and then solidifying the storage capacity or backup of multiple sets of libraries in the form of sh scripts or storage procedures

A simple collection process is formed, which greatly simplifies the repetitive and complicated database management work.

Configuration method:

1. Monitoring servers;

2. Configuration table of dblink from monitoring server to each monitored server (suxing.conf11g_dblink_tab or suxing.CONF_BACKUPCHECK_DBLINK_TAB)

----Because the functions of the two configuration tables are different, two configuration tables are separated;

3, dedicated to monitoring users;

4. Script or storage process (as follows: multiple server capacity statistics scripts and multiple server backup check result collection scripts);

5. A table for storing collected data (suxing.space or suxing.db_backup_check_alltab).

#####Multiple server capacity statistics scripts:

declare

v_sql varchar2(4000);

begin

for rec in (select * from suxing.conf11g_dblink_tab) loop

v_sql :='insert into suxing.space_gather11G_tab

select * from (

with

I as (select instance_name from v$instance@'||rec.db_link||'),

A as (select round(sum(bytes)/1024/1024/1024,2) aa from dba_data_files@'||rec.db_link||'),

B as (select round(sum(bytes)/1024/1024/1024,2) bb from dba_free_space@'||rec.db_link||'),

C as (select round(sum(BYTES / 1024 / 1024 / 1024), 2) cc

from v$datafile@'||rec.db_link||' a, v$tablespace@'||rec.db_link||' b

where a.TS# = b.TS#

and a.CREATION_TIME

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report