Welcome to oracle_awen's archive blog
-----pszx_db
[oracle@localhost pszx_db]$ cd /oracle/product/database/dbs/
[oracle@localhost dbs]$ ls
hc_pstc.dat     init.ora         lkPSZX_DB      spfilepstc.ora
hc_pszx_by.dat  initpszx_by.ora  orapwpstc.bak  spfilepszx_by.ora
hc_pszx_db.dat  initpszx_db.ora  orapwpszx_by   spfilepszx_db.ora
initdw.ora      lkPSZX_BY        orapwpszx_db   sqlnet.log
[oracle@localhost dbs]$ strings spfilepszx_db.ora
pszx_db.__db_cache_size=88080384
pszx_db.__java_pool_size=4194304
pszx_db.__large_pool_size=4194304
pszx_db.__shared_pool_size=67108864
pszx_db.__streams_pool_size=0
*.aq_tm_processes=0
*.audit_file_dest='/oracle/admin/pszx_db/adump'
*.background_dump_dest='/oracle/admin/pszx_db/bdump'
*.compatible='10.2.0.1.0'
*.control_files='/oracle/oradata/pszx_db/control01.ctl','/oracle/oradata/pszx_db/control02.ctl','/oracle/oradata/pszx_db/control03.ctl'
*.core_dump_dest='/oracle/admin/pszx_db/cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.DB_FILE_NAME_CONVERT='/oracle/oradata/pszx_by','/oracle/oradata/pszx_db'
*.db_name='pszx_db'
*.db_recovery_file_dest='/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=1073741824
*.DB_UNIQUE_NAME='pszx_by'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=pstcXDB)'
*.FAL_CLIENT='pszx_db'
*.FAL_SERVER='pszx_by'
*.job_queue_processes=0
*.LOG_ARCHIVE_CONFIG='DG_CONFIG=(pszx_db,pszx_by)'
*.LOG_ARCHIVE_DEST_1='LOCATION=/oracle/oradata/pszx_db
VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=pszx_db'
*.LOG_ARCHIVE_DEST_2='SERVICE=pszx_by LGWR ASYNC
VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=pszx_by'
*.LOG_ARCHIVE_DEST_STATE_1='ENABLE'
*.LOG_ARCHIVE_DEST_STATE_2='ENABLE'
*.LOG_FILE_NAME_CONVERT='/oracle/oradata/pszx_by','/oracle/oradata/pszx_db'
*.nls_language='SIMPLIFIED CHINESE'
*.nls_territory='CHINA'
*.open_cursors=300
*.pga_aggregate_target=16777216
*.processes=150
*.REMOTE_LOGIN_PASSWORDFILE='EXCLUSIVE'
*.sga_target=167772160
*.STANDBY_FILE_MANAGEMENT='AUTO'
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='/oracle/admin/pszx_db/udump'
[oracle@localhost dbs]$ vim initpszx_db.ora
[oracle@localhost dbs]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Aug 29 13:44:01 2012

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup pfile=initpszx_db.ora
ORACLE instance started.

Total System Global Area  167772160 bytes
Fixed Size                  1218316 bytes
Variable Size              75499764 bytes
Database Buffers           88080384 bytes
Redo Buffers                2973696 bytes
Database mounted.
Database opened.
SQL> select instance_name,status from v$instance;

INSTANCE_NAME    STATUS
---------------- ------------
pszx_db          OPEN

SQL> alter system switch logfile;

System altered.

