Most probable reason
for this error appearing in the alert log file of standby database is that
primary database is not able to connect to the standby database to ship redo
log data because the password for the SYS user in the standby database is not in sync
with the primary database. Standby database is also not able to fetch the
archive gap because of same discrepancy. Full error stack in the alert log file
would look similar to the following.
Media Recovery Log /fra/mydb/archive/MYDB0001_0000010397_0893868278.ARC
Media Recovery Waiting for thread 1 sequence 10398
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
————————————————————
FAL[client, USER]: Error 16191 connecting to MY_DB_HOST for fetching gap
sequence
As a standard
procedure, whenever you change SYS password in the standby database, you should
always copy password file from primary database to the standby database(s). In case of RAC, copy password file to all standby RAC nodes. Since password for SYS user (and other SYSDBAs) are stored in the password
file, changing password in primary would not replicate password change to the standby database
along with other changes made within the database and therefore password file needs
to be copied manually.
To solve this problem
(and also to avoid in future), always remember to copy the passwordfile from
primary database to the standby database after you perform a password change
activity for SYS user in the primary database.
Popular Posts — All Times
-
This error means that you are trying to perform some operation in the database which requires encryption wallet to be open, but wallet is …
-
Finding space usage of tablespaces and database is what many DBAs want to find. In this article I will explain how to find out space usage …
-
ORA-01653: unable to extend table <SCHEMA_NAME>.<SEGMENT_NAME> by 8192 in tablespace <TABLESPACE_NAME> This error is q…
-
You may also want to see this article about the ORA-12899 which is returned if a value larger than column’s width is inserted in the col…
-
This document explains how to start and stop an Oracle cluster. To start and stop Grid Infrastructure services for a standalone insta…
-
If you want to know how we upgrade an 11g database to 12c using DBUA, click here . For upgrading 12.1.0.1 to 12.1.0.2 using DBUA, …
-
If database server CPU usage is showing 100%, or high 90%, DBA needs to find out which session is hogging the CPU(s) and take appropriate …
-
By default AWR snapshot interval is set to 60 minutes and retention of snapshots is set to 8 days. For better and precise investigation of…
-
SWAP space recommendation from Oracle corp. for Oracle 11g Release 2 If RAM is between 1 GB and 2 GB, SAWP should be 1.5 times the s…
-
This article explains how to install a 2 nodes Oracle 12cR1 Real Application Cluster (RAC) on Oracle Linux 7. I did this installation on O…
December 29, 2020
I got ” Error 1017 received logging on to the standby | ORA-16191 ” error in Production for Oracle Dataguard.
Error 1017 received logging on to the standby | ORA-16191
Details of error are as follows in the Alertlog of Production database.
TT00 (PID:127051): Error 1017 received logging on to the standby TT00 (PID:127051): ------------------------------------------------------------------------- TT00 (PID:127051): Check that the source and target databases are using a password file TT00 (PID:127051): and remote_login_passwordfile is set to SHARED or EXCLUSIVE, TT00 (PID:127051): and that the SYS password is same in the password files, TT00 (PID:127051): returning error ORA-16191 TT00 (PID:127051): ------------------------------------------------------------------------- 2020-12-29T14:43:35.470587+03:00
ORA-16191
This error is related with the missing of password file on both production and standby side. Sometimes password files may be corrupted or removed accidentally.
To solve this problem, perform the following steps.
1. Stop media recovery at standby side
2. Recreate password file with ignorecase=Y option (both in primary and standby sites with same password)
orapwd file=orapwtestdb password=sys entries=100 ignorecase=Y —> change password file name accordingly
3. Initiate media recovery at standby side
4. Monitor alert log and make sure archive logs are applying fine at standby side.
If the password file is missing, then create it as follows.
orapwd file=orapwd$ORACLE_SID password=welcome1 entries=5 FORCE=Y
Then copy this password file to Standby. If your database is Oracle RAC, then copy this file to all node.
Mostly DBAs are changing the sys password of Production database but they forget to copy it to Dataguard database.
To solve this error, check your sys password and password file.
You can check and test the Production and Standby Side connections as follows.
Primary Side:
run sqlplus as follows.
sqlplus /nolog
Then run the following code, type your sys password and TNS Alias correctly.
connect sys/[email protected]_ALIAS as sysdba Connected. SQL> connect sys/[email protected]_ALIAS as sysdba Connected.
Standby Side:
run sqlplus as follows.
sqlplus /nolog
Then run the following code, type your sys password and TNS Alias correctly.
connect sys/[email protected]_ALIAS as sysdba Connected. SQL> connect sys/[email protected]_ALIAS as sysdba Connected.
If the above connection test is not worked fine, then fix your password file or create it again.
Or you can copy it from the correct Primary Node to Other Primary nodes and Standby Side.
Sometimes if there is no free spaces for archives on Primary and Standby side, you may get this error. So you should check for free spaces.
If there is no problem with the above options, then check your log_archive_dest_state_X parameter, this parameter may be defer.
If they are not enable , then you can enable it as follows.
alter system set log_archive_dest_state_X=enable scope=both sid=’*’
Do you want to learn Oracle dataguard, then read the following articles.
Oracle DataGuard Physical Standby Installation Step by Step Using RMAN -1
3,242 views last month, 1 views today
About Mehmet Salih Deveci
I am Founder of SysDBASoft IT and IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience.I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource.I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks.I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients.If you need Oracle DBA, SQL Server DBA, APPS DBA, Exadata, Goldengate, EBS Consultancy and Training you can send my email adress [email protected].- -Oracle DBA, SQL Server DBA, APPS DBA, Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için [email protected] a mail atabilirsiniz.
|
|
I have got frequently the error «Error 1017 received logging on to the standby», while trying to enable the archivelog transfer between primary and standby.
The majority of tips on the net and the entry in the alert.log would tell You:
— check Your remote_login_passwordfile — should be SHARED or EXCLUSIVE
— check Your password file — it should exist and a password for SYS should be the same.
I have done as suggested, still no progress.
The solution was actually trivial — just copy the password file from the primary to the standby. Not sure why previously it did not work — I am sure the SYS password was the same and I checked connection in both directions (i.e. PRIMARY->STANDBY, STANDBY->PRIMARY) using the same entries in tnsnames.ora as specified in the archivelog transfer configuration.
It seems, there is a huge difference between versions 10g and 11g in this case — previously it was enough to create new password file with the same password. Now it must be the same file (ie. copy from the original on the primary).
And here is a very good article on the password files in Data Guard environment.
Hi Guys,
Here is an Interesting case and I was stuck with the problem since last 2 days and a half. In fact I was almost done with everything to resolve the mentioned problem but I could not able to solve almost.
Then I left it as I became exhausted, But I kept on thinking Where could be the problem, at last I got it.
Here was my case:
———————
I have 2 node rac as primary and a standby was intended to create on single node.
I changed parameter file, created passwords, tns entries accordingly. Then I did duplicate target and restored database as standby. After doing everything I saw, RAC node1 was able to send archive logs to dest_2 which is my standby but unfortunately node2 was unable to enter into standy database.
Here are
Problem Statement:
—————————-
Standby was receiving node1’s log files but node2 was unable to send logfiles due to the below error
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.
Steps for diagnosing
—————————-
step-1
when I checked query on node 2
sql>select DEST_ID,DEST_NAME,STATUS,BINDING,ERROR from v$ARCHIVE_DEST where status<>’INACTIVE’;
all log file location were valid
Sql> SELECT DESTINATION, STATUS, ERROR FROM V$ARCHIVE_DEST WHERE DEST_ID=2;
dest2 for archive log dest is valid
sql> select error_code,message from v$dataguard_status;
Error 1034 received logging on to the standby
PING[ARC2]: Heartbeat failed to connect to standby ‘STBYDB’. Error is 1034.
Then I have done the below steps to resolve the problem
1.) alter system set log_archive_dest_state_2=defer scope=both sid=’*’;
(on primary RAC any node )
Sql>recover managed standby database cancel; (on standby side)
2) alter database set SEC_CASE_SENSITIVE_LOGON=FALSE scope=both sid=’*’;
(on RAC side)
3) shutdown the standby database infact if possible primary also
then remove password files for all primary rac nodes and standby nodes and then created the password file on their respective server
orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=system entries=5 force=y ignorecase=Y
Then start the primary db (rac nodes by srvctl start database -d primaryDB )
4) alter system set LOG_ARCHIVE_DEST_2=’SERVICE=STBYKOL ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=STBYDB’ scope=both sid=’*’;
(on any primary rac node and standby db)
5) alter system set log_archive_dest_state_2=enable scope=both sid=’*’; (on any primary RAC node)
6) recover standby database using current logfile disconnect; (on standby database)
After doing this I observed the alert log and it worked
To check the database syncing
on both side check the command
sql>select current_scn from v$database;
The value of primary and standby would be almost same
Hope It will help you guys
If any query don’t forget to mail me at viewssharings.blogspot.in@gmail.com
If you are working in a standby environment this is a quite common error that you will see in the alert log. There are various situations when you will see this error.Although you have a latest copy of password file copied in both PRIMARY and STANDBY DB, there is a chance that you will see this error. This is a generic error that comes to oracles’s mind and warns you about it.
Fetching gap sequence in thread 1, gap sequence 44212-44255
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
————————————————————
FAL[client, USER]: Error 16191 connecting to ORCL for fetching gap sequence
Archived Log entry 5 added for thread 1 sequence 44257 rlc 839361298 ID 0xa5d555eb dest 2:
Tue Jan 19 12:03:39 2013
Archived Log entry 6 added for thread 1 sequence 44260 rlc 839361298 ID 0xa5d555eb dest 2:
Tue Jan 19 12:03:41 2013
Archived Log entry 7 added for thread 1 sequence 44259 rlc 839361298 ID 0xa5d555eb dest 2:
Tue Jan 19 12:03:42 2013
RFS[5]: Opened log for thread 1 sequence 44261 dbid -1517523940 branch 839361298
Tue Jan 19 12:03:43 2013
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
SOLUTION :
1. Copy the latest copy of PASSWORD file from PRIMARY instance to STANDBY instance and replace it with the old one.
Usually password file is in format of ORAPWDINSTANCENAME
example : ORAPWDORCL (where ORCL is my instance name).
2. Check if the PASSWORD FILE is set to either EXCLUSIVE mode or SHARED.
3. Test if you can connect to both PRIM and STANDBY as SYSDBA using password.
Note :
IF you don’t know the password for SYS, you can recreate password file using this link.
Ошибки ORA-7445 при работе DATA GUARD после обновления на БД 12C
Началось все с того, что БД-источник отказывалась отправлять логи на стендбай.
Алерт лог выдавал:
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
————————————————————
При этом файл паролей корректный (скопирован с источника).
Посмотрев алерт на стендбае, увидел:
Physical standby fails to sync with the primary, because of the Error:
ORA-7445: exception encountered: core dump [PC:0x2223829] [ACCESS_VIOLATION]
[ADDR:0x7FFFFFFF8] [PC:0x2223829] [UNABLE_TO_READ] []
Обе проблемы оказались следствиями одного и того же бага: BUG:17535265
Проблема: В группу ОС ORA_OPER (была создана установщиком 12С) не был назначен ни один пользователь
Решение: Добавить пользователя в группу ORA_OPER
После добавления пользователя ошибки ORA-7445 пропали и стендбай заработал как положено.
Популярные сообщения из этого блога
Установка pgAgent Последняя версия скрипта для установки агента тут . Перенести инструкцию по агенту в отдельную тему. 1. Создать пользователя ОС, и сделать ему домашний каталог: useradd -s /bin/false -r -M pgagent mkdir /home/pgagent 2. Установить и настроить демон: yum install pgagent_94 При наличии ошибок вида (была на Oracle Linux 6.8) Error: Package: pgagent_94-3.4.0-1.rhel6.x86_64 (pgdg94) Requires: libwx_baseu-2.8.so.0(WXU_2.8)(64bit) Нужно установить EPEL systemctl enable pgagent_94 chown pgagent:pgagent /var/log/pgagent_94.log 3. Установить схему агента в базе: sudo -u postgres psql -f /usr/share/pgagent_94-3.4.0/pgagent.sql postgres 4. Создать файл паролей для подключения агента к базе. vi /home/pgagent/.pgpass localhost:5432:*:postgres:postgres chown pgagent.pgagent /home/pgagent -R chmod 600 /home/pagent/.pgpass 5. Запустить и проверить работу агента systemctl start pgagent_94.service systemctl status pga
1. После создания экземпляра правим /etc/oratab, а именно устанавливаем флажок рестарта в ‘Y’. vim /etc/oratab AXDB:/app/oracle/product/12.1.0/dbhome_1:Y 2. Теперь из под root’a создаем файл /etc/init.d/dbora вот с таким содержимым. #!/bin/sh # chkconfig: 345 99 10 # description: Oracle auto start-stop script. # # Set ORA_HOME to be equivalent to the $ORACLE_HOME # from which you wish to execute dbstart and dbshut; # # Set ORA_OWNER to the user id of the owner of the # Oracle database in ORA_HOME. ORA_HOME= /app/oracle/product/12.1.0/dbhome_1 ORA_OWNER=oracle if [ ! -f $ORA_HOME/bin/dbstart ] then echo «Oracle startup: cannot start» exit fi case «$1» in ‘start’) # Start the Oracle databases: # The following command assumes that the oracle login # will not prompt the user for any values # Remove «&» if you don’t want startup as a background process.
Для настройки окружения в Linux можно все параметры базы указать в .bash_profile: ORACLE_HOME=/app/oracle/product/11.2.0.4/dbhome_1 export ORACLE_HOME ORACLE_BASE=/app/oracle export ORACLE_BASE ORACLE_SID=orcl export ORACLE_SID PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin export PATH Но лучше использовать для этих целей утилиту oraenv. oraenv берет данные из файла /etc/oratab orcl:/app/oracle/product/12.1.0/dbhome_1:N И на ее основе задает параметры окружения: ORACLE_SID, ORACLE_BASE,ORACLE_HOME и PATH Использовать можно в интерактивном режиме: . oraenv ORACLE_SID = [orcl] ? orcl The Oracle base has been set to /app/oracle И в неинтерактивном режиме. Добавить в .bash_profile: ORACLE_SID=orcl ORAENV_ASK=NO . oraenv Для ASM ситуация аналогичная. . oraenv ORACLE_SID = [orcl] ? +ASM1 The Oracle base has been set to /u01/app/oracle echo $ORACLE_HOME /app/11.2.0/grid
~ Troubleshoot ORA-16191: ORA-17629 with case studies in Active Dataguard ( Oracle 11g)
~ Troubleshoot : when standby server is out of synch
~ Troubleshoot : when archivelogs are not applying in standby side
Case:1: ORA-16191
Error 1017 received logging on to the standby ( message fro alert log)
< ————————————————————
< 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
< ————————————————————
< PING[ARC2]: Heartbeat failed to connect to standby ‘STANDBY’. Error is 16191.
< Sat Jul 06 15:23:28 2013
< Error 1017 received logging on to the standby
If above error found from alert log in DR side, i.e., some body changed Primary sys password.
Solution: Recreate password file both Primary and DR side with same password and re-synch again.
Now do the following: e.g.,
SQL> alter database recover managed standby database cancel;
SQL> shut immediate;
SQL> startup nomount;
SQL> alter database mount standby database;
SQL> alter database recover managed standby database using current logfile disconnect;
Case:2: : ORA-17627: ORA-01017
channel ORA_DISK_1: SID=33 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 06/27/2012 15:05:53
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 06/27/2012 15:05:53
ORA-17629: Cannot connect to the remote database server
ORA-17627: ORA-01017: invalid username/password; logon denied
ORA-17629: Cannot connect to the remote database server
Solution:
RMAN> duplicate target database for standby from active database nofilenamecheck;
This may not work. do the following
RMAN> run {
allocate channel ch1 type disk;
allocate auxiliary channel stby1 type disk;
duplicate target database for standby from active database nofilenamecheck;
}
Case-3 : ORA-16191
Thu Nov 14 10:52:35 2013
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
Solution:
1) In primary side:
Ship missed archive logs:
pass the password file again to standby side and rename it with standy database name in standby side.
2) In standby side:
e.g.,
SQL> alter database recover managed standby database cancel;
SQL> alter database recover managed standby database disconnect from session;
RMAN> catalog start with ‘/oracle/PRIMARY/flash_recovery_area/archivelogs’;
Now check, sure archive logs will apply
Now you will find following type alerts in alert log file.
Thu Nov 14 12:17:07 2013
Media Recovery Log /oracle/PRIMARY/flash_recovery_area/archivelogs/1_7945_804801209.dbf
Thu Nov 14 12:17:34 2013
Media Recovery Waiting for thread 1 sequence 7946
Now do the following:
SQL> alter database recover managed standby database cancel;
SQL> shut immediate;
SQL> startup nomount;
SQL> alter database mount standby database;
SQL> alter database recover managed standby database using current logfile disconnect;
Now sure it will start shipping
SQL> select max(sequence#) from v$archived_log where applied=’YES’;
MAX(SEQUENCE#)
—————
7951
Hope this document will help you.
Post your comments.