ALTER DATABSE FORCE LOGGING
hi,
while creating standby database why should we start the database in force logging mode? what the use of it? what does it do?
With Regards
Boo
Synchorinization between primary and secondary database is done through archive logs. It would be safe to force primary database to log everything, so that it reflects to secondary database. That is the reason we have to force logging.
Similar Messages
-
Physical standby without ALTER DATABASE FORCE LOGGING
Hi,
Is it possible to use physical standby database without executing ALTER DATABASE FORCE LOGGING on primary side?
Can I use alter tablespace force logginng instead?
I want to have one tablespace with nologging option turned on to reduce redo traffic for some operations.
I can not check this because I don`t have enough servers to build standby configuration.YuriAP wrote:
Hi,
Is it possible to use physical standby database without executing ALTER DATABASE FORCE LOGGING on primary side?
YES
Can I use alter tablespace force logginng instead?
YES
ALTER TABLESPACE <tablespace name> FORCE LOGGING;
I want to have one tablespace with nologging option turned on to reduce redo traffic for some operations.
I can not check this because I don`t have enough servers to build standby configuration.http://download.oracle.com/docs/cd/B10500_01/server.920/a96521/create.htm#1022863 -
ORA-02231 error when issue ALTER DATABASE FORCE LOGGING
Hi,
Does everybody know why I faced ORA-02231 when issue below command in oracle,
SQL> ALTER DATABASE FORCE LOGGING;
ALTER DATABASE FORCE LOGGING
ERROR at line 1:
ORA-02231: missing or invalid option to ALTER DATABASE
SQL> ALTER DATABASE FORCE LOGGING ;
ALTER DATABASE FORCE LOGGING
ERROR at line 1:
ORA-02231: missing or invalid option to ALTER DATABASE
SQL> ALTER DATABASE FORCE LOGGING
2
SQL> ALTER TABLESPACE BIIS FORCE LOGGING
2 ;
ALTER TABLESPACE BIIS FORCE LOGGING
ERROR at line 1:
ORA-02142: missing or invalid ALTER TABLESPACE option
I use this oracle version:
Oracle9i Enterprise Edition Release 9.0.1.1.1 - Production
PL/SQL Release 9.0.1.1.1 - Production
CORE 9.0.1.1.1 Production
TNS for 32-bit Windows: Version 9.0.1.1.0 - Production
NLSRTL Version 9.0.1.1.1 - Production
Thanks.Hi Jaffar,
After I checked that you are correct.
I can issue the command without problem in oracle 9i Rel.2.
Thanks for your information.
Tarman. -
Ora-02331 error - while trying to force logging
Hi friends,
i am trying to configure the physical standby database and i am following this documentation http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/create_ps.htm.
when i am trying to do the force logging i am getting the following error.
SQL> alter database force logging;
alter database force logging
ERROR at line 1:
ORA-02231: missing or invalid option to ALTER DATABASE
Can anyone please tell me why it's happening?
ThanksWhich database are you doing this on? Supposed to run
it on the primary. I have only one database i.e primary db and trying to set up physical standby db.
Plus, which version of Oracle? I
see what the document link uses, but that doesn't
mean it is the version you are using.
SQL> select * from v$version;
BANNER
Oracle9i Enterprise Edition Release 9.0.1.1.1 - Production
PL/SQL Release 9.0.1.1.1 - Production
CORE 9.0.1.1.1 Production
TNS for 32-bit Windows: Version 9.0.1.1.0 - Production
NLSRTL Version 9.0.1.1.1 - Production
Can you pls guide me the right way to proceed furthur. -
Not dose Force logging.
Hi,
i am trying to create physical standby database.while giving command 'ALTER DATABASE FORCE LOGGING' it gives error like missing or invalid option to alter database.
Pls help.Hi,
Pls find the output.
SQL> select * from v$version;
BANNER
Oracle9i Enterprise Edition Release 9.0.1.1.1 - Production
PL/SQL Release 9.0.1.1.1 - Production
CORE 9.0.1.1.1 Production
TNS for 32-bit Windows: Version 9.0.1.1.0 - Production
NLSRTL Version 9.0.1.1.1 - Production
SQL> alter database force logging;
alter database force logging
ERROR at line 1:
ORA-02231: missing or invalid option to ALTER DATABASE
SQL> -
Question about ALTER SYSTEM ARCHIVE LOG START
Good morning,
I'm trying (unsuccessfully) to get my database to be in archive log mode.
These are the steps I followed:
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 535662592 bytes
Fixed Size 1375792 bytes
Variable Size 377487824 bytes
Database Buffers 150994944 bytes
Redo Buffers 5804032 bytes
Database mounted.
SQL> select log_mode from v$database;
LOG_MODE
ARCHIVELOG
SQL> show parameter log_archive_start;
NAME TYPE VALUE
log_archive_start boolean FALSE
SQL> alter system archive log start;
System altered.
SQL> show parameter log_archive_start;
NAME TYPE VALUE
log_archive_start boolean FALSE
SQL>I've gone thru that process twice but, I don't seem to be able to get the ARCH process to start. (newbie mistake I'm sure...)
Thank you for your help (again!),
John.The parameter log_archive_start is no more needed John (as suggested already) and the best way to check the archive options is through the archive log list command.
[oracle@edhdr2p0-orcl oui]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Tue Aug 10 10:51:57 2010
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 11
Current log sequence 13
SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 418484224 bytes
Fixed Size 1336932 bytes
Variable Size 318769564 bytes
Database Buffers 92274688 bytes
Redo Buffers 6103040 bytes
Database mounted.
SQL> select process,status from V$archive_processes;
PROCESS STATUS
0 STOPPED
1 STOPPED
2 STOPPED
3 STOPPED
4 STOPPED
5 STOPPED
6 STOPPED
7 STOPPED
8 STOPPED
9 STOPPED
10 STOPPED
PROCESS STATUS
11 STOPPED
12 STOPPED
13 STOPPED
14 STOPPED
15 STOPPED
16 STOPPED
17 STOPPED
18 STOPPED
19 STOPPED
20 STOPPED
21 STOPPED
PROCESS STATUS
22 STOPPED
23 STOPPED
24 STOPPED
25 STOPPED
26 STOPPED
27 STOPPED
28 STOPPED
29 STOPPED
30 rows selected.
SQL>
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
archive log list;
Database altered.
SQL> Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 11
Next log sequence to archive 13
Current log sequence 13
SQL>
SQL> select * from V$archive_processes where status <> 'STOPPED';
PROCESS STATUS LOG_SEQUENCE STAT
0 ACTIVE 0 IDLE
1 ACTIVE 0 IDLE
2 ACTIVE 0 IDLE
3 ACTIVE 0 IDLEHTH
Aman.... -
Advantage of FORCE LOGGING over NOLOGGING
Hi,
Can you please help me on the advantages of using force logging mode with a standby database and the effect of it in indexes etc. Also, it may help if you could also share ideas on difference between the two modes?
Thanks,
Jennah<i>>> Can you help me what factors would be sacrificed</i>
This really depends on your system, in most cases you will not be able to see a difference. However i did a small test:
- drop index, restart db
- create index with logging (measure time/redo size)
- drop index, restart db
- create index with logging (measure time/redo size)
Result:
logging - Elapsed: 00:02:40.68 / Redo size: 800mb
nologging - Elapsed: 00:02:20.29 / Redo size: 1.5mb
Here the full test:
[code]SQL> select a.name, b.value from v$statname a, v$mystat b where a.statistic# = b.statistic# and a.name = 'redo size';
NAME VALUE
redo size 28304
SQL> CREATE UNIQUE INDEX "SAPR3"."CDCLS~0" ON "SAPR3"."CDCLS"
("MANDANT", "OBJECTCLAS", "OBJECTID", "CHANGENR", "PAGENO")
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(INITIAL 65536 NEXT 65536 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "PSAPCLUI" LOGGING;
Index created.
Elapsed: 00:02:40.68
SQL> select a.name, b.value from v$statname a, v$mystat b where a.statistic# = b.statistic# and a.name = 'redo size';
NAME VALUE
redo size 834714816
SQL> select segment_name, bytes/1024/1024 "Size_MB" from dba_segments where segment_name = 'CDCLS~0'
SEGMENT_NAME Size_MB
CDCLS~0 800
drop index / db restart here
SQL> select a.name, b.value from v$statname a, v$mystat b where a.statistic# = b.statistic# and a.name = 'redo size';
NAME VALUE
redo size 28992
SQL> CREATE UNIQUE INDEX "SAPR3"."CDCLS~0" ON "SAPR3"."CDCLS"
("MANDANT", "OBJECTCLAS", "OBJECTID", "CHANGENR", "PAGENO")
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(INITIAL 65536 NEXT 65536 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "PSAPCLUI" NOLOGGING;
Index created.
Elapsed: 00:02:20.29
SQL> select a.name, b.value from v$statname a, v$mystat b where a.statistic# = b.statistic# and a.name = 'redo size';
NAME VALUE
redo size 1520824
SQL> select segment_name, bytes/1024/1024 "Size_MB" from dba_segments where segment_name = 'CDCLS~0';
SEGMENT_NAME Size_MB
CDCLS~0 800[/code] -
I want to create a physical standby database. The primary database is in archive log mode, and the 50% of the data belong to the staging area of datawarehouse. During ETL processes the database generates great amount of GBs of redologs. This tables contain temporary data that are only used for ETL process.
Can I set the database like FORCE LOGGING=N and set FORCE LOGGING=Y only for the tablespace that contain the tables of data (production, not intermediate) ???If you are trying to run a physical standby, for any database larger and more important than a toy, across the internet you are doomed to failure.
Databases do not fail on predictable schedules.
A DR site means a DR site ... it does not mean someplace out there in the cloud. For all you know your redo is being shipped to the moon and
back. Buy room in a data center no more than 500km away from your current location.
DR is for serious people with serious issues. If you do not need it then don't build it. If you do need it build it correctly. -
Force logging in archivelog mode
Hi !!!
What happen if I have "force_logging" parameter set to true when the database is in archivelog mode ?
Thanks.rarain wrote:
Hi Juamd,
You should only use this option when it is really required because this option will forcibly generate redo for all Nologging operations that means you might find more archives and you need to setup more space for archive.
Normally we use this option when we need to replicate data changes from one database to another database like in standby configuration, Golden Gate replication etc. I would suggest you to monitor Redo amount generated after enabling this option and accordingly estimate archive space and backup space for archive.
Thanks...Ah, don't agree with that at all. You can compromise your recovery if you happen to want to restore to a point-in-time when there was a NOLOGGING operation going on. Fine, if it's an index, but if it happens to be on a table...
(Yes, been there, done that - with a non-Production database, thankfully)
This is one of the 'must haves', IMO, for Production - set it at the database-level and it overrides any tablespace or object setting.
Archivelogs are generated for a reason. If you have a particular operation that really does massively benefit from NOLOGGING and is something you are sure that you simply re-run/re-create yourself, fine. If not, by default, you really should FORCE LOGGING. -
Alter system archive log current
Hi everyone,
I write code to alter system archive log current in PL/SQL as following:
declare
start_sequence number;
end_sequence number;
begin
--- get start sequence# ---
select SEQUENCE# into start_sequence from v_$log where status='CURRENT';
--- get end sequence# ---
alter system archive log current;
select SEQUENCE# into end_sequence from v_$log where status='CURRENT';
end;
When I run it, I got the following error:
alter system archive log current;
ERROR at line 11:
ORA-06550: line 11, column 6:
PLS-00103: Encountered the symbol "ALTER" when expecting one of the following:
begin case declare end exception exit for goto if loop mod
null pragma raise return select update while with
<an identifier> <a double-quoted delimited-identifier>
<a bind variable> << close current delete fetch lock insert
open rollback savepoint set sql execute commit forall merge
pipe
What does it mean? How can I fix it/
Thanks!That is because you are trying to issue a DDL call in PL/SQL. The only way you can achieve this is to use DYNAMIC SQL.
If you change your ALTER statement to:
EXECUTE IMMEDIATE 'ALTER SYSTEM ARCHIVE LOG CURRENT';It should work.
HTH! -
RMAN ALert Log Message: ALTER SYSTEM ARCHIVE LOG
Created a new Database on Oracle 10.2.0.4 and now seeing "ALTER SYSTEM ARCHIVE LOG" in the Alert Log only when the online RMAN backup runs:
Wed Aug 26 21:52:03 2009
ALTER SYSTEM ARCHIVE LOG
Wed Aug 26 21:52:03 2009
Thread 1 advanced to log sequence 35 (LGWR switch)
Current log# 2 seq# 35 mem# 0: /u01/app/oracle/oradata/aatest/redo02.log
Current log# 2 seq# 35 mem# 1: /u03/oradata/aatest/redo02a.log
Wed Aug 26 21:53:37 2009
ALTER SYSTEM ARCHIVE LOG
Wed Aug 26 21:53:37 2009
Thread 1 advanced to log sequence 36 (LGWR switch)
Current log# 3 seq# 36 mem# 0: /u01/app/oracle/oradata/aatest/redo03.log
Current log# 3 seq# 36 mem# 1: /u03/oradata/aatest/redo03a.log
Wed Aug 26 21:53:40 2009
Starting control autobackup
Control autobackup written to DISK device
handle '/u03/exports/backups/aatest/c-2538018370-20090826-00'
I am not issuing a log swiitch command. The RMAN commands I am running are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u03/exports/backups/aatest/%F';
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET;
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/u03/exports/backups/aatest/%d_%U';
BACKUP DATABASE PLUS ARCHIVELOG;
DELETE NOPROMPT OBSOLETE;
DELETE NOPROMPT ARCHIVELOG UNTIL TIME 'SYSDATE-2';
I do not see this message on any other 10.2.0.4 instances. Has anyone seen this and if so why is this showing in the log?
Thank you,
Curt SwartzlanderThere's no problem with log switch. Please refer to documentation for more information on syntax "PLUS ARCHIVELOG"
http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/bkup003.htm#sthref377
Adding BACKUP ... PLUS ARCHIVELOG causes RMAN to do the following:
*1. Runs the ALTER SYSTEM ARCHIVE LOG CURRENT command.*
*2. Runs BACKUP ARCHIVELOG ALL. Note that if backup optimization is enabled, then RMAN skips logs that it has already backed up to the specified device.*
*3. Backs up the rest of the files specified in BACKUP command.*
*4. Runs the ALTER SYSTEM ARCHIVE LOG CURRENT command.*
*5. Backs up any remaining archived logs generated during the backup.*
This guarantees that datafile backups taken during the command are recoverable to a consistent state. -
Direct Path Loads Vs FORCED LOGGING
Hello everyone,
I just got below doubt.
Suppose, we've
One Oracle Primary Database (running in FORCED LOGGING mode) and,
One Oracle Standy Database (Oracle Data Gaurd)
My doubt is that if we use sqlloader direct path to load data in a table in primary database, will it generate/send the redo and ship the same to standby database ?Thanks Anil,
But have a doubt again.
How does direct path data upload generate redo if it's working on just data blocks.
I.e. get the block adjust the high water and put the records. -
Sql query needed to verify force logging
Hi.
Does anyone out there have SQL query we need to run in order to see if our db is working in force logging mode?
Thanks.
DAThe FORCE_LOGGING column of v$database view can be queried to verify that the database is in FORCE LOGGING mode. Similarly, the FORCE_LOGGING column of dba_tablespace view provides the same information for each tablespace.
Kamran Agayev A. (10g OCP)
http://kamranagayev.wordpress.com -
Force logging at tablespace level for standby database
Hi
Can we create a standby database by enabling force logging at tablespace level instead of enabling it at database level.I want to out the tablespace containing indexes in nologging mode so that when I rebuild the indexes no logs will be generated.Technically, you can create a Standby without having set FORCELOGGING at the Primary database.
You can also then selectively FORCELOGGING for all your important tablespaces (beginning with SYSTEM, SYSAUX, UNDO ....)
However, for a Physical Standby Redo Apply will mark the blocks (e.g. those populated by the CREATE INDEX .. NOLOGGING) as "corrupt". You will get Read Errors (ORA-1578 and ORA-26040) when you attempt to read the index (e.g. for a Table query).
So you have to monitor your NOLOGGING operations and the datafiles where NOLOGGING is applied. You can take Incremental RMAN Backups of such datafiles and restore them to the Standby immediately after the NOLOGGING operations.
Hemant K Chitale -
What is 'force logging'?
Why we need some ddl not to be wroten to the redo logs? What is the idea? How can we recover the database if some infromation in archivelogs is missed?
Thanks in advanceIn theory, yo may wish to allow an application to load data as a "no logging" operation, this can speed up large data loads and reduce the volume of archivelogs produced.
However the major drawbacks are:
if you need to recover the database form a backup any data added using a no logging operation performed after the backup was taken will not be recoverable from the archive logs.
If you are using log shipping/data guard these operations will not get transmitted to the standby server.
If you work in a controlled an disciplined enviroment then it should be possible to repeat any no logging operations after the database is recovered as everyone should be aware of the limitations of loading data in this manner.
If you work anywhere thats like the places I've come accross a more likely situation is after a database recovery someone will want to know why data is missing from the database and how long it will be untill you resolve the problem. Usually I set force logging on and let the users think they have the option to run nologgign operations as it leads to a quieter life in the long run.
Maybe you are looking for
-
How can i change my credit card information in itunes?
My credit card has expired and when I tried to enter a new one in my Itunes account it won't allow me! I've also tried to select Paypal and even though it says in Paypal that Ive created the account with Itunes... it doesn't seem to work in Itunes. C
-
How to configure the jms adapter
hi all, i got some trouble trying to configure de JMS adapter, i 'd be glad if some colud give me a hand with this. i'am wordering if there is a complete document about this topic to help me out with de configuration. thk u all very much. Rega
-
I have problems connetcing through my wireless home network. I apperently get connected to my lokal wireless router, but I'm not able to get to the Internet; I opens my browser, click a shortcut but after at short while I get the message "No info fr
-
IPhoto/Spotlight not indexing SOLUTION
For those iPhoto 6 users whoose comments and keywords not being indexed by Spotlight, here is the solution to your problem! If you are getting * Parsing file: '~/Pictures/iPhoto Library/AlbumData.xml' ERROR: syntax error (<key>PhotoCount</key>) when
-
Page size limitation on Sun ONE directory server 5.2
Hi All, How do i know what is the Page size limitation on Sun ONE directory server 5.2? How do i cahnage it? Best Regards, Ayelet Regev [email protected]