oracle standby數據庫改變standby_archive_dest路徑

一、導出PFILE文件;java

SQL> create pfile='/oratmp/pfile.ora' from spfile;數據庫

File created.session


二、修改PFILE文件,註釋掉#*.standby_archive_dest='/archivelog/standby/slog'這行oracle

P560A:/#vi /oratmp/pfile.oradom

"/oratmp/pfile.ora" 58 lines, 1944 characters ide

port1.__db_cache_size=58955137024spa

port2.__db_cache_size=7230980096日誌

standby.__db_cache_size=14042529792orm

port1.__java_pool_size=117440512server

port2.__java_pool_size=117440512

standby.__java_pool_size=16777216

port2.__large_pool_size=16777216

port1.__large_pool_size=16777216

standby.__large_pool_size=16777216

port1.__shared_pool_size=9579790336

port2.__shared_pool_size=5469372416

standby.__shared_pool_size=2013265920

port2.__streams_pool_size=0

port1.__streams_pool_size=0

standby.__streams_pool_size=0

*._kgl_large_heap_warning_threshold=8388608

*.audit_file_dest='/home/oracle/admin/port/adump'

*.background_dump_dest='/home/oracle/admin/port/bdump'

*.cluster_database=FALSE

*.compatible='10.2.0.1.0'

*.control_files='/dev/rcontrol01','/dev/rcontrol02','/dev/rcontrol03'

*.core_dump_dest='/home/oracle/admin/port/cdump'

*.db_block_size=8192

*.db_domain=''

*.db_file_multiblock_read_count=16

*.db_files=1000

*.db_name='port'

*.db_recovery_file_dest=''

*.db_recovery_file_dest_size=10737418240

*.db_unique_name='STANDBY'

*.dispatchers='(PROTOCOL=TCP) (SERVICE=portXDB)'

*.event='10298 trace name context forever,level 32'

*.fal_client='STANDBY'

*.fal_server='port'

*.instance_number=1

*.job_queue_processes=10

*.local_listener=''

*.lock_sga=TRUE

*.log_archive_config='DG_CONFIG=(port,standby)'

*.log_archive_dest_1='LOCATION=/backup/archivelog VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=standby'

*.log_archive_dest_state_1='ENABLE'

*.log_archive_format='%t_%s_%r.arc'

*.log_archive_max_processes=4

*.nls_language='AMERICAN'

*.open_cursors=1000

*.pga_aggregate_target=2G

*.processes=1500

*.remote_login_passwordfile='EXCLUSIVE'

*.resource_limit=TRUE

*.sessions=1655

*.sga_max_size=15G

*.sga_target=15G

#*.standby_archive_dest='/archivelog/standby/slog'

*.standby_file_management='AUTO'

"/oratmp/pfile.ora" 58 lines, 1945 characters 


三、用修改後的PFILE啓動

SQL> shutdown immediate;

ORA-01109: database not open

Database dismounted.

ORACLE instance shut down.

SQL> startup nomount pfile='/oratmp/pfile.ora';

ORACLE instance started.

 

Total System Global Area 1.6106E+10 bytes

Fixed Size                  2112192 bytes

Variable Size            2046821696 bytes

Database Buffers         1.4043E+10 bytes

Redo Buffers               14663680 bytes


四、重建SPFILE

SQL> create spfile from pfile;

File created.


五、MOUNT數據庫

SQL> alter database mount standby database;

Database altered.

SQL> alter database recover managed standby database disconnect from session;

Database altered.

SQL> 


六、觀察日誌發現歸檔目錄已經變動了

變動前:

Tue Jun 16 13:54:07 2015

RFS[24297]: Archived Log: '/archivelog/standby/slog/1_106003_862729481.arc'


變動後:

Tue Jun 16 14:33:13 2015

RFS[2]: Archived Log: '/backup/archivelog/2_59627_862729481.arc'

相關文章
相關標籤/搜索