Welcome Guest ( Log In | Register )


 
 
 
 
 
 

 
 
Oracle 

Performance Tuning Reference poster
 
Oracle training in Linux 

commands
 
Oracle training Weblogic Book
 
Easy Oracle Jumpstart
 
Oracle training & performance tuning books
 
Burleson Consulting Remote DB Administration
 
 
 
Reply to this topicStart new topic
> Data guard, LRM-00121: 'SERVICE=drstby' is not an allowable value for '
thiyagusham
post Oct 22 2012, 01:37 AM
Post #1


Advanced Member
***

Group: Members
Posts: 78
Joined: 16-March 12
From: Chennai from India
Member No.: 46,939



Hi to all ;

I am configuring Dataguard.. I can't resolve this error ..

prim>startup pfile='/u01/app/oracle/admin/drprod/pfile/initdr.ora' nomount;

LRM-00121: 'SERVICE=drstby' is not an allowable value for 'log_archive_dest_state_2 '

ORA-01078: failure in processing system parameters

Init.ora file details:-

CODE
drprod.__db_cache_size=620756992
drprod.__java_pool_size=4194304
drprod.__large_pool_size=4194304
drprod.__shared_pool_size=205520896
drprod.__streams_pool_size=0
*.background_dump_dest='/u01/app/oracle/admin/drprod/bdump/'
*.compatible='10.2.0'
*.control_files='/u01/app/oracle/oradata/drprod/ctrl.ctl'
*.core_dump_dest='/u01/app/oracle/admin/drprod/cdump/'
*.db_block_size=8192
*.db_name='drprod'
*.db_unique_name='drprod'
*.log_archive_dest_1='location=/u01/app/oracle/oradata/drprod/arch/'
  *.log_archive_dest_state_1='ENABLE'
*.log_archive_dest_state_2='ENABLE'
*.open_cursors=1024
*.pga_aggregate_target=300m
*.processes=300
*.sessions=300
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=800m
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS'
LOG_ARCHIVE_CONFIG='DG_CONFIG=(drprod,drstby)'
log_archive_dest_state_2='SERVICE=drstby'
fal_client=drprod
fal_server=drstby
*.user_dump_dest='/u01/app/oracle/admin/drprod/udump/'
DB_FILE_NAME_CONVERT='/u01/app/oracle/oradata/drstby/','/u01/app/oracle/oradata/drprod/'
log_file_name_convert='/u01/app/oracle/oradata/drstby/','/u01/app/oracle/oradata/drprod/'
standby_file_management='auto'
standby_archive_dest='/u01/app/oracle/oradata/drprod/arch/'


>> can any one help me to resolve this error ...
Regards
Thiyagusham

Go to the top of the page
 
+Quote Post
burleson
post Oct 22 2012, 07:43 AM
Post #2


Advanced Member
***

Group: Members
Posts: 11,640
Joined: 26-January 04
Member No.: 13



Set LOG_ARCHIVE_DEST_STATE_2=ENABLE



LRM-00121: string is not an allowable value for string

Cause: The value is not a legal value for this parameter.

Action: Refer to the manual for allowable values.


--------------------
Hope this helps. . .

Donald K. Burleson
Oracle Press author
Author of Oracle Tuning: The Definitive Reference
Go to the top of the page
 
+Quote Post
thiyagusham
post Oct 22 2012, 12:16 PM
Post #3


Advanced Member
***

Group: Members
Posts: 78
Joined: 16-March 12
From: Chennai from India
Member No.: 46,939



Hello DBAs


First time i executed following query from standby database . No error. now i am getting ORA-01153:

CODE
stby>alter database recover managed standby database disconnect from session;
alter database recover managed standby database disconnect from session
*
ERROR at line 1:
ORA-01153: an incompatible media recovery is active

select sequence#, applied from v$archived_log;

no rows selected.

stby>select status from v$instance;

STATUS
------------
MOUNTED


Regards
Thiyagusham .G
Go to the top of the page
 
+Quote Post
burleson
post Oct 22 2012, 03:35 PM
Post #4


Advanced Member
***

Group: Members
Posts: 11,640
Joined: 26-January 04
Member No.: 13



Hi Thiyagusham,

http://www.dba-oracle.com/t_ora_01153_inco...ia_recovery.htm


