数据库oracle简介

数据库oracle简介,第1张

Oracle Database,又名Oracle RDBMS,或简称Oracle。是甲骨文公司的一款关系数据库管理系统。它是在数据库领域一直处于领先地位的产品。可以说Oracle数据库系统是目前世界上流行的关系数据库管理系统,系统可移植性好、使用方便、功能强,适用于各类大、中、小、微机环境。它是一种高效率、可靠性好的 适应高吞吐量的数据库解决方案。

ORACLE数据库系统是美国ORACLE公司(甲骨文)提供的以分布式数据库为核心的一组软件产品,是目前最流行的客户/服务器(CLIENT/SERVER)或B/S体系结构的数据库之一。ORACLE数据库是目前世界上使用最为广泛的数据库管理系统,作为一个通用的数据库系统,它具有完整的数据管理功能;作为一个关系数据库,它是一个完备关系的产品;作为分布式数据库它实现了分布式处理功能。

特点

1、完整的数据管理功能:[2]

1)数据的大量性

2)数据的保存的持久性

3)数据的共享性

4)数据的可靠性

2、完备关系的产品:

1)信息准则---关系型DBMS的所有信息都应在逻辑上用一种方法,即表中的值显式地表示;

2)保证访问的准则

3)视图更新准则---只要形成视图的表中的数据变化了,相应的视图中的数据同时变化

4)数据物理性和逻辑性独立准则

3、分布式处理功能:

ORACLE数据库自第5版起就提供了分布式处理能力,到第7版就有比较完善的分布式数据库功能了,一个ORACLE分布式数据库由oraclerdbms、sql*Net、SQL*CONNECT和其他非ORACLE的关系型产品构成。

4、用ORACLE能轻松的实现数据仓库的 *** 作。

这是一个技术发展的趋势,不在这里讨论。

优点

■ 可用性强

■ 可扩展性强

■ 数据安全性强

■ 稳定性强

如果自己搞不定可以找诗檀软件专业ORACLE数据库修复团队成员帮您恢复!

诗檀软件专业数据库修复团队

Oracle的损坏/坏块 主要分以下几种:

ORA-1578

ORA-8103

ORA-1410

ORA-1499

ORA-1578

ORA-81##

ORA-14##

ORA-26040

ORA-600 Errors

Block Corruption

Index Corruption

Row Corruption

UNDO Corruption

Control File

Consistent Read

Dictionary

File/RDBA/BL

Error DescriptionCorruption related to:

ORA-1578ORA-1578一般为Oracle检测到存在物理坏块问题,包括其检测数据块中的checksum不正确,或者tail_chk信息不正确等。ORA-1578 is reported when a block is thought to be corrupt on read.

Block

数据块

OERR: ORA-1578 “ORACLE data block corrupted (file # %s, block # %s)” Master Note

OERR: ORA-1578 “ORACLE data block corrupted (file # %s, block # %s)”

Fractured Block explanation

Handling Oracle Block Corruptions in Oracle7/8/8i/9i/10g/11g

Diagnosing and Resolving 1578 reported on a Local Index of a Partitioned table

ORA-1410

ORA-1410错误常见于从INDEX或其他途径获得的ROWID,到数据表中查询发现没有对应的记录。

该错误可能因为数据表与其索引存在不一致,也可能是分区的数据表本身存在问题。

This error is raised when an operation refers to a ROWID in a table for which there is no such row.

The reference to a ROWID may be implicit from a WHERE CURRENT OF clause or directly from a WHERE ROWID=… clause.

ORA 1410 indicates the ROWID is for a BLOCK that is not part of this table.

Row

数据行

Understanding The ORA-1410

Summary Of Bugs Containing ORA 1410

OERR: ORA 1410 “invalid ROWID”

ORA-8103

该ORA-8103可能由多个BUG引起,例如LOB在10.2.0.4之前可能会由于BUG覆盖了另一张表的segment header,导致出现ORA-8103错误。

诊断该问题可以从数据表的segment header和data_object_id入手。

The object has been deleted by another user since the operation began.

If the error is reproducible, following may be the reasons:-

a.) The header block has an invalid block type.

b.) The data_object_id (seg/obj) stored in the block is different than the data_object_id stored in the segment header. See dba_objects.data_object_id and compare it to the decimal value stored in the block (field seg/obj).

Block

数据块

ORA-8103 Troubleshooting, Diagnostic and Solution

