How to query Oracle log files

Source: Internet
Author: User
Tags oracle rownum

Oracle log files are familiar to Oracle database users. The following describes how to query Oracle log files for your reference.

1. query the list of log files used:
Select * from v $ log;

2. query the log files of the Group in use:
Select * from v $ logfile;

3. Force log switching:
Alter system switch logfile;

4. query historical logs:
Select * from v $ log_history;

5. Log archiving mode:
Select dbid, name, created, log_mode from v $ database;

6. query the archived log information:
Select recid, stamp, thread #, sequence #, name from v $ archived_log;

7. add and delete a log file group
Alter database add logfile group 1 ('/home1/oracle/oradata/ora8i/log1a. log'), '/home2/oracle/oradata/ora8i/log1b. log') size 100 M;

Alter database drop logfile group 1;

8. add and delete log members
Alter database add logfile member '/home1/oracle/oradata/ora8i/log1a. log 'to group 1,'/home1/oracle/oradata/ora8i/log2a. log' to group 2;

Alter database drop logfile member '/home1/oracle/oradata/ora8i/log1a. log ';

9. Move log files
Alter database rename file '/home1/oracle/oradata/ora8i/log1a. log' to'/home2/oracle/oradata/ora8i/log1a. log ';
Before executing this command, make sure that the log file has been physically moved to the new directory.

10. Clear log files
Alter database clear logfile '/home1/oracle/oradata/ora8i/log1a. log ';
This command is used when you cannot use the delete group or group member command to delete logs.


 

Oracle index Optimization Design

Implementation of parallel query of one column in oracle

Use of oracle rownum statements

Introduction to Oracle index rules

Step 5: Create an oracle full-text index

Related Article

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.