Home » Server Options » Data Guard » Standby database error: primary failed to connect to standby (Oracle 10.2.0.3 enterprise Windwos server 2003)
Standby database error: primary failed to connect to standby [message #321206] Mon, 19 May 2008 07:29 Go to next message
tomvdduin
Messages: 3
Registered: May 2008
Location: Huizen
Junior Member
This is my first attempt to create a standby server configuration. I don't know what I'm doing wrong, but this is what I'm doing:

primary database:
- perform command 'alter database begin backup'
- perform command 'alter database create standby controlfile as '<location>' reuse;'
- perform command 'create pfile ='<location>' from spfile;'
- copy password file to temporary location
- copy datafiles (all datafiles known in v$datafile) to temporary location
- perform command 'alter database end backup'

standby database (same hardware/oracle installation/file and folder structure as primary database)
- copy the passwordfile in \database\ folder
- copy the pfile created above in \database\ folder
- create service
- perform command 'startup nomount'
- perform command 'create spfile from pfile'
- copy controlfile created above to correct locations
- copy datafiles created above to correct location
- perform command 'alter database mount standby database;'
- perform command 'alter database recover managed standby database disconnect from session;'

all command are executed as sys (sysdba) and execute without error. The SID is identical on both databases, I can perform 'sqlplus /nolog' and 'conn sys/<pwd>@standbydatabase as sysdba' from the primary database without problems.

now when i do a logfile switch on the primary database, the following errors appear:
- select facility, severity, message from v$dataguard_status
Log Transport Services	Informational	ARC0: Archival started
Log Transport Services	Informational	ARC1: Archival started
Log Transport Services	Informational	ARC0: Becoming the 'no FAL' ARCH
Log Transport Services	Informational	ARC0: Becoming the 'no SRL' ARCH
Log Transport Services	Informational	ARC1: Becoming the heartbeat ARCH
Log Transport Services	Error	Error 1017 received logging on to the standby
Fetch Archive Log	Error	FAL[server, ARC1]: Error 16191 creating remote archivelog file 'ZENOWM_standby'

- select error from v$archive_dest_status where dest_id=2;
ORA-16191: Primary log shipping client not logged on standby

in alertlog:
ARCH: FAL archive failed. Archiver continuing
Mon May 19 14:21:00 2008
Errors in file d:\oracle\admin\zenowm\bdump\zenowm_arc1_600.trc:
ORA-01017: invalid username/password; logon denied

Mon May 19 14:21:00 2008
Error 1017 received logging on to the standby
------------------------------------------------------------
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE, 
and that the SYS password is same in the password files.
      returning error ORA-16191
------------------------------------------------------------
Mon May 19 14:21:00 2008
Errors in file d:\oracle\admin\zenowm\bdump\zenowm_arc1_600.trc:
ORA-16191: Primary log shipping client not logged on standby

PING[ARC1]: Heartbeat failed to connect to standby 'ZENOWM_standby'. Error is 16191.


tracefile is attaced.

any idea what I'm doing wrong? any help is greatly appreciated!
Re: Standby database error: primary failed to connect to standby [message #321218 is a reply to message #321206] Mon, 19 May 2008 08:14 Go to previous messageGo to next message
tomvdduin
Messages: 3
Registered: May 2008
Location: Huizen
Junior Member
followup: pfile parameter log_archive_dest_2:
SQL> show parameter log_archive_dest_2

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2                   string      SERVICE=ZENOWM_standby


tnsnames on primary database server:
# tnsnames.ora Network Configuration File: D:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )

ZENOWM =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = hc-zen01)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = ZENOWM)
    )
  )

ZENOWM_standby =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = hc-fzen01)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ZENOWM)
    )
  )