OERR: ORA-8103 “object no longer exists” / Troubleshooting, Diagnostic and Solution

ORA-8102ORA-8102常见于索引键值与表上存的值不一致。An ORA-08102 indicates that there is a mismatch between the key(s) stored in the index and the values stored in the table. What typically happens is the index is built and at some future time, some type of corruption occurs, either in the table or index, to cause the mismatch.

Index

索引

OERR ORA-8102 “index key not found, obj# %s, file %s, block %s (%s)

ORA-1499对表和索引做交叉验证时发现问题An error occurred when validating an index or a table using the ANALYZE command.

One or more entries does not point to the appropriate cross-reference.

Index

索引

ORA-1499. Table/Index row count mismatch

OERR: ORA-1499 table/Index Cross Reference Failure – see trace file

ORA-1498 Generally this is a result of an ANALYZE … VALIDATE … command.

This error generally manifests itself when there is inconsistency in the data/Index block. Some of the block check errors that may be found:-

a.) Row locked by a non-existent transaction

b.) The amount of space used is not equal to block size

c.) Transaction header lock count mismatch.

While support are processing the tracefile it may be worth the re-running the ANALYZE after restarting the database to help show if the corruption is consistent or if it ‘moves’.

Send the tracefile to support for analysis.

If the ANALYZE was against an index you should check the whole object. Eg: Find the tablename and execute:

ANALYZE TABLE xxx VALIDATE STRUCTURE CASCADE Block

OERR: ORA 1498 “block check failure – see trace file”

ORA-26040由于采用过nologging/unrecoverable选项的redo生成机制,且做过对应的recover,导致数据块中被填满了0XFF,导致报错ORA-26040。Trying to access data in block that was loaded without redo generation using the NOLOGGING/UNRECOVERABLE option.

This Error raises always together with ORA-1578

Block

数据块

OERR ORA-26040 Data block was loaded using the NOLOGGING option

ORA-1578 / ORA-26040 Corrupt blocks by NOLOGGING – Error explanation and solution

ORA-1578 ORA-26040 in a LOB segment – Script to solve the errors

ORA-1578 ORA-26040 in 11g for DIRECT PATH with NOARCHIVELOG even if LOGGING is enabled

ORA-1578 ORA-26040 On Awr Table

Errors ORA-01578, ORA-26040 On Standby Database

Workflow Tables ORA-01578 ORACLE data block corrupted ORA-26040 Data block was loaded using the NOLOGGING option

ORA-1578, ORA-26040 Data block was loaded using the NOLOGGING option

ORA-600[12700]

从索引获得的ROWID,对应到数据表时发现不存在数据行错误。

一把是一致性度consistent read问题

Oracle is trying to access a row using its ROWID, which has been obtained from an index.

A mismatch was found between the index rowid and the data block it is pointing to. The rowid points to a non-existent row in the data block. The corruption can be in data and/or index blocks.

ORA-600 [12700] can also be reported due to a consistent read (CR) problem.

Consistent Read

一致性读

Resolving an ORA-600 [12700] error in Oracle 8 and above.

ORA-600 [12700] “Index entry Points to Missing ROWID”

ORA-600[3020]主要问题是redo和数据块中的信息不一致This is called a ‘STUCK RECOVERY’.

There is an inconsistency between the information stored in the redo and the information stored in a database block being recovered.Redo

ORA-600 [3020] “Stuck Recovery”

Information Required for Root Cause Analysis of ORA-600 [3020] (stuck recovery)

ORA-600[4194]主要是redo记录与回滚rollback/undo的记录不一致A mismatch has been detected between Redo records and rollback (Undo) records.

We are validating the Undo record number relating to the change being applied against the maximum undo record number recorded in the undo block.

This error is reported when the validation fails.Undo

ORA-600 [4194] “Undo Record Number Mismatch While Adding Undo Record”

Basic Steps to be Followed While Solving ORA-00600 [4194]/[4193] Errors Without Using Unsupported parameter

ORA-600[4193]主要是redo记录与回滚rollback/undo的记录不一致A mismatch has been detected between Redo records and Rollback (Undo) records.

We are validating the Undo block sequence number in the undo block against the Redo block sequence number relating to the change being applied.

This error is reported when this validation fails.Undo

ORA-600 [4193] “seq# mismatch while adding undo record”

Basic Steps to be Followed While Solving ORA-00600 [4194]/[4193] Errors Without Using Unsupported parameter

