事务的基本概念ACID
事务的基本概念事务处理在应用系统开发中起着重要的作用。简单地来说,事务就是由若干步处理组成的工作单元,这些步骤之间具有一定的逻辑关系,作为一个整体的操作过程,每个步骤必须同时成功或者失败。当所有的步骤都成功的时候,事务就必须“提交”,而当其中有一个步骤失败的时候,整个事务都必须“回滚”,也就是,其中的每一个步骤所做的改动都必须撤销。举一个例子来说明事务处理的情形。我们考察一个仓库入库的过程。仓库的入库要经过以下步骤:填写一张入库单,这张入库单上可能包含多种商品,每一种商品入库一定的数量根据入库单
monitor sys and system user(轉自http://www.oracle.com)
Tip of the Week Tip for Week of February 23, 2003 Monitor SYS and SYSTEM Accounts This tip comes from Daniel Stanley, Oracle DBA/Developer at ASIX, Inc., in Bellevue, WA. Create a procedure to monitor and log users logging onto the database with the SYS and SYSTEM accounts. Create two new SYS objects: --trigger sys$logtrig-- This logon trigger fires the procedure if you are logged on with the SYS or SYSTEM accounts. --procedure sys$logproc-- This procedure writes an ascii file to either the utl_
Oracle/PLSQL: UserEnv Function(轉自http://www.techonthenet.com/oracle/functions/userenv.php)
In Oracle/PLSQL, the userenv function can be used to retrieve information about the current Oracle session. Although this function still exists in Oracle for backwards compatibility, it is recommended that you use the sys_context function instead.The syntax for the userenv function is:userenv( parameter )parameter is the value to return from the current Oracle session. The possible values are:ParameterExplanationCLIENT_INFOReturns user session information stored using the DBMS_APPLICATION_INFO p
Oracle/PLSQL: Sys_Context Function(轉自http://www.techonthenet.com)
In Oracle/PLSQL, the sys_context function can be used to retrieve information about the Oracle environment.The syntax for the sys_context function is:sys_context( namespace, parameter, [ length ] )namespace is an Oracle namespace that has already been created. If the namespace of 'USERENV' is used, attributes describing the current Oracle session can be returned.parameter is a valid attribute that has been set using the DBMS_SESSION.set_context procedure.length is optional. It is the length of t
Naming Database Objects
Naming Database Objects• Names must be from 1 to 30 bytes long with theseexceptions:– Names of databases are limited to 8 bytes– Names of database links can be as long as 128bytes• Nonquoted names cannot be Oracle reservedwords.• Nonquoted names must begin with an alphabeticcharacter from your database character set.Naming Database ObjectsWhen you name an object in the database you have the option of enclosing names in doublequotation marks ("). If you do this then you c
redolog thread
redolog thread instand[@more@]