QUOTE
Attempted to start an incompatible media recovery or open resetlogs during media recovery or RMAN backup


--------------------
Hope this helps. . .

Donald K. Burleson
Oracle Press author
Author of Oracle Tuning: The Definitive Reference
Go to the top of the page
 
+Quote Post
thiyagusham
post Oct 22 2012, 03:57 PM
Post #5


Advanced Member
***

Group: Members
Posts: 78
Joined: 16-March 12
From: Chennai from India
Member No.: 46,939



Hello DBAs

I did cold back up .. Shall i restore same backup again. I did n't any transactions in primary Database ...

>> Media recovery sessions are mismatched , if they attempt to recover the same data file >>

Could you elaborate little more ...

Shall i restore same data files ...

Regards,

Thiyagusham .G
Go to the top of the page
 
+Quote Post
burleson
post Oct 23 2012, 08:43 AM
Post #6


Advanced Member
***

Group: Members
Posts: 11,640
Joined: 26-January 04
Member No.: 13



Hi Thiyagusham,

>> Shall i restore same data files ...


First, bounce the database and see if that clears-up your issue . . .


--------------------
Hope this helps. . .

Donald K. Burleson
Oracle Press author
Author of Oracle Tuning: The Definitive Reference
Go to the top of the page
 
+Quote Post
thiyagusham
post Oct 23 2012, 03:45 PM
Post #7


Advanced Member
***

Group: Members
Posts: 78
Joined: 16-March 12
From: Chennai from India
Member No.: 46,939



Hai ;


>> Always using Sevice name as dbname >>

PrimDB is : drprod , Service name also drprod
StbyDB is : drstby , Service name also drstby

I have some doubts "please clarify"

in initdrprod.ora file

FAL_Client = (Should i enter service name , or Db name
FAL_Server = Should i enter service name , or Db name)

FAL_CLIENT='whichone'
FAL_Server ='whichone'

>> Purpose of Log_archive_config=’DG_CONFIG >>

Log_archive_config=’DG_CONFIG=(primary, standby)’ >>

SQL> alter system set log_archive_config='DG_CONFIG=(primary, standby)'

Regards;
Thiyagusham.G



Go to the top of the page
 
+Quote Post
thiyagusham
post Oct 24 2012, 06:04 PM
Post #8


Advanced Member
***

Group: Members
Posts: 78
Joined: 16-March 12
From: Chennai from India
Member No.: 46,939



Hi DBAs

>> Little confusion abt following statements >>

ARCH process has the ability to write to standby redo logs.
LGWR and Remote File System (RFS) processes write the redo to the standby redo log files

http://www.toadworld.com/KNOWLEDGE/Knowled...RD/Default.aspx

Thanks
Go to the top of the page
 
+Quote Post
praxis22
post Oct 26 2012, 05:06 AM
Post #9


Advanced Member
***

Group: Members
Posts: 61
Joined: 26-October 12
From: Germany
Member No.: 47,845



QUOTE (thiyagusham @ Oct 23 2012, 04:45 PM) *
Hai ;


>> Always using Sevice name as dbname >>

PrimDB is : drprod , Service name also drprod
StbyDB is : drstby , Service name also drstby

I have some doubts "please clarify"

in initdrprod.ora file

FAL_Client = (Should i enter service name , or Db name
FAL_Server = Should i enter service name , or Db name)

FAL_CLIENT='whichone'
FAL_Server ='whichone'

>> Purpose of Log_archive_config=’DG_CONFIG >>

Log_archive_config=’DG_CONFIG=(primary, standby)’ >>

SQL> alter system set log_archive_config='DG_CONFIG=(primary, standby)'

Regards;
Thiyagusham.G


I script mine, there are my primary and standby templates:

Primary:

