oracle 升級12c引數樣例

weixin_34127717發表於2019-04-03

alter system set audit_trail=DB scope=spfile;
alter system set shared_pool_size=2000M scope=spfile;
alter system set shared_pool_reserved_size=160M scope=spfile;
alter system set large_pool_size=176M scope=spfile;
alter system set db_cache_size=5000M scope=spfile;
alter system set streams_pool_size=128M scope=spfile;
alter system set java_pool_size=80M scope=spfile;
Alter system set DB_SECUREFILE='ALWAYS' scope=both;
Alter system set parallel_execution_message_size=32768 scope=spfile;

ALTER SYSTEM SET RESOURCE_LIMIT = TRUE;
alter system set deferred_segment_creation=false scope=both;
alter system set sec_case_sensitive_logon = false scope=both;
alter system set db_writer_processes = 4 scope=spfile;
alter system set archive_lag_target=900 scope=both;
alter system set fast_start_parallel_rollback=false scope=both;
alter system set fast_start_mttr_target=300 scope=both;
alter system set undo_retention=10800 scope=both ;
alter system set cell_offload_processing=false scope=both;
alter system set db_securefile='ALWAYS' scope=both ;
alter system set filesystemio_options='SETALL' scope=spfile;
alter system set log_checkpoints_to_alert=true scope=both;

alter database set default smallfile tablespace;
alter system set optimizer_secure_view_merging=false scope=spfile;

alter system set "_serial_direct_read"=never scope=both ;
alter system set "_use_adaptive_log_file_sync"=false scope=both ;
alter system set "_kttext_warning"=1 scope=both ;

alter system set event ="28401 TRACE NAME CONTEXT FOREVER, LEVEL 1" scope=spfile;

alter profile default limit failed_login_attempts unlimited;
alter profile default limit password_grace_time unlimited;
alter profile default limit password_lock_time unlimited;
alter profile default limit password_life_time unlimited;
noaudit alter system;
noaudit create external job;
noaudit create session;
noaudit role;
noaudit profile;
noaudit grant any role;
noaudit system grant;
noaudit create any procedure;
noaudit alter any procedure;
noaudit drop any procedure;
noaudit alter profile;
noaudit drop profile;
noaudit grant any privilege;
noaudit create any library;
noaudit exempt access policy;
noaudit grant any object privilege;
noaudit create any job;
noaudit system audit;
noaudit directory;

exec dbms_stats.set_global_prefs(pname=>'METHOD_OPT', pvalue=>'FOR ALL COLUMNS SIZE 1');

exec dbms_stats.set_global_prefs(pname=>'PUBLISH', pvalue=>'TRUE');

exec dbms_stats.alter_stats_history_retention(365);

exec dbms_workload_repository.modify_snapshot_settings(retention=>129600,interval=>15);

exec dbms_spm.configure('space_budget_percent',30);

exec dbms_auto_task_admin.disable(client_name=>'auto space advisor',operation=>NULL,window_name=>NULL);
exec dbms_auto_task_admin.disable(client_name=>'sql tuning advisor',operation=>NULL,window_name=>NULL);

exec dbms_stats.gather_dictionary_stats;
alter system set aq_tm_processes = 1 scope = both;
exec dbms_stats.gather_fixed_objects_stats;
alter system set aq_tm_processes = 0 scope = both;

alter system reset aq_tm_processes scope = spfile;

alter database add supplemental log data;

alter database force logging;

alter system set optimizer_capture_sql_plan_baselines = false scope = both;

ALTER SYSTEM SET RESOURCE_MANAGER_PLAN = '' SCOPE=BOTH;

execute dbms_scheduler.set_attribute('WEEKNIGHT_WINDOW','RESOURCE_PLAN','');
execute dbms_scheduler.set_attribute('WEEKEND_WINDOW','RESOURCE_PLAN','');

exec DBMS_STATS.SET_TABLE_PREFS ('SYS', 'WRI$_OPTSTAT_SYNOPSIS$','INCREMENTAL', 'FALSE');

相關文章