SQL Select FORCE - LOGGING From V$database For - NO SQL Archive Log
SQL Select FORCE - LOGGING From V$database For - NO SQL Archive Log
FOR
---
NO
Database altered.
no rows selected
SQL>
where
file - name of password file (mand),
password - password for SYS (mand),
entries - maximum number of distinct DBA and force - whether to overwrite existing
file (opt),
OPERs (opt),
There are no spaces around the equal-to (=) character.
bash-3.00$ ls *car*
initcar.ora orapwcar spfilecar.ora
Note:
When REMOTE_LOGIN_PASSWORDFILE is set to either exclusive or shared, but the
password file does not exist, then the behavior is the same as setting
REMOTE_LOGIN_PASSWORDFILE to none.
The size of the standby redo log files should match the size of the current Primary
database online redo log files. To find out the size of your online redo log files:
(BYTES/1024)/1024
-----------------
100
100
SQL> select group#,member from v$logfile;
GROUP# MEMBER
---------- -----------------------------------
1 /u03/oradata/car/r1a.log
1 /u03/oradata/car/r1b.log
2 /u03/oradata/car/r2a.log
2 /u03/oradata/car/r2b.log
Database altered.
GROUP# STATUS
---------- ----------
3 UNASSIGNED
4 UNASSIGNED
File created.
db_name=PRIM
db_unique_name=PRIM
LOG_ARCHIVE_CONFIG='DG_CONFIG=(PRIM,STAN)'
LOG_ARCHIVE_DEST_1=
'LOCATION=F:\Oracle\flash_recovery_area\PRIM\ARCHIVELOG
The archiver process (ARCn ) or log writer process (LGWR) can be configured to
archive online redo logs to a maximum of 10 destinations. These destinations are
specified using the LOG_ARCHIVE_DEST_n (where n is a number from 1 to 10)
database initialization parameter. One destination must be a local directory, but others
can be at remote destinations. A remote destination is identified by an Oracle Net
network service name, which is defined in the appropriate network services configuration
files.
Archiving redo logs to a remote destination requires uninterrupted connectivity through
Oracle Net. If the destination is a remote physical standby database, it must be mounted
or open in read-only mode to receive the archived redo logs.
VALID_FOR=(ALL_LOGFILES,ALL_ROLES)
The valid_for attribute takes two parameters, the archival_source parameter and the
database_role parameter. The archival_source parameter defines when the destination is
used. Valid settings for this parameter are as follows:
ONLINE_LOGFILE This destination is used only when archiving online redo log files.
This destination is not used when archiving standby redo log files, or if log files are
being received from another database.
STANDBY_LOGFILE This destination is used only when standby redo log files are being
archived or if archived redo logs are being received from another database.
ALL_LOGFILES This destination can be used in either role, archiving online or standby
redo log files.
The database_role parameter is the second parameter of the valid_for attribute. As the
name implies, this parameter defines the role of the database that the parameter is
associated with and, thus, when the archive log destination will be used. Valid settings
for this parameter are as follows:
PRIMARY_ROLE This destination is used only when the database is in the primary
database role.
STANDBY_ROLE This destination is used only when the database is in a standby role.
This applies to both physical and logical standby databases.
ALL_ROLES Open the barn doors Bessie! This destination is used if the database is in
primary or standby mode.
DB_UNIQUE_NAME=PRIM'
LOG_ARCHIVE_DEST_2=
VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
DB_UNIQUE_NAME=STAN'
LOG_ARCHIVE_DEST_STATE_1=ENABLE
LOG_ARCHIVE_DEST_STATE_2=ENABLE
LOG_ARCHIVE_FORMAT=%t_%s_%r.arc
LOG_ARCHIVE_MAX_PROCESSES=30
remote_login_passwordfile='EXCLUSIVE'
FAL_SERVER=STAN
FAL_SERVER specifies the FAL (fetch archive log) server for a standby database. The
value is an Oracle Net service name, which is assumed to be configured properly on the
standby database system to point to the desired FAL server.
FAL_CLIENT=PRIMCAR
FAL_CLIENT specifies the FAL (fetch archive log) client name that is used by the FAL
service, configured through the FAL_SERVER parameter, to refer to the FAL client. The
value is an Oracle Net service name, which is assumed to be configured properly on the
FAL server system to point to the FAL client (standby database).
STANDBY_FILE_MANAGEMENT=AUTO
STANDBY_FILE_MANAGEMENT enables or disables automatic standby file
management. When automatic standby file management is enabled, operating system file
additions and deletions on the primary database are replicated on the standby database.
Values:
MANUAL
disables automatic standby file management
AUTO
enables automatic standby file management
DB_FILE_NAME_CONVERT='E:\oracle\product\10.2.0\oradata\STAN\DATAFILE','E:\
oracle\product\10.2.0\oradata\PRIM\DATAFILE'
LOG_FLE_NAME_CONVERT=’E:\oracle\product\10.2.0\oradata\STAN\ONLINELOG’,
’E:\oracle\product\10.2.0\oradata\PRIM\ONLINELOG’,’F:\Oracle\flash_recovery_area
\STAN\ONLINELOG’,’F:\
Oracle\flash_recovery_area\PRIM\ONLINELOG’
SQL>STARTUP
ORACLE instance started.
Database altered.
Database altered.
Copy the Primary DB pfile to Standby server and rename/edit the file.
Rename it to pfileSTAN.ora, and modify the file as follows. : (Here the file paths
are from a windows system. For UNIX system, specify the path accordingly)
**.background_dump_dest='/u01/app/admin/stan/bdump'
*.compatible='10.2.0'
*.control_files='/u03/oradata/stan/stan.ctl','/u03/oradata/stan/stand.ctl'
*.core_dump_dest='/u01/app/admin/stan/cdump'
*.db_block_buffers=100# SMALL
*.db_file_multiblock_read_count=8# SMALL
*.DB_FILE_NAME_CONVERT='/u03/oradata/car','/u03/oradata/stan'
*.db_files=80# SMALL
*.db_name='car'
*.db_unique_name=stan
*.FAL_CLIENT=stan
*.FAL_SERVER=car
*.instance_name='car'
*.log_archive_config='DG_CONFIG=(PRIM,STAN)'
*.log_archive_dest_1='LOCATION=/u03/oradata/stan/arc
VALID_FOR=(ALL_LOGFILES,ALL_ROLES)
db_unique_name=stan'
*.log_archive_dest_2='SERVICE=car LGWR ASYNC
VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
DB_UNIQUE_NAME=car'
*.LOG_ARCHIVE_DEST_STATE_1='ENABLE'
*.LOG_ARCHIVE_DEST_STATE_2='ENABLE'
*.LOG_ARCHIVE_MAX_PROCESSES=30
*.log_buffer=32768# SMALL
*.log_checkpoint_interval=10000
*.LOG_FiLE_NAME_CONVERT='/u03/oradata/car','/u03/oradata/stan'
*.max_dump_file_size='10240'# limit trace file size to 5 Meg each
*.parallel_max_servers=5# SMALL
*.processes=50# SMALL
*.shared_pool_size=67232153# SMALL
*.STANDBY_FILE_MANAGEMENT='AUTO'
*.undo_management='auto'
*.undo_retention=900
*.undo_tablespace='undotbs'
*.user_dump_dest='/u01/app/admin/stan/udump'
System altered.
On Standby server, create all required directories for dump and archived log
destination:
On Primarysystem: use Oracle Net Manager to configure a listener for PRIM and
STAN. Then restart the listener.
On Standby server: use Net Manager to configure a listener for PRIM and STAN.
Then restart the listener.
On Primary system: use Oracle Net Manager to create network service names for
PRIM and STAN. Check tnsping to both services:
$tnsping PRIM
$tnsping STAN
On Standby system: use Oracle Net Manager to create network service names for
PRIM and STAN. Check tnsping to both services:
$tnsping PRIM
$tnsping STAN
File created.
SQL> shutdown
ORA-01507: database not mounted
SQL> alter database recover managed standby database disconnect from session;
Database altered.
If you want the redo data to be applied as it is received without waiting for
the current standby redo log file to be archived, enable the real-time apply.