SQL> select max(sequence#) from v$archived_log;

MAX(SEQUENCE#)
--------------
             2

SQL> /

MAX(SEQUENCE#)
--------------
             2

SQL> /

MAX(SEQUENCE#)
--------------
             2

SQL> /

MAX(SEQUENCE#)
--------------
             2

SQL> /

MAX(SEQUENCE#)
--------------
             2

SQL> /

MAX(SEQUENCE#)
--------------
             2

SQL> /

MAX(SEQUENCE#)
--------------
             2

SQL> select max(sequence#) from v$archived_log;

MAX(SEQUENCE#)
--------------
             2

SQL>  alter system switch logfile;

System altered.

SQL> select max(sequence#) from v$archived_log;

MAX(SEQUENCE#)
--------------
             2

SQL> /

MAX(SEQUENCE#)
--------------
             3


---pszx_by
SQL> select instance_name,status from v$instance;

INSTANCE_NAME    STATUS
---------------- ------------
pszx_by          OPEN

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

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

Database altered.

SQL> select max(sequence#) from v$archived_log;

MAX(SEQUENCE#)
--------------
             2

SQL> conn dbauserpszx/phoenixdba
ERROR:
ORA-00604: error occurred at recursive SQL level 1
ORA-01219: database not open: queries allowed on fixed tables/views only


Warning: You are no longer connected to ORACLE.
SQL> select instance_name,status from v$instance;
SP2-0640: Not connected
SQL> conn / as sysdba
Connected.
SQL>  select instance_name,status from v$instance;

INSTANCE_NAME    STATUS
---------------- ------------
pszx_by          MOUNTED

SQL> later database open;
SP2-0734: unknown command beginning "later data..." - rest of line ignored.
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01154: database busy. Open, close, mount, and dismount not allowed now

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

Database altered.

SQL> select instance_name,status from v$instance;

INSTANCE_NAME    STATUS
---------------- ------------
pszx_by          MOUNTED

SQL> alter database open;

Database altered.

SQL>  alter database recover managed standby database disconnect from session;
alter database recover managed standby database disconnect from session
*
ERROR at line 1:
ORA-01093: ALTER DATABASE CLOSE only permitted with no sessions connected


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

Database altered.

SQL>  select max(sequence#) from v$archived_log;

MAX(SEQUENCE#)
--------------
             3

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

Database altered.

SQL>  alter database open;

Database altered.

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

Database altered.




---initpszx_db.ora
[oracle@localhost dbs]$ cat initpszx_db.ora
pszx_db.__db_cache_size=88080384
pszx_db.__java_pool_size=4194304
pszx_db.__large_pool_size=4194304
pszx_db.__shared_pool_size=67108864
pszx_db.__streams_pool_size=0
*.aq_tm_processes=0
*.audit_file_dest='/oracle/admin/pszx_db/adump'
*.background_dump_dest='/oracle/admin/pszx_db/bdump'
*.compatible='10.2.0.1.0'
*.control_files='/oracle/oradata/pszx_db/control01.ctl','/oracle/oradata/pszx_db/control02.ctl','/oracle/oradata/pszx_db/control03.ctl'
*.core_dump_dest='/oracle/admin/pszx_db/cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_name='pszx_db'
*.db_recovery_file_dest='/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.dispatchers='(PROTOCOL=TCP) (SERVICE=pstcXDB)'
*.job_queue_processes=0
*.nls_language='SIMPLIFIED CHINESE'
*.nls_territory='CHINA'
*.open_cursors=300
*.pga_aggregate_target=16777216
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=167772160
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='/oracle/admin/pszx_db/udump'
DB_UNIQUE_NAME=pszx_db
LOG_ARCHIVE_CONFIG='DG_CONFIG=(pszx_db,pszx_by)'
LOG_ARCHIVE_DEST_1='LOCATION=/oracle/oradata/pszx_db/
VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=pszx_db'
LOG_ARCHIVE_DEST_2='SERVICE=pszx_by LGWR ASYNC
VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=pszx_by'
LOG_ARCHIVE_DEST_STATE_1=ENABLE
LOG_ARCHIVE_DEST_STATE_2=ENABLE
REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE
#--------..standby ...........
FAL_SERVER=pszx_by
FAL_CLIENT=pszx_db
DB_FILE_NAME_CONVERT='/oracle/oradata/pszx_by','/oracle/oradata/pszx_db'
LOG_FILE_NAME_CONVERT='/oracle/oradata/pszx_by','/oracle/oradata/pszx_db'
STANDBY_FILE_MANAGEMENT=AUTO

------initpszx_by.ora
[oracle@localhost dbs]$ cat initpszx_by.ora
pszx_db.__db_cache_size=88080384
pszx_db.__java_pool_size=4194304
pszx_db.__large_pool_size=4194304
pszx_db.__shared_pool_size=67108864
pszx_db.__streams_pool_size=0
*.aq_tm_processes=0
*.audit_file_dest='/oracle/admin/pszx_by/adump'
*.background_dump_dest='/oracle/admin/pszx_by/bdump'
*.compatible='10.2.0.1.0'
*.control_files='/oracle/oradata/pszx_by/control01.ctl','/oracle/oradata/pszx_by/control02.ctl','/oracle/oradata/pszx_by/control03.ctl'
*.core_dump_dest='/oracle/admin/pszx_by/cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_name='pszx_db'
*.db_recovery_file_dest='/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.dispatchers='(PROTOCOL=TCP) (SERVICE=pstcXDB)'
*.job_queue_processes=0
*.nls_language='SIMPLIFIED CHINESE'
*.nls_territory='CHINA'
*.open_cursors=300
*.pga_aggregate_target=16777216
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=167772160
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='/oracle/admin/pszx_by/udump'
db_unique_name=pszx_by
*.LOG_ARCHIVE_CONFIG='DG_CONFIG=(pszx_db,pszx_by)'
DB_FILE_NAME_CONVERT='/oracle/oradata/pszx_db','/oracle/oradata/pszx_by'
LOG_FILE_NAME_CONVERT='/oracle/oradata/pszx_db','/oracle/oradata/pszx_by'
LOG_ARCHIVE_FORMAT=log%t_%s_%r.arc
LOG_ARCHIVE_DEST_1='LOCATION=/oracle/oradata/pszx_by/
VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=pszx_by'
LOG_ARCHIVE_DEST_STATE_1=ENABLE
#---..........
LOG_ARCHIVE_DEST_2='SERVICE=pszx_db LGWR ASYNC
VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=pszx_db'
LOG_ARCHIVE_DEST_STATE_2=ENABLE
REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE
FAL_SERVER=pszx_db
FAL_CLIENT=pszx_by
STANDBY_FILE_MANAGEMENT=AUTO
添加评论

昵称 *

E-mail (防止垃圾信息,此栏留空)