To become a goodOracle Database AdministratorDo you want to be a qualified Oracle database administrator? So let's start learning from below.
The Oracle Database Administrator should perform regular monitoring on the Oracle database system as follows:
(1) Check the running status, log files, backups, database space usage, and system resource usage of the Oracle database every day to discover and solve the problem.
(2) Monitor the space expansion and data growth of database objects every week, check the database health, and check the status of database objects.
(3) perform Analyze on tables and indexes every month, check table space fragments, find opportunities for database performance adjustment, adjust database performance, and propose the next space management plan. Perform a comprehensive check on the Oracle database status.
Daily Work
(1) confirm that all instances are in normal status
Log on to all databases or routines to check ORACLE background processes:
$ Ps-ef | grep ora
(2) Check the remaining space used by the file system ). If the remaining space of the file system is less than 20%, delete unnecessary files to release space.
$ Df-k
(3) Check log files and trace files to record errors in alert and trace files.
Connect to each system to be managed
Use 'telnet'
Cd to the bdump directory for each database, usually $ ORACLE_BASE // bdump
Run the Unix 'tail' command to view the alert _. log file.
If any new ORA-errors are found, record and resolve them.
(4). Check the validity of the database backup on the current day.
RMAN backup method:
Check the backup logs of a third-party backup tool to check whether the backup is successful.
EXPORT backup mode:
Check the exp log file to check whether the backup is successful
Other backup methods:
Check the corresponding log file
(5) Check the data file whose status is not "online" and restore it.
Select file_name from dba_data_files where status = 'offline'
(6). Check the usage of the table space.
SELECT tablespace_name, max_m, count_blocks free_blk_cnt, sum_free_m, to_char (100 * sum_free_m/sum_m, '99. 99') | '%' AS pct_free
FROM (SELECT tablespace_name, sum (bytes)/1024/1024 AS sum_m FROM dba_data_files group by tablespace_name ),
(SELECT tablespace_name AS fs_ts_name, max (bytes)/1024/1024 AS max_m, count (blocks) AS count_blocks, sum (bytes/1024/1024) AS sum_free_m FROM dba_free_space group by tablespace_name)
WHERE tablespace_name = fs_ts_name
(7). Check the remaining tablespace
SELECT tablespace_name, sum (blocks) as free_blk,
Trunc (sum (bytes)/(1024*1024) as free_m,
Max (bytes)/(1024) as big_chunk_k, count (*) as num_chunks
FROM dba_free_space group by tablespace_name;
(8). Monitor database performance
Run bstat/estat to generate a system report
Or use statspack to collect statistics.
(9) Check the database performance and record the cpu usage, IO, buffer hit rate, and so on of the database.
Use vmstat, iostat, glance, top, and other commands
(10) Handling of daily problems.
From the above, we can see that not everyone can be an excellent Oracle database administrator. Every day, we have to finish a good day's work. Have you learned?