码迷,mamicode.com
首页 > 数据库 > 详细

oracle standby数据库改变standby_archive_dest路径

时间:2015-06-16 19:33:52      阅读:177      评论:0      收藏:0      [点我收藏+]

标签:oracle standby 改变standby_archive_dest

1、导出PFILE文件;

SQL> create pfile=‘/oratmp/pfile.ora‘ from spfile;

File created.


2、修改PFILE文件,注释掉#*.standby_archive_dest=‘/archivelog/standby/slog‘这行

P560A:/#vi /oratmp/pfile.ora

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

port1.__db_cache_size=58955137024

port2.__db_cache_size=7230980096

standby.__db_cache_size=14042529792

port1.__java_pool_size=117440512

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 


3、用修改后的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


4、重建SPFILE

SQL> create spfile from pfile;

File created.


5、MOUNT数据库

SQL> alter database mount standby database;

Database altered.

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

Database altered.

SQL> 


6、观察日志发现归档目录已经变更了

变更前:

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‘


本文出自 “麦地坞” 博客,请务必保留此出处http://yunlongzheng.blog.51cto.com/788996/1662312

oracle standby数据库改变standby_archive_dest路径

标签:oracle standby 改变standby_archive_dest

原文地址:http://yunlongzheng.blog.51cto.com/788996/1662312

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!