Ora-600 [4193] When Opening Or Shutting Down A Database

ORA-600 [4193] When Trying To Open The Database

ORA-600[4137]transaction id不匹配,问题可能存在与回滚段中或者对象本身存在讹误While backing out an undo record (i.e. at the time of rollback) we found a transaction id mis-match indicating either a corruption in the rollback segment or corruption in an object which the rollback segment is trying to apply undo records on.

This would indicate a corrupted rollback segment.Undo/Redo

ORA-600 [4137] “XID in Undo and Redo Does Not Match”

ORA-600[6101] Not enough free space was found when inserting a row into an index leaf block during the application of undo.Index

ORA-600 [6101] “insert into leaf block (undo)”

ORA-600[2103] Oracle is attempting to read or update a generic entry in the control file.

If the entry number is invalid, ORA-600 [2130] is logged.Control File

ORA-600 [2130] “Attempt to access non-existant controlfile entry”

ORA-600[4512] Oracle is checking the status of transaction locks within a block.

If the lock number is greater than the number of lock entries, ORA-600 [4512] is reported followed by a stack trace, process state and block dump.

This error possibly indicates a block corruption.Block

ORA-600 [4512] “Lock count mismatch”

ORA-600[2662]主要是发现一个数据块的SCN甚至超过了当前SCN,常规解决途径有调整SCN等,但11.2以后Oracle公司使较多调整SCN的方法失效了A data block SCN is ahead of the current SCN.

The ORA-600 [2662] occurs when an SCN is compared to the dependent SCN stored in a UGA variable.

If the SCN is less than the dependent SCN then we signal the ORA-600 [2662] internal error.Block

ORA-600 [2662] “Block SCN is ahead of Current SCN”

ORA 600 [2662] DURING STARTUP

ORA-600[4097]访问一个回滚段头以便确认事务是否已提交时,发现XID有问题We are accessing a rollback segment header to see if a transaction has been committed.

However, the xid given is in the future of the transaction table.

This could be due to a rollback segment corruption issue OR you might be hitting the following known problem.Undo

nvl( ) 函数

语法:

NVL(eExpression1, eExpression2);

参数:

eExpression1, eExpression2。

如果 eExpression1 的计算结果为 null 值,则 NVL( ) 返回 eExpression2。如果 eExpression1 的计算结果不是 null 值,则返回 eExpression1。

eExpression1 和 eExpression2 可以是任意一种数据类型。如果 eExpression1 与 eExpression2 的结果皆为 null 值,则 NVL( ) 返回 .NULL.。

NVL( string1, replace_with)。

功能:如果string1为NULL,则NVL函数返回replace_with的值,否则返回string1的值。

引申一下,此NVL的作用与SQLserver 中的 ISNULL( string1, replace_with) 一样。

注意事项:string1和replace_with必须为同一数据类型,除非显式的使用TO_CHAR函数。

例:NVL(TO_CHAR(numeric_column), 'some string') 其中numeric_column代指某个数字类型的值。

例:nvl(yanlei777,0) >0。

NVL(yanlei777, 0) 的意思是 如果 yanlei777 是NULL, 则取 0值。

通过查询获得某个字段的合计值,如果这个值为null将给出一个预设的默认值。

扩展资料:

nvl函数例子:

select nvl(sum(t.dwxhl),1)

from tb_jhde t。

就表示如果sum(t.dwxhl) = NULL 就返回 1。

另一个有关的有用方法。

declare i integer。

select nvl(sum(t.dwxhl),1) into i from tb_jhde t where zydm=-1这样就可以把获得的合计值存储到变量。i中,如果查询的值为null就把它的值设置为默认的1。

oracle中:

select nvl(rulescore,0) from zwjc_graderule where rulecode='FWTD'

如果记录中不存在rulecode ='FWTD'的数据.则查不出数据。

select nvl(rulescore,0) into rule_score from zwjc_graderule where rulecode='FWTD'会报查不到数据的错。

select nvl(sum(rulescore),0) from zwjc_graderule where rulecode='FWTD'

如果记录中不存在rulecode ='FWTD'的数据.还是可以得到一行列名为nvl(rulescore,0),值为0的数据。

select nvl(sum(rulescore),0) rule_score from zwjc_graderule where rulecode='FWTD'不会报错。


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/sjk/10018077.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-04
下一篇 2023-05-04

发表评论

登录后才能评论

评论列表(0条)

保存