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

Summary of database performance optimization parameters (1)

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

1.AWR reported that the snapshot interval was changed from 1 hour to half an hour, and the number of days to be retained was modified-- there is no need to restart the library.

two。 The flashback time was changed from 15 minutes to 1 hour-no need to restart the library

3. Modify the maximum number of connections allowed in the database from 150 to 500, and change the number of sessions to 555 as the number of processes * 1.1 to 5-the library needs to be restarted

4. Password never expires setting

5. Modify redo log groups of two redo files of 100m each

6. Modify temp tablespaces to temporary tablespace groups

-- check the number of connections currently occupied

Select count (*) from v$process

Select count (*) from v$session

-- View the maximum number of connections allowed in the current database

Show parameter process

Or select value from v$parameter where name = 'processes'

-- modify the number of connections and sessions. The session=process*1.1+5 parameter can only use spfile and restart the library.

Alter system set processes=600 scope=spfile

Alter system set sessions=665 scope=spfile

-

-- check the validity of the password

Select * from dba_profiles where profile='DEFAULT' and resource_name='PASSWORD_LIFE_TIME'

-- set the default profile password to never expire and take effect immediately without restarting the library

Alter profile default limit password_life_time unlimited

-flashback time modification

SQL > show parameter undo_retention

Undo_retention integer 900-default to 15 minutes per second

If you want to change the default time of undo_retention, modify it with the following sentence:

ALTER SYSTEM SET undo_retention=3600 scope=both;-change to 1 hour

-

-- View the current AWR snapshot interval and retention days

Select * from dba_hist_wr_control

-- to view the baseline of the window, the moving_window_size must be less than or equal to the AWR retention time. For example, to set a smaller awr, you need to modify the window_size parameter.

Select dbid, baseline_name, baseline_type, moving_window_size from dba_hist_baseline

Both exec and begin statements can be executed. Exec command window execution

SQL > exec dbms_workload_repository.modify_snapshot_settings (interval = > 30pm = > 14024060)

The window F8, which is the same as executing the select statement, is executed at an interval of 30 minutes and retained for 14 days.

Begin

DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS (

Interval = > 30th century = > 14024060)

End

/

If there is a mistake, solve it.

ERROR at line 1:

ORA-13541 system moving window baseline size (691200) greater than retention (604800)

ORA-06512: at "SYS.DBMS_WORKLOAD_REPOSITORY", line 174

ORA-06512: at "SYS.DBMS_WORKLOAD_REPOSITORY", line

ORA-06512: at line 1

10080, 724, 6060

691200824608days

Note that window size must be set to a retention value that is less than or equal to the AWR setting.

SQL > col BASELINE_NAME for A30

SQL > select dbid, baseline_name, baseline_type, moving_window_size from dba_hist_baseline

DBID BASELINE_NAME BASELINE_TYPE MOVING_WINDOW_SIZE

-

4215476630 SYSTEM_MOVING_WINDOW MOVING_WINDOW 8

Now that we know why, it's convenient to solve it, Modifying the Window Size of the Default Moving Window Baseline.

BEGIN

DBMS_WORKLOAD_REPOSITORY.MODIFY_BASELINE_WINDOW_SIZE (

Window_size = > 5

Dbid = > 4215476630)

END

/

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