SMON进程详解
The system monitor process (SMON) is in charge of a variety of system-level cleanup duties. The duties assigned to SMON include:smon负责各种各样系统级别的清理工作。分配给smon的工作包括:■ Performing instance recovery, if necessary, at instance startup. In an Oracle RAC d...
逻辑表空间管理结构(Logical Storage Structures)
Logical Storage Hierarchy逻辑存储层级Figure 12-2 shows the relationships among data blocks, extents, and segments within a tablespace. In this example, a segment has two extents stored in different data files.图12-2显示了表空间在数据块,区和段之间的关系,例如,一个段有两个区被存储在不同...
关于如何释放表空间的问题(About Reclaimable Unused Space)
Over time, performing insert, update, and delete operations (also referred to as DML operations) on objects within a tablespace can create pockets of empty space that individually are not big enough to be reused. Collectively, these pockets can waste large amounts of space. The sparsely populated ob...
关于收缩表和表空间的相关概念(Shrinking Database Segments Online)
You use online segment shrink to reclaim fragmented free space below the high water mark in an Oracle Database segment. The benefits of segment shrink are these:Compaction of data leads to better cache utilization, which in turn leads to better online transaction processing (OLTP) perf...
oracle的exclusive和restricted启动方式
以restricted mode启动数据库只允许dba的权限进入以exclusive Mode启动数据库只允许一个instance连接数据库
ORACLE锁等待的处理方法
前言:锁等待的管理是数据库管理员在日常工作中会碰到较多的一个问题,一般来说大型的ERP锁等待的处理会相对较少,小型的应用系统锁等待会相对比较多。 常规的锁等待的处理方法如下: 1) 先查找持有锁的对象: 脚本:select a.sid, b.spid from (select s.sid, s.paddr from v$session s,v$lock l WHERE l.sid = s.sid ...
如何修改数据库实例及数据库名
一、修改实例:将原参数文件重命名即可即原实例为orcl,原参数文件为spfileorcl.ora,则将其改为实例为credit的参数文件,即spfilecredit.ora可以通过命令SQL>create pfile='/home/dbs/pfilecredit.ora' from spfile='/home/dbs/spfileorcl.ora';先创建一个pfie文件,然后通过命令>create spfile from pfile...
oracle的内部启动过程
数据库首先启动到nomount状态:1、读取参数文件;2、按照参数文件指定的值分配SGA;3、开启后台进程;4、打开告警日志文件和跟踪文件;mount状态:1、将数据库与实例关联起来;2、开启在参数文件中指定的控制文件;3、读取控制文件以获取数据文件和联机日志文件的名字和状态,但是,不检查验证数据文件和联机日...
Linux下oracle库自启动
步骤:1.修改/etc/oratab参数值,如下红字所示[root@Vaxph49 etc]# vi oratab ## This file is used by ORACLE utilities. It is created by root.sh# and updated by the Database Configuration Assistant when creating# a database.# A colon, ':', is used as the field terminator. A n...
scope的用法
Oracle 里面有个叫做spfile的东西,就是动态参数文件,里面设置了Oracle 的各种参数。所谓的动态,就是说你可以在不关闭数据库的情况下,更改数据库参数,记录在spfile里面。更改参数的时候,有4种scope选项。scope就是范围 scope=spfile 仅仅更改spfile里面的记载,不更改内存,也就是不立即生效,而是等下次数据库启动生...
修改数据库字符集
SQL> shutdownimmediateSQL> startupmountSQL> alter systemenable restricted session;SQL> alter systemset job_queue_processes=0;SQL> alterdatabase open;SQL> alterdatabase character set internal_use zhs16gbk;检查是否改变SQL> shutdownimmediateSQL>startup mountSQL>al...
启用enable restricted对数据库进行维护
公司一台机器上安装了多个数据库,这几个数据库共用一个监听器,而且是动态监听,在维护其中一个数据库的时候,不想用户登录,停止监听看来是不可能了的,因为用户在访问其他数据库,如下的方法可以使没有RESTRICTED SESSION的权限登录.1.启用restricted sessionSQL> alter system enable restricted session;System alt...
ORACLE非正常关库后开库所需步骤
1.读取初始化参数文件2.分配指定的大小的SGA3.启动后台进程4.读取控制文件5.读取redo log6.检查数据文件一致性7.开启实例恢复
关于db_cache_size参数为0的原因
db_cache_size等SGA中的参数为0,意味着是自动管理,动态分配内存大小如需查看当前的SGA中的动态信息,可以通过select * from v$sga;select * from v$sgainfo;来查看
plustrce.sql的作用
$ORACLE_HOME/sqlplus/admin/plustrce.sql拥有plustrace最主要的目的是为了访问下面几个VIEW。grant select on v_$sesstat to plustrace;grant select on v_$statname to plustrace;grant select on v_$mystat to plustrace;如果你没有plustrace role又能SET AUTOTRACE ON那你应该是从其他途径获得对...
plustrce.sql的作用
$ORACLE_HOME/sqlplus/admin/plustrce.sql拥有plustrace最主要的目的是为了访问下面几个VIEW。grant select on v_$sesstat to plustrace;grant select on v_$statname to plustrace;grant select on v_$mystat to plustrace;如果你没有plustrace role又能SET AUTOTRACE ON那你应该是从其他途径获得对...
oracle session和process的关系
什么是session 通俗来讲,session 是通信双方从开始通信到通信结束期间的一个上下文(context)。这个上下文是一段位于服务器端的内存:记录了本次连接的客户端机器、通过哪个应用程序、哪个用户在登录等信息[在pl/sql developer中,通过Tools-->Sessions可以查看当前数据库的session]。session 是和connection同时建立...
sys用户与system用户的区别
system是数据库内置的一个普通管理员,你手工创建的任何用户在被授予dba角色后都跟这个用户差不多。sys用数据库的超级用户,数据库内很多重要的东西(数据字典表、内置包、静态数据字典视图等)都属于这个用户,sys用户必须以sysdba身份登录。以上就是2个用户的区别。另外你说的,system用户as sysdba登录时和sys一样...