Re: Standby database error: primary failed to connect to standby [message #323415 is a reply to message #321206] Wed, 28 May 2008 07:58 Go to previous messageGo to next message
tomvdduin
Messages: 3
Registered: May 2008
Location: Huizen
Junior Member
Anyone a sollution, I'm kinda stuck here...!
icon9.gif  Re: Standby database error: primary failed to connect to standby [message #361019 is a reply to message #323415] Mon, 24 November 2008 15:39 Go to previous messageGo to next message
grevesz
Messages: 5
Registered: November 2008
Junior Member
Hello,

Have you ever resolved this issue?

I am having the exact same problem, even though:
1. Password files are created for both DBs.
2. SYS passwords are the same for both DBs.
3. remote_login_password_file=exclusive for both DBs.

Any advice would be VERY highly appreciated!

Thanks,

Gabor
Re: Standby database error: primary failed to connect to standby [message #361220 is a reply to message #361019] Tue, 25 November 2008 07:13 Go to previous messageGo to next message
ualual
Messages: 22
Registered: May 2005
Junior Member

show your Pfile for both primary and standby
Re: Standby database error: primary failed to connect to standby [message #361225 is a reply to message #361220] Tue, 25 November 2008 07:41 Go to previous messageGo to next message
grevesz
Messages: 5
Registered: November 2008
Junior Member
Hello,

Thanks for the response.

Primary:

Quote:
#
# Copyright (c) 1999 RPM Technologies Corporation
#
# Oracle configuration file (INIT.ORA)
#

# Common database configuration parameters
# When making changes, plese ensure that they are also made in the other .ora files
#
control_files = ('/log1/oradata/bmconfig/control01.ctl',
'/log1/oradata/bmconfig/control02.ctl',
'/log1/oradata/bmconfig/control03.ctl')

background_dump_dest = /log1/orabase/admin/bmconfig/bdump
user_dump_dest = /log1/orabase/admin/bmconfig/udump
db_block_size = 8192

db_name = bmconfig
compatible = 10.2.0.3
undo_management = AUTO

# Database security - exclusive, shared or none
# Set remote_login_passwordfile = exclusive for use with
# Oracle Enterprise Manager
# Generate password file with utility orapwdnn
# where nn is the version number. Use the syntax
# orapwdnn file=$ORACLE_HOME\database\PWD<sid>.ORA password=<password> entries=25

#Uncommented when setting up Data Guard:
remote_login_passwordfile = exclusive

# Turn on these parameters to enable archive logging
# after database creation
#log_archive_start = true
#log_archive_dest = /log1/oraback/bmconfig
# Uncommented when setting up Data Guard:
log_archive_format=%t_%s_%r.arc
#log_archive_min_succeed_dest = 1

### CONNECTIONS ###

# Set number of processes to (number of concurrent Messages) + 10

processes = 200 # max # of O/S user processes that can simultaneously connect
#sessions = xx # Derived: (1.1 * PROCESSES) + 5
#transactions = xx # Derived: (1.1 * SESSIONS)

job_queue_processes = 2

transactions_per_rollback_segment = 5

# Please resize for production environment

pga_aggregate_target = 100M
workarea_size_policy = auto

open_cursors = 2000 # number of open cursors per user

### DATABASE CACHE (SGA) ###
# Please resize for production environment

#LOCK_SGA = true

dml_locks = 5000 # Default value is 4*transactions
db_files = 100 # Max number of data files.

#large_pool_size = 5M
java_pool_size = 0 # Java pool not currently used

sga_target = 300M
db_keep_cache_size = 10M
db_recycle_cache_size = 0

DB_CACHE_ADVICE = ready

#cursor_sharing = force # Force SQL statements to share cursors

### LOG FILES ###

log_checkpoint_interval = 0 # Checkpoint after every n O/S blocks.
log_checkpoint_timeout = 0 # Maximum time interval between checkpoints.
# Zero indicates no maximum.

log_buffer = 1048576 # Size of redo log buffer.

### RESOURCES ###

max_dump_file_size = 10000 # limit trace file size

disk_asynch_io = true # Has no effect if platform does not support asynchronous I/O
#dbwr_io_slaves = 3 # Set this if disk_asynch_io is set to false

### TRACE STATISTICS ###

timed_statistics = true # Enable timed statistics if needed

#sql_trace = true # Enable SQL Trace.

### MISCELLANEOUS ###

OPTIMIZER_FEATURES_ENABLE = 10.2.0.3

parallel_max_servers = 16 # parallel_max_servers = 4 x (number of CPUs)
parallel_threads_per_cpu = 1 # degree of parallelism

query_rewrite_enabled = TRUE # support for function indexes
query_rewrite_integrity = trusted

#db_domain = world
#instance_name=bmconfig
#service_names = bmconfig.world
#local_listener=lsnr9

# Changes made when setting up Data Guard:
db_unique_name=bmconfig
log_archive_config='DG_CONFIG=(bmconfig, test)'
log_archive_dest_1='LOCATION=/log1/oradata/bmconfig/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=bmconfig'
log_archive_dest_2='SERVICE=test LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=test'
log_archive_dest_state_1=ENABLE
log_archive_dest_state_2=ENABLE
fal_server=test
fal_client=bmconfig
db_file_name_convert='bmconfig','test'
log_file_name_convert='/log1/oradata/bmconfig/','/log1/oradata/test/'
standby_file_management=AUTO
log_archive_max_processes=4



Standby:

Quote:
#
# Copyright (c) 1999 RPM Technologies Corporation
#
# Oracle configuration file (INIT.ORA)
#

# Common database configuration parameters
# When making changes, plese ensure that they are also made in the other .ora files
#
control_files = ('/log1/oradata/test/control01.ctl',
'/log1/oradata/test/control02.ctl',
'/log1/oradata/test/control03.ctl')

background_dump_dest = /log1/orabase/admin/test/bdump
user_dump_dest = /log1/orabase/admin/test/udump
db_block_size = 8192

db_name = bmconfig
compatible = 10.2.0.3
undo_management = AUTO

# Database security - exclusive, shared or none
# Set remote_login_passwordfile = exclusive for use with
# Oracle Enterprise Manager
# Generate password file with utility orapwdnn
# where nn is the version number. Use the syntax
# orapwdnn file=$ORACLE_HOME\database\PWD<sid>.ORA password=<password> entries=25

#Uncommented when setting up Data Guard:
remote_login_passwordfile = exclusive

# Turn on these parameters to enable archive logging
# after database creation
#log_archive_start = true
#log_archive_dest = /log1/oraback/test
# Uncommented when setting up Data Guard:
log_archive_format=%t_%s_%r.arc
#log_archive_min_succeed_dest = 1

### CONNECTIONS ###

# Set number of processes to (number of concurrent Messages) + 10

processes = 200 # max # of O/S user processes that can simultaneously connect
#sessions = xx # Derived: (1.1 * PROCESSES) + 5
#transactions = xx # Derived: (1.1 * SESSIONS)

job_queue_processes = 2

transactions_per_rollback_segment = 5

# Please resize for production environment

pga_aggregate_target = 100M
workarea_size_policy = auto

open_cursors = 2000 # number of open cursors per user

### DATABASE CACHE (SGA) ###
# Please resize for production environment

#LOCK_SGA = true

dml_locks = 5000 # Default value is 4*transactions
db_files = 100 # Max number of data files.

#large_pool_size = 5M
java_pool_size = 0 # Java pool not currently used

sga_target = 300M
db_keep_cache_size = 10M
db_recycle_cache_size = 0

DB_CACHE_ADVICE = ready

#cursor_sharing = force # Force SQL statements to share cursors

### LOG FILES ###

log_checkpoint_interval = 0 # Checkpoint after every n O/S blocks.
log_checkpoint_timeout = 0 # Maximum time interval between checkpoints.
# Zero indicates no maximum.

log_buffer = 1048576 # Size of redo log buffer.

### RESOURCES ###

max_dump_file_size = 10000 # limit trace file size

disk_asynch_io = true # Has no effect if platform does not support asynchronous I/O
#dbwr_io_slaves = 3 # Set this if disk_asynch_io is set to false

### TRACE STATISTICS ###

timed_statistics = true # Enable timed statistics if needed

#sql_trace = true # Enable SQL Trace.

### MISCELLANEOUS ###

OPTIMIZER_FEATURES_ENABLE = 10.2.0.3

parallel_max_servers = 16 # parallel_max_servers = 4 x (number of CPUs)
parallel_threads_per_cpu = 1 # degree of parallelism

query_rewrite_enabled = TRUE # support for function indexes
query_rewrite_integrity = trusted

#db_domain = world
#instance_name=test
#service_names = test.world
#local_listener=lsnr9

# Changes made when setting up Data Guard:
db_unique_name=test
log_archive_config='DG_CONFIG=(bmconfig, test)'
log_archive_dest_1='LOCATION=/log1/oradata/test/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=test'
log_archive_dest_2='SERVICE=bmconfig LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=bmconfig'
log_archive_dest_state_1=ENABLE
log_archive_dest_state_2=ENABLE
log_archive_max_processes=4
fal_server=bmconfig
fal_client=test
db_file_name_convert='bmconfig','test'
log_file_name_convert='/log1/oradata/bmconfig/','/log1/oradata/test/'
standby_file_management=AUTO

Re: Standby database error: primary failed to connect to standby [message #361279 is a reply to message #361225] Tue, 25 November 2008 11:58 Go to previous messageGo to next message
babuknb
Messages: 1734
Registered: December 2005
Location: NJ
Senior Member

ORA-16191:	Primary log shipping client not logged on standby

Cause:	An attempt to ship redo to standby without logging on to 

standby or with invalid user credentials.

Action:	Check that primary and standby are using password files and that
both primary and standby have the same SYS password. 

Restart primary and/or standby after ensuring that password file is accessible
and REMOTE_LOGIN_PASSWORDFILE initialization parameter is set to SHARED or EXCLUSIVE. 
Re: Standby database error: primary failed to connect to standby [message #361281 is a reply to message #361279] Tue, 25 November 2008 12:06 Go to previous messageGo to next message
grevesz
Messages: 5
Registered: November 2008
Junior Member
gentlebabu wrote on Tue, 25 November 2008 12:58
ORA-16191:	Primary log shipping client not logged on standby

Cause:	An attempt to ship redo to standby without logging on to 

standby or with invalid user credentials.

Action:	Check that primary and standby are using password files and that
both primary and standby have the same SYS password. 

Restart primary and/or standby after ensuring that password file is accessible
and REMOTE_LOGIN_PASSWORDFILE initialization parameter is set to SHARED or EXCLUSIVE. 



Hello,

Thanks for trying to help.

However, if you read message #361019 again, you will see that all that has been done, yet the problem still exists.

Any help would be highly appreciated!!!!

Thanks,

Gabor
Re: Standby database error: primary failed to connect to standby [message #361315 is a reply to message #361281] Tue, 25 November 2008 22:26 Go to previous messageGo to next message
babuknb
Messages: 1734
Registered: December 2005
Location: NJ
Senior Member


Hello again,

Try to re/create password files from primary & standby database.

Babu
Re: Standby database error: primary failed to connect to standby [message #361316 is a reply to message #361315] Tue, 25 November 2008 22:31 Go to previous messageGo to next message
grevesz
Messages: 5
Registered: November 2008
Junior Member
I did it a few times... No success, same error.

Do you, by any chance, remember what solved it for you?

Thanks,

Gabor
Re: Standby database error: primary failed to connect to standby [message #361672 is a reply to message #361316] Thu, 27 November 2008 06:41 Go to previous messageGo to next message
babuknb
Messages: 1734
Registered: December 2005
Location: NJ
Senior Member


Okay,

Requesting to you. Pls create text based parameter file from spfile & post.

Babu
icon6.gif  Re: Standby database error: primary failed to connect to standby [message #361685 is a reply to message #361672] Thu, 27 November 2008 08:02 Go to previous message
grevesz
Messages: 5
Registered: November 2008
Junior Member
Razz

Hello,

Thanks for your efforts, but yesterday night I figured out the problem. It was a tiny but nasty thing.

I used a lower case SID name and Oracle, in some contexts, converted it to upper case. So I actually had two databases running without noticing it. The behavior was rather odd because some things (including startups, shutdowns and connections) would work sometimes but not other times depending on the letter case I used and whether one or two databases were up or down.

Sorry about this stupid mistake, but at least I learnt from it and hopefully others will too.

Thanks again for your help!

Gabor
Previous Topic: Physical Standby Creation
Next Topic: dba
Goto Forum:
  


Current Time: Thu Dec 08 04:31:15 CST 2016

Total time taken to generate the page: 0.06849 seconds