环境介绍:双机操作系统:solaris10数据库版本:oracle11gR164bit1、半夜接到电话,说数据库报大量错误,起来查看数据库,发现数据库已崩溃,查看alert日志,发
环境介绍:
双机 操作系统:solaris 10 数据库版本:oracle 11g R1 64bit1、半夜接到电话,说数据库报大量错误,起来查看数据库,发现数据库已崩溃,查看alert日志,发现I/O报错:
Wed Dec 18 00:36:57 2013 KCF: write/open error block=0x98abe online=1 file=89 /dev/raw/raw03 error=27063 txt: 'SVR4 Error: 5: I/O error Additional information: -1 Additional information: 8192' Wed Dec 18 00:36:57 2013 KCF: write/open error block=0x9d70f online=1 file=91 /dev/raw/raw05 error=27063 txt: 'SVR4 Error: 5: I/O error Additional information: -1 Additional information: 8192' Automatic datafile offline due to write error onAutomatic datafile offline due to write error on2、之前出过因为工程队碰到线,导致现网问题,问机房人员今晚是否有工程,机房人员说,今晚有新设备接入SAN网络,但经了解,无人碰到线,查看本机系统日志,报错如下:
Dec 17 23:33:10 fly-db01 scsi: [ID 107833 kern.warning] WARNING: /scsi_vhci/ssd@fly6000c5d0008a0000006b131400440 (ssd28): Dec 17 23:33:10 fly-db01 SCSI transport failed: reason 'tran_err': retrying command Dec 17 23:33:10 fly-db01 scsi: [ID 107833 kern.warning] WARNING: /scsi_vhci/ssd@fly6000c5d0008a0000006b131400930 (ssd52):3、查看其他使用到SAN存储的服务器数据库运行情况,alert日志,操作系统日志是否报错,以及挂载的为SAN存储的文件系统是否变成只读,,发现部分数据库也已崩溃,部分主机的文件系统变成只读,操作系统日志报lpfc的错误,之前也出现过这个错误,一般在出现lpfc的错误一段时间后,文件系统就会出现只读
lpfc错误: fly008:/var/log # cat messages | grep lpfc Dec 18 00:34:05 fly008 kernel: [10201542.768302] lpfc 0000:03:00.0: 0:(0):0203 Devloss timeout on WWPN 21:4g:00:0b:5e:6a:18:14 NPort x014400 Data: x40000 x1 x0 Dec 18 00:34:07 fly008 kernel: [10201544.816750] lpfc 0000:03:00.0: 0:(0):0203 Devloss timeout on WWPN 21:4h:00:0b:5e:6a:18:14 NPort x014500 Data: x0 x7 x0 Dec 18 00:34:07 fly008 kernel: [10201544.816802] lpfc 0000:03:00.0: 0:(0):0203 Devloss timeout on WWPN 21:4k:00:0b:5e:6a:18:14 NPort x014600 Data: x0 x7 x0 文件系统只读错误: fly008~ #df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_fly008_app-lv_fly008_app 99G 41G 53G 44% /home/fly008 fly008~ # cd /home/fly008 fly008/home/fly008 # touch 1.txt touch: cannot touch `1.txt': Read-only file system4、对今晚所做配置进行回退,问题消失,重新拉起数据库,数据库正常启动,拉起应用,应用拉起失败,在应用的日志中,报如下错误:
SQLErrorCode: 376 ORA-00376: file 92 cannot be read at this time ORA-01110: data file 92: '/dev/raw/raw06'5、在数据库的alert日志,也报相关错误
DDE: Problem Key 'ORA 1110' was flood controlled (0x5) (no incident) ORA-01110: 数据文件 92: '/dev/raw/raw06' *** 2013-12-18 05:04:16.284 ORA-12012: 自动执行作业 226 出错 ORA-00372: 此时无法修改文件 92 ORA-06512: 在 "FLY.DELETE_FLY_EXCEPTION_INFO", line 8 ORA-06512: 在 line 16、查看数据文件的状态,标记为recover,需要进行恢复操作
SQL> SELECT file_name, file_id, tablespace_name, status, online_status FROM DBA_DATA_FILES ORDER BY TABLESPACE_NAME; FILE_NAME FILE_ID TABLESPACE_NAME STATUS ONLINE_STATUS /dev/raw/raw06 92 FLY AVAILABLE RECOVER7、数据库开启了归档,有数据库的备份,对92的文件进行恢复操作
# su - oracle $ sqlplus / as sysdba SQL> archive log list; SQL> recover datafile 92; SQL> alter database datafile 92 online8、恢复后,应用拉起正常,业务测试正常。
本文出自 “斜阳悠悠寸草心” 博客,请务必保留此出处