archive_lag_target=0
audit_file_dest='/u02/oradata/[PRIMARY]/dump/audit'
compatible='10.2.0'
control_files='/u02/oradata/[PRIMARY]/ctl/01/ctl1.dat','/u02/oradata/[PRIMARY]/ctl/02/ctl2.dat','/u01/oradata/[PRIMARY]/ctl/03/ctl3.dat'
db_block_size=4096
db_create_file_dest='/u02/oradata'
db_domain='[DOMAIN]'
db_file_multiblock_read_count=8
db_flashback_retention_target=2880
db_name='[PRIMARY]'
instance_name='[PRIMARY]'
db_recovery_file_dest_size=8G
db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
db_unique_name='[PRIMARY]'
#dg_broker_start=true
dispatchers='(PROTOCOL=TCP) (SERVICE=[PRIMARY]XDB)'
fal_client='[PRIMARY]'
fal_server='[STANDBY]'
job_queue_processes=10
log_archive_config='DG_CONFIG=([PRIMARY],[STANDBY])'
log_archive_dest_1='LOCATION=/u01/archive/[PRIMARY]/arch VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=[PRIMARY]'
log_archive_dest_2='SERVICE=[STANDBY] LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=[STANDBY]'
log_archive_dest_state_1='enable'
log_archive_dest_state_2='enable'
log_archive_format='%t_%s_%r.dbf'
primary.log_archive_format='%t_%s_%r.dbf'
log_archive_max_processes=2
log_archive_min_succeed_dest=1
primary.log_archive_trace=0
db_file_name_convert= '[STANDBY]','[PRIMARY]'
log_file_name_convert= '[STANDBY]','[PRIMARY]'
open_cursors=300
processes=150
optimizer_mode='ALL_ROWS'
remote_login_passwordfile='EXCLUSIVE'
primary.standby_archive_dest='/u02/oradata/[PRIMARY]/arch'
standby_file_management='AUTO'
undo_management='AUTO'
undo_tablespace='RBS'
utl_file_dir='/u02/oradata/[PRIMARY]/dict'
diagnostic_dest='/u02/oradata/[PRIMARY]'
memory_target=3G
memory_max_target=10G
#local_listener='LISTENER'
service_names='[PRIMARY]'

Standby:

archive_lag_target=0
audit_file_dest='/u02/oradata/[STANDBY]/dump/audit'
compatible='10.2.0'
control_files='/u02/oradata/[STANDBY]/ctl/01/ctl1.dat','/u02/oradata/[STANDBY]/ctl/02/ctl2.dat','/u01/oradata/[STANDBY]/ctl/03/ctl3.dat'
db_block_size=4096
db_create_file_dest='/u02/oradata'
db_domain='[DOMAIN]'
db_file_multiblock_read_count=8
db_flashback_retention_target=2880
db_name='[PRIMARY]'
instance_name='[STANDBY]'
db_recovery_file_dest_size=8G
db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
db_unique_name='[STANDBY]'
#dg_broker_start=true
dispatchers='(PROTOCOL=TCP) (SERVICE=[STANDBY]XDB)'
fal_client='[STANDBY]'
fal_server='[PRIMARY]'
job_queue_processes=10
log_archive_config='DG_CONFIG=([STANDBY],[PRIMARY])'
log_archive_dest_1='LOCATION=/u01/archive/[STANDBY]/arch VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=[STANDBY]'
log_archive_dest_2='SERVICE=[PRIMARY] LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=[PRIMARY]'
log_archive_dest_state_1='enable'
log_archive_dest_state_2='enable'
log_archive_format='%t_%s_%r.dbf'
log_archive_max_processes=2
log_archive_trace=0
db_file_name_convert= '[PRIMARY]','[STANDBY]'
log_file_name_convert= '[PRIMARY]','[STANDBY]'
open_cursors=300
processes=150
optimizer_mode='ALL_ROWS'
remote_login_passwordfile='EXCLUSIVE'
standby.standby_archive_dest='/u02/oradata/[STANDBY]/arch'
standby_file_management='AUTO'
undo_management='AUTO'
undo_tablespace='RBS'
utl_file_dir='/u02/oradata/[STANDBY]/dict'
diagnostic_dest='/u02/oradata/[STANDBY]'
memory_target=3G
memory_max_target=10G
#local_listener='LISTENER_STDBY'
service_names='[STANDBY]'

The reason there are two hashed out entries in the init scripts is those entries only work once you have built your DB, not before. So once you have your DB up and open, including local tablespaces, then configure the dataguard broker, uncomment the two entries in the init files, and restart your DB's

I then have sed scripts that replace the names in [..] on the fly to generate the init{SID}.ora files and copy them into place.

