Why is the name of the database archive log empty?

Source: Internet
Author: User
SQLsetpages100lines120SQLSELECTDISTINCTDECODE (NAME, NULL, NULL, NAME) FROMV $ ARCHIVED_LOG; DECODE (NAME, NULL, NULL, NAME) implements NULLSQLSHOWPARAMETERLOG_ARCHIVE_DEST_1N

SQL set pages 100 lines 120 SQL SELECT DISTINCT DECODE (NAME, NULL, 'null', NAME) FROM V $ ARCHIVED_LOG; DECODE (NAME, NULL, 'null', NAME) ---------------------------------------------------------------- null SQL SHOW PARAMETER LOG_ARCHIVE_DEST_1 N


SQL> set pages 100 lines 120
SQL> SELECT DISTINCT DECODE (NAME, NULL, 'null', NAME) FROM V $ ARCHIVED_LOG;

DECODE (NAME, NULL, 'null', NAME)
--------------------------------------------------------------
NULL

SQL> SHOW PARAMETER LOG_ARCHIVE_DEST_1

NAME TYPE VALUE
-----------------------------------------------------------------------------
Log_archive_dest_1 string LOCATION =/data1/archivelog
Log_archive_dest_10 string


Change the archive directory of the database to ASM, and the name of the new archive log will be displayed immediately:

SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_1 = 'location = + DISK/testrac/'SCOPE = MEMORY SID = 'testrac1 ';


The system has been changed.

SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_1 = 'location = + DISK/testrac/'SCOPE = MEMORY SID = 'testrac2 ';

The system has been changed.

SQL> ALTER SYSTEM ARCHIVE LOG CURRENT;

The system has been changed.

SQL> SELECT NAME, COUNT (*) FROM V $ ARCHIVED_LOG GROUP BY NAME;

Name count (*)
----------------------------------------------------------------------
250
+ DISK/testrac/2_208_618591128.dbf 1
+ DISK/testrac/1_292_618591128.dbf 1

Close the database to invalidate the modification of the archive parameter. Restore the archive path to the local device and query again:

SQL> SELECT NAME, COUNT (*) FROM V $ ARCHIVED_LOG GROUP BY NAME;

Name count (*)
----------------------------------------------------------------------
250
/Data1/archivelog/2_209_618591128.dbf 1
/Data1/archivelog/415293_618591128.dbf 1
+ DISK/testrac/2_208_618591128.dbf 1
+ DISK/testrac/1_292_618591128.dbf 1

Currently, you can still see all the archived log names. Next, try to use rman to delete all the archived logs.

SQL> SELECT NAME, COUNT (*) FROM V $ ARCHIVED_LOG GROUP BY NAME;

Name count (*)
----------------------------------------------------------------------
256

After being deleted using rman, the archived log name becomes null again.

This problem is not found in metalink, and I suspect it is related to ASM.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.