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

How to implement the check step script of the database

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

Editor to share with you how to achieve the database check step script, I hope you will learn something after reading this article, let's discuss it together!

1. Instance name version of the database

Picasa Content

Select * from v$version

2. Display all the parameters

Select name,value from v$parameter

3. display the information of the control file

Select status,name from v$controlfile

4. Display log file information

Select t.groupmakers from v$log t. Threadchart where t.group#=d.group# t.status.member.member.bytesUniverse 1024Accord1024 as "logfile/mb" from v$log t, v$logfile d where t.group#=d.group#

5. Show the number of logs generated per day

Select to_char (completion_time,'yyyy/mm/dd') as completion_time, count (*) num from v$archived_log group by to_char (completion_time,'yyyy/mm/dd') order by 1

6. View the information of the tablespace

Select file_id, tablespace_name, bytes/1024/1024 AS "USE/M", maxbytes, maxblocks, increment_by/1024/1024 AS "INCREMENT/M", file_name from dba_data_files

7. Check the archive mode of the database

Archive log list

8. Check whether the flashback function of the database is turned on

Select flashback_on from v$database

9. Check whether the Recycle Bin function of the database is turned on

SELECT Value FROM V$parameter WHERE Name = 'recyclebin'

10. Enable check of EM

Operating system runs: emctl status dbconsole

11. View of database usage parameters

Show parameter spfile

Indicates that a displayed value indicates that you are using spfile

12. view of database audit function

Show parameter audit_trail

13. View the historical usage of database session and process parameters

Select * from v$resource_limit where RESOURCE_NAME='sessions' or RESOURCE_NAME='processes'

Where MAX_UTILIZATION represents the highest usage value in history

14. Storage time of AWR reports

Select snap_interval,retention from dba_hist_wr_control

Snap_interval: collection interval

Retention: retention period

15. The method of running awr report manually

Run on sqlplus:

$ORACLE_HOME/rdbms/admin/awrrpt.sql

16. View the creation time of the database

Select created from v$database

17. Check the growth rate of the tablespace

Select A.RTIME and TABLESPACEID tablespace_usedsize (sum) * 8 Universe 1024 GB, B.NAME

From DBA_HIST_TBSPC_SPACE_USAGE A, v$tablespace B

Where tablespace_id=4 AND B.TS#=TABLESPACE_ID

Group by A.RTIME,A.TABLESPACE_ID,B.NAME

After reading this article, I believe you have a certain understanding of "how to implement the step script for checking the database". If you want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

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