The script was Sasha, and I got it out last year when I solved a php ... Strong!Simple and practical.The TRC file caught is placed in the TRC directory.If there is an exception to the process or output, you can analyze it in detail:#!/bin/bashmkdir TRCRM -RF TRC/*. trcadditional_strace_args= "$" master_pid=$ (PS auwx | grep php-fpm | grep-v grep | grep ' master
HEIGHT------------------------------ ----------BTREE_TT 3
Get the object number of btree_tt and dump the index structure.
sys@ORCL> select object_id from dba_objects where owner='SYS' and object_name='BTREE_TT'; OBJECT_ID---------- 52614sys@ORCL> oradebug setmypidStatement processed.sys@ORCL> alter session set events 'immediate trace name treedump level 52614';Session altered.sys@ORCL> oradebug tracefile_name/u01/app/oracle/admin
Environment:
SQL> select * from v$version where rownum=1;BANNER----------------------------------------------------------------Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - ProdSQL> !uname -aLinux localhost.localdomain 2.6.18-308.el5xen #1 SMP Fri Jan 27 17:59:00 EST 2012 i686 i686 i386 GNU/Linux(I) physical structure of data block
(Ii) a dump process on the block
hr@ORCL> create table think(a varchar2(10));Table created.hr@ORCL> insert into think values('a');1 row created.hr@ORCL>
The ORA-00354 caused by a read-only rhel5.8 File System: upt redo log block header,
An rhel5.8 file system read-only caused by ORA-00354: upt redo log block header
Wed Jun 03 03:31:24 CST 2015 Thread 1 advanced to log sequence 396 (LGWR switch) Current log #3 seq #396 mem #0: /u01/app/oracle/oradata/orcl/redo03.logWed Jun 03 19:05:48 CST 2015 Thread 1 advanced to log sequence 397 (LGWR switch) -----------------> you can see from this point: sequence 397 is the current redo log Current log #1 seq
Test environment:
OS: RedHat 5.5
DB: Oracle11g
Logminer is integrated with oracle as a related log analysis tool. We can use this tool to clearly analyze the changes of all things in related logs and archive logs, in addition, you can accurately determine the specific time and SCN values of various DML and DDL operations.With logminer, we can implement:
1. determine the time of Logical Data corruption
2. Tracks user-performed transaction change operations
3. Track table DML operations
If you wan
command is handy when you want to search for multiple files and open them for editing.It also has several options. The most useful may be the-p option, which makes the operation interoperable:$ file * | grep ASCII | Cut-d ":"-F1 | Xargs-p VIVI Alert_dba102.log DBA102_CJQ0_14493.TRCDBA102_MMNL_14497.TRCDBA102_RECO_14491.TRC DBA102_RVWR_14518.TRC?...The xarg here requires you to confirm before running each c
session SET Sql_trace =false;
So how do you view the relevant information at this time? No matter what you don't see in Sql*plus or Pl/sql developer tools, you can query trace log information from the following script
Copy Code code as follows:
SELECT T.value | | '/' || LOWER (RTRIM (i.instance, CHR (0)) | | ' _ora_ ' | |
P.spid | | '. TRC ' Trace_file_name
From
(SELECT p.spid
From V$mystat M, V$session S, v$process P
PL/SQL DEVELOPER, you can use the following script to query the trace log information.
Copy codeThe Code is as follows:
Select t. VALUE | '/' | LOWER (RTRIM (I. INSTANCE, CHR (0) | '_ ora _' |
P. SPID | '. trc' TRACE_FILE_NAME
FROM
(Select p. SPID
From v $ mystat m, V $ session s, V $ PROCESS P
Where m. STATISTIC # = 1
And s. SID = M. SID
And p. ADDR = S. PADDR
) P,
(Select t. INSTANCE
From v $ thread t, V $ PARAMETER V
Where v. NAME = 'thread'
AND
$ session where username is not null;
Then, you can trace the selected session ID and serial port SQL statements, as shown in the following command.
EXECUTE sys. dbms_system.set_ SQL _trace_in_session (10,264 2, TRUE );
After tracing SQL statements, we can perform operations on the client, and the SQL statements used in these operations will be recorded until we end SQL statement tracing.
After the client completes the operation, use the following command to end SQL statement tracing.
EXECUTE s
until we end SQL statement tracing.
After the client completes the operation, use the following command to end SQL statement tracing.
EXECUTE sys. dbms_system.set_ SQL _trace_in_session (10,264 2, FALSE );
After the synchronization ends, an latest file is generated in the Oracle server folder. for files with the trc suffix, we can use the Search Everything tool to find the most recently produced files. trc
One rhel5.8 file system read-only caused by ORA-00354: corruptredologblockheader
An rhel5.8 file system read-only caused by ORA-00354: upt redo log block header
Wed Jun 03 03:31:24 CST 2015 Thread 1 advanced to log sequence 396 (LGWR switch) Current log #3 seq #396 mem #0: /u01/app/oracle/oradata/orcl/redo03.logWed Jun 03 19:05:48 CST 2015 Thread 1 advanced to log sequence 397 (LGWR switch) -----------------> you can see from this point: sequence 397 is the current redo log Current log #1 seq #3
them for editing.It also has several options. The most useful may be the-p option, which makes the operation interoperable:$ file * | grep ASCII | Cut-d ":"-F1 | Xargs-p VIVI Alert_dba102.log DBA102_CJQ0_14493.TRCDBA102_MMNL_14497.TRCDBA102_RECO_14491.TRC DBA102_RVWR_14518.TRC?...The xarg here requires you to confirm before running each command. If you press "Y", the command is executed. You will find this
the master database, create a tablespace in the master database, and check whether the tablespace is created in the alert log of the slave database.
Master database:
SYS @ ORCL> create tablespace test
2 datafile '/u01/app/oracle/oradata/ORCL/test01.dbf' size 5 m;
Tablespace created.
SYS @ ORCL> alter system archive log current;
System altered.
SYS @ ORCL>
View alert logs in the slave Database
[Oracle @ edbjr2p2 ~] $ Cd $ ORACLE_HOME/dbs
[Oracle @ edbjr2p2 dbs] $ ls
InitAUX1.ora initdw. ora init
Starting from oracle11.2.0.2.0, the snapshot file of the control file must be accessible to data instances of all nodes and placed in a shared location. Otherwise, run RMAN.
Starting from oracle 11.2.0.2.0, the snapshot file of the control file must be accessible to data instances of all nodes and placed in a shared location. Otherwise, run RMAN.
Today, we can see the following problems in the daily response of data centers A and B:
Renewal point 1 day:
Tue Jul 31 03:02:50 2012
Errors in fi
/sfc3db2_ora_2756730.trc:ORA-00600: internal error code, arguments: [15764], [], [], [], [], [], [], []
I asked my friend if there were any other errors, and they said they were the only ones.
Some Trace information is as follows:
/Apps/oracle/admin/sfc3db/udump/sfc3db2_ora_5054706.trc: CILS aborted: 0, num est exec limit hit: 0/Apps/oracle/admin/sfc3db/udump/sfc3db2_ora_5054706.trc: name = update seq $ set
Today, we can see the following problems in the daily response of data centers A and B:
Renewal point 1 day:
Tue Jul 31 03:02:50 2012
Errors in file/soft/Oracle/diag/rdbms/a1qzdb/a1qzdb1/trace/a1qzdb1_ora_5374100.trc:
ORA-00245: control file backup operation failed
Tue Jul 31 09:08:37 2012
Thread 1 advanced to log sequence 346 (LGWRswitch)
Current log #1 seq #346 mem #0: + DATA/a1qzdb/onlinelog/group_1.259.786961989
Tue Jul 31 09:08:37 2012
LNS: Stan
->/s01/rac10g/admin/PROD/bdump/alert_prod.Lrwx ------ 1 maclean oinstall 64 Jul 26 16: 38 7->/s01/rac10g/dbs/lkinstPROD (deleted)Lrwx ------ 1 maclean oinstall 64 Jul 26 16: 38 8->/s01/rac10g/dbs/hc_PROD.datL-wx ------ 1 maclean oinstall 64 Jul 26 :38 9->/s01/rac10g/admin/PROD/bdump/alert_PROD.log
/* You can see that the trace file related to the lgwr process is/s01/rac10g/admin/PROD/bdump/prod_lgwr_7289.trc. The file descriptor is 2 */
[Maclean @ rh2
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.