You may also want to remove the compatible='10.2.0' line, if you're building 11g from scratch, it can't go lower than 10.0

This is probably a non standard way of doing things, but it does actually work, (at least at the redo log level smile.gif

This sets the standby up to do immediate redo log transfers from the primary, in MAX_PERFORMANCE mode.

On my system /u01 contains the app and the archives, backup control files, /u02 contains the live database instances, these are different file systems.

You will need a Listener.ora and a tnsnames.ora setup like this:

tnsnames is global, same file on all hosts, it contains the name of all the DB instances in your environment.
Listener is local, different on each host.

$TNS_ADMIN/tnsnames.ora

#
# Filename: tnsnames.ora
#
standby.[DOMAIN] =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = <standby IP>)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED) (UR = A)
(SID = standby)
)
)

primary.[DOMAIN] =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = <primary IP>)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED) (UR = A)
(SID = primary)
)
)

LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = <primary IP>)(PORT = 1521))
)

LISTENER_STDBY =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = <standby IP>)(PORT = 1521))
)

The (SERVER = DEDICATED) (UR = A) stuff is to allow you to control the DB instance from rman with the DB started nomount, it's primarily for backups and restores. You can remove that if you like.

$TNS_ADMIN/listener.ora (Primary)

#
# Filename: listener.ora
#
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = primary)
(GLOBAL_DBNAME= primary)
(ORACLE_HOME= <$ORACLE_HOME>)
)
(SID_DESC =
(SID_NAME = primary)
(GLOBAL_DBNAME= primary_DGMRL.[DOMAIN])
(ORACLE_HOME= <$ORACLE_HOME>)
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = <primary IP>)(PORT = 1521))
)
)

You need to replace <$ORACLE_HOME> with your oracle path: /u01/app/oracle/product/...

The listener for the standby just changes the SID names and IP of the standby server.

By default the [DOMAIN] is 'world' (no quotes) or you can set your own in $TNS_ADMIN/sqlnet.ora as below:


#
# Filename: sqlnet.ora
#
NAMES.DEFAULT_DOMAIN = [DOMAIN GOES HERE]
NAMES.DIRECTORY_PATH= (TNSNAMES)


If you're only doing dataguard on one machine you can probably ignore the network setup, but the log_archive_destination strings may change. Mine are physical, this is why it looks this way.

Hope that helps, took me a while to get it working too smile.gif


--------------------
Geek, scruff, economics wonk, a mind forever voyaging.
Go to the top of the page
 
+Quote Post
thiyagusham
post Oct 26 2012, 05:35 AM
Post #10


Advanced Member
***

Group: Members
Posts: 78
Joined: 16-March 12
From: Chennai from India
Member No.: 46,939



@ PRAXIS

Thnx praxis. Well explained...

MAy i know what should i change 'tnsnames.ora' file settings. Now i am not using DATAGUARD BROKEN

Can i remove that ?

Thanks !!
Go to the top of the page
 
+Quote Post
praxis22
post Oct 26 2012, 06:36 AM
Post #11


Advanced Member
***

Group: Members
Posts: 61
Joined: 26-October 12
From: Germany
Member No.: 47,845



QUOTE (thiyagusham @ Oct 26 2012, 06:35 AM) *
@ PRAXIS

Thnx praxis. Well explained...

MAy i know what should i change 'tnsnames.ora' file settings. Now i am not using DATAGUARD BROKEN

Can i remove that ?

Thanks !!


I'm not sure I understand the question.

The tnsnames.ora is a copy of my working environment.

I have two databases primary (the primary DB) and standby (the standby database) so you can do:

tnsping primary

or

tnsping primary.world etc.

primary & standby are just database instance names. if you change the [PRIMARY] to your primary DB name and [STANDBY] to your standby DB name then you should have a semi working system. You need to build a real DB for the primary, but the standby just uses a control file copy from the primary and the same orapwd file and then comes up nomount. You will need extra redo logs, etc. one more on the standby than the primary, but you can find all that online. google "oracle 11gr2 network setup for dataguard" that should get you started.

You'll need to do some post config on the standby to get it up as a unmounted standby, (or an active standby if you've paid Oracle for that functionality) but it basically works.


--------------------
Geek, scruff, economics wonk, a mind forever voyaging.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 1st November 2014 - 03:52 AM