Platform: Oracle 9i + Windows 2003
Fault performance:
ORA-12154: TNS: cocould not resolve service name
Data guard has been operating normally before. This error was reported suddenly. Archiving cannot be completed, but the tnsping Sid is used. No problem, and no problem with the listener. Because TNS cannot be parsed, archive logs of the master database cannot be transferred to the slave database. Archiving cannot be completed.
Try the following solution:
SQL> alter system set log_archive_dest_2 = '';
System changed
SQL> alter system set log_archive_dest_3 = 'service = orcl_2 ';
System changed
SQL> alter system set log_archive_dest_3 = '';
System changed
SQL> alter system set log_archive_dest_2 = 'service = orcl_2 ';
System changed
Query Information about an archive directory
Select dest_name, status, type, database_mode, recovery_mode, destination,
Archived_seq #, applied_thread #, applied_seq #, error from V $ archive_dest_status
Where dest_name in ('Log _ archive_dest_1 ', 'Log _ archive_dest_2 ');
Or use
Select dest_id, status from V $ archive_dest;
Switch archive files:
Alter system switch logfile;
The query is valid within a few minutes after modification, and a ORA-12154: TNS: cocould not resolve service name error will be reported later.
View archiving information:
Select name, sequence #, applied from V $ archived_log;
Slave database restarts archive files
Alter database recover managed standby database cancel;
Alter database recover managed standby database disconnect from session;
Solution:
In the end, it was really impatient. I restarted the server and got it done. It seems that Oracle running on Windows is still a problem. This is not the bug of Oracle 9i, but the compatibility problem between Oracle and Windows 2003.