oracle的逻辑结构和物理结构
1、数据库的逻辑结构和物理结构:
Oracle logically divides the database into a smaller units to manage ,store,and retreive
data efficently.
Tablespace\Blocks\Extents\segment\
有四种segment:
data segment、Index segment、Temporay segment、Rollback Segment
temporary segment:
Are created when Oracle needs a temporary work area,such as for sorting,during a query,
to complete execution of a SQL statement.These segments are freed when the execution completes.
Rollback segment:Used to store undo information.When you roll back the changes madde to the
database,the information in the rollback segment is used to undo the changes.
The physical daabase structure consists of three types of physcial files
data files
control files
redo log files
The control file contains the database name and timestamp of database creation as well as the name and location of every data file and redo log file.
相关文档:
1.查询用户(数据)表空间
SELECT UPPER(F.TABLESPACE_NAME) "表空间名",
D.TOT_GROOTTE_MB "表空间大小(M)",
D.TOT_GROOTTE_MB - F.TOTAL_BYTES "已使用空间(M)",
TO_CHAR(ROUND((D.TOT_GROOTTE_ ......
/*不带任何参数存储过程(输出系统日期)*/
create or replace procedure output_date is
begin
dbms_output.put_line(sysdate);
end output_date;
/*带参数in和out的存储过程*/
create or replace procedure get_username(v_id in number,v_username out varchar2)
as
begin
select username into v_usern ......
Oracle 内存结构如下图:
1:实例(Instance)
在一个中,每一个运行的Oracle数据库都与一个数据库实例相联系,实例是我们
访问数据库的手段。
实例在操作系统中用ORACLE_SID来标识,在Oracle中用参数INSTANCE_NAME来标识,
它 ......
每隔几秒钟listener日志中就出现一次该错误的记录,即使是在没有人使用的情况下也是如此,不过并没有发现客户端机器不能正常连接数据库的情况。
Oracle关于TNS-12502错误的解释:
Error: ORA-12502 / TNS-12502
Text: TNS:listener received no CONNECT_DATA from client
Cause: No CONNECT_DATA was ......
先看下面的例子:oracle中两个系统表.emp,dept.
example:
1:not exists(not in)
not exists:
这条语句返回select * from scott.dept d where e.deptno=d.deptno and d.deptno=10条件满足的结果集.也就是说,
返回的结果集中不存在d.deptno=10结果集的记录,即emp表中没有dept表中d.deptno=10的记录.
SQL& ......