RE: How to find out when a redo log file was added
Date: Wed, 7 Oct 2020 21:00:43 -0700
Message-ID: <35f801d69d27$98e99aa0$cabccfe0$_at_comcast.net>
Based on which vendor’s NAS Head you are running, they normally have other utilities built in that your admin could tell you the create timestamp on the file in question.
From: oracle-l-bounce_at_freelists.org <oracle-l-bounce_at_freelists.org> On Behalf Of dimensional.dba_at_comcast.net Sent: Wednesday, October 7, 2020 8:53 PM To: Amir.Hameed_at_xerox.com; oraclebeanz_at_gmail.com; gogala.mladen_at_gmail.com; oracle-l_at_freelists.org Subject: RE: How to find out when a redo log file was added
No it doesn’t work across NFS as it interfaces with the device tree.
So yes you would need to have it done within the Data Mover/NAS Head.
There is a way to mount the NFS mount and use the debgugfs file system instead of the debugfs utility using NFS Fault injection, but I assume you don’t want to take your system down to get the answer.
From: oracle-l-bounce_at_freelists.org <mailto:oracle-l-bounce_at_freelists.org> <oracle-l-bounce_at_freelists.org <mailto:oracle-l-bounce_at_freelists.org> > On Behalf Of Hameed, Amir Sent: Wednesday, October 7, 2020 5:56 PM To: dimensional.dba_at_comcast.net <mailto:dimensional.dba_at_comcast.net> ; oraclebeanz_at_gmail.com <mailto:oraclebeanz_at_gmail.com> ; gogala.mladen_at_gmail.com <mailto:gogala.mladen_at_gmail.com> ; oracle-l_at_freelists.org <mailto:oracle-l_at_freelists.org> Subject: RE: How to find out when a redo log file was added
Thank you! This worked fine on the FC SAN storage.
For NAS based file system (I am using dNFS), I am assuming that this process needs to be executed from the Data Mover or NAS Head?
Thanks
From: dimensional.dba_at_comcast.net <mailto:dimensional.dba_at_comcast.net> <dimensional.dba_at_comcast.net <mailto:dimensional.dba_at_comcast.net> > Sent: Wednesday, October 7, 2020 8:41 PM To: oraclebeanz_at_gmail.com <mailto:oraclebeanz_at_gmail.com> ; gogala.mladen_at_gmail.com <mailto:gogala.mladen_at_gmail.com> ; Hameed, Amir <Amir.Hameed_at_xerox.com <mailto:Amir.Hameed_at_xerox.com> >; oracle-l_at_freelists.org <mailto:oracle-l_at_freelists.org> Subject: RE: How to find out when a redo log file was added
CAUTION: This email originated from outside the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Luckily you are on a linux file system so you can actually get to the create time of a file assuming that you haven’t copied a previously created file the file into the file system.
- Determine file system your file is in
cd <to directory file is in>
df -k .
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VGExaDb-LVDbSys1 159848108 32319128 120676016 22% /
2. Determine the inode of the file you wish to know the creation time on
ls -li dbca_19c_BISAND.rsp
263495 -rw-r----- 1 oracle oinstall 26502 Aug 26 15:49 dbca_19c_BISAND.rsp
3. Determine the date information about the file (requires root as the operation is happing against the file system)
sudo debugfs -R 'stat <263495>' /dev/mapper/VGExaDb-LVDbSys1
debugfs 1.42.9 (28-Dec-2013)
Inode: 263495 Type: regular Mode: 0640 Flags: 0x80000
Generation: 2694759459 Version: 0x00000000:00000001
User: 1001 Group: 1001 Size: 26502
File ACL: 0 Directory ACL: 0
Links: 1 Blockcount: 56
Fragment: Address: 0 Number: 0 Size: 0
ctime: 0x5f46e70e:c70d3af8 -- Wed Aug 26 15:49:50 2020
atime: 0x5f46e70e:b938dc04 -- Wed Aug 26 15:49:50 2020
mtime: 0x5f46e70e:c70d3af8 -- Wed Aug 26 15:49:50 2020
crtime: 0x5f46e70e:b938dc04 -- Wed Aug 26 15:49:50 2020 <==Creation time of the file
Size of extra inode fields: 32
EXTENTS: (0-6):1081392-1081398
That creation time is not served up in any of the other commands (ls/stat)
Sometimes if you had not made any changes to the file after creation including changing any permissions or increasing the size of the file, copying the file into the fs then the ls -lu command would actually be the creation time of the file, but in most cases something has changed at some point and that time would then represent the time of the change.
From: oracle-l-bounce_at_freelists.org <mailto:oracle-l-bounce_at_freelists.org> <oracle-l-bounce_at_freelists.org <mailto:oracle-l-bounce_at_freelists.org> > On Behalf Of Moovarkku Mudhalvan Sent: Wednesday, October 7, 2020 5:03 PM To: gogala.mladen_at_gmail.com <mailto:gogala.mladen_at_gmail.com> ; Amir.Hameed_at_xerox.com <mailto:Amir.Hameed_at_xerox.com> ; oracle-l_at_freelists.org <mailto:oracle-l_at_freelists.org> Subject: RE: How to find out when a redo log file was added
I don’t think you can see from Linux file system as this file get updated to the latest timestamp
Best option should be check the alert log when the log file was created
Thanks & Regards
M.M. Mudhalvan OCP,OCI
Tokyo, Japan
+81-080-1320-3803
www.bestremotedba.com <http://www.bestremotedba.com>
https://www.linkedin.com/in/mudhalvan/
From: Mladen Gogala <mailto:gogala.mladen_at_gmail.com>
Sent: Thursday, October 8, 2020 8:58 AM
To: Amir.Hameed_at_xerox.com <mailto:Amir.Hameed_at_xerox.com> ; oracle-l_at_freelists.org <mailto:oracle-l_at_freelists.org>
Subject: Re: How to find out when a redo log file was added
If you are on Linux, ls -l should tell you when the file was created.
Regaards
On Wed, 2020-10-07 at 21:49 +0000, Hameed, Amir wrote:
Hi,
Is there a way to find out when redo log files were added to a database?
Thanks,
Amir
--
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
Virus-free. <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> www.avg.com
-- http://www.freelists.org/webpage/oracle-lReceived on Thu Oct 08 2020 - 06:00:43 CEST