Oracle Stream實戰(2)—測試環境準備(一)

cow977發表於2011-12-22

Oracle Stream實戰(1)—測試環境介紹    http://space.itpub.net/81227/viewspace-714227

 

 

環境準備

1 設定初始化引數

使用pfile的修改init.ora檔案,使用spfile的透過alter system命令修改spile檔案。主、從資料庫分別執行如下的語句:

以下是引用片段:

Sqlplus / as sysdba

alter system set aq_tm_processes=2 scope=both;

alter system set global_names=true scope=both;

alter system set job_queue_processes=10 scope=both;

alter system set parallel_max_servers=20 scope=both;

alter system set undo_retention=3600 scope=both;

alter system set nls_date_format='YYYY-MM-DD HH24:MI:SS' scope=spfile;

alter system set streams_pool_size=25M scope=spfile;

alter system set utl_file_dir='*' scope=spfile;

alter system set open_links=4 scope=spfile;

2 將資料庫置為歸檔模式

主資料庫:

SQL> alter system set log_archive_dest_1='LOCATION=/arch' scope=both;

SQL> alter system set log_archive_format='cow_%t_%s_%r.arc' scope=spfile;

SQL> shutdown immediate;

SQL> startup mount;

SQL> alter database archivelog;

SQL> alter database open;

驗證是否歸檔:

SQL> archive log list;

從資料庫:

SQL> alter system set log_archive_format='demodb_%t_%s_%r.arc' scope=spfile;

SQL> alter system set log_archive_dest_1='LOCATION=/arch';

SQL> shutdown immediate;

SQL> startup mount

SQL> alter database archivelog;

SQL> alter database open;

驗證是否歸檔:

SQL> archive log list;

 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/81227/viewspace-714228/,如需轉載,請註明出處,否則將追究法律責任。

相關文章