MySQL index cardinality has a significant impact on query performance: 1. High cardinality index can more effectively narrow the data range and improve query efficiency; 2. Low cardinality index may lead to full table scanning and reduce query performance; 3. In joint index, high cardinality sequences should be placed in front to optimize query.

The MySQL learning path includes basic knowledge, core concepts, usage examples, and optimization techniques. 1) Understand basic concepts such as tables, rows, columns, and SQL queries. 2) Learn the definition, working principles and advantages of MySQL. 3) Master basic CRUD operations and advanced usage, such as indexes and stored procedures. 4) Familiar with common error debugging and performance optimization suggestions, such as rational use of indexes and optimization queries. Through these steps, you will have a full grasp of the use and optimization of MySQL.

MySQL's real-world applications include basic database design and complex query optimization. 1) Basic usage: used to store and manage user data, such as inserting, querying, updating and deleting user information. 2) Advanced usage: Handle complex business logic, such as order and inventory management of e-commerce platforms. 3) Performance optimization: Improve performance by rationally using indexes, partition tables and query caches.

SQL commands in MySQL can be divided into categories such as DDL, DML, DQL, DCL, etc., and are used to create, modify, delete databases and tables, insert, update, delete data, and perform complex query operations. 1. Basic usage includes CREATETABLE creation table, INSERTINTO insert data, and SELECT query data. 2. Advanced usage involves JOIN for table joins, subqueries and GROUPBY for data aggregation. 3. Common errors such as syntax errors, data type mismatch and permission problems can be debugged through syntax checking, data type conversion and permission management. 4. Performance optimization suggestions include using indexes, avoiding full table scanning, optimizing JOIN operations and using transactions to ensure data consistency.

InnoDB achieves atomicity through undolog, consistency and isolation through locking mechanism and MVCC, and persistence through redolog. 1) Atomicity: Use undolog to record the original data to ensure that the transaction can be rolled back. 2) Consistency: Ensure the data consistency through row-level locking and MVCC. 3) Isolation: Supports multiple isolation levels, and REPEATABLEREAD is used by default. 4) Persistence: Use redolog to record modifications to ensure that data is saved for a long time.

MySQL's position in databases and programming is very important. It is an open source relational database management system that is widely used in various application scenarios. 1) MySQL provides efficient data storage, organization and retrieval functions, supporting Web, mobile and enterprise-level systems. 2) It uses a client-server architecture, supports multiple storage engines and index optimization. 3) Basic usages include creating tables and inserting data, and advanced usages involve multi-table JOINs and complex queries. 4) Frequently asked questions such as SQL syntax errors and performance issues can be debugged through the EXPLAIN command and slow query log. 5) Performance optimization methods include rational use of indexes, optimized query and use of caches. Best practices include using transactions and PreparedStatemen

MySQL is suitable for small and large enterprises. 1) Small businesses can use MySQL for basic data management, such as storing customer information. 2) Large enterprises can use MySQL to process massive data and complex business logic to optimize query performance and transaction processing.

InnoDB effectively prevents phantom reading through Next-KeyLocking mechanism. 1) Next-KeyLocking combines row lock and gap lock to lock records and their gaps to prevent new records from being inserted. 2) In practical applications, by optimizing query and adjusting isolation levels, lock competition can be reduced and concurrency performance can be improved.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment