oracle10g笔记

合集下载

oracle10g期末考试复习提纲

oracle10g期末考试复习提纲

Oracle数据库结构:扬理结构、内存结构、逻辑结构3.ORACLE数据库物理结构包括哪几类文件,主要作用参数文件、控制文件(CTL)、日志文件(LOG)、数据丈件(DBF)参数文件:1)实例和数据库的配置参数表。

设置内存中的SGA (系统全局区)大小、指定数据库控制文件名称及路径,定艾各种操作参数等。

2)将初始化参数永久保存在服务器磁盘上。

3)!4)只在建立数据库或启动实例吋才被访问。

5)是一个可编辑的殳本文件,在修改该文件之前必须关闭实例。

控制文件:1)至少有一个控制文件,建议两个或两个以上2)通过控制文件保持数据库完整性以及决定恢复数扌居时使用哪些重做日志。

数据库名称及唯一标识数据库的创建时间数据丈件的名称、位置及大小J重做日志文件的名称.位置及大小表空间名称检查点信息、日志序列号等数据库恢复所需的同步信息。

数据文件:用于存放所有的数据库数扌居.如表、索引等。

1)一个数据文件只与一个数据库相联系;数据丈件大小是动态可以改变的;数据文件结合在一起形成表空间。

2)有两种类型的数据:用户数扌居和系统数損3)用户数据:用于应用软件的数据,带有应用软件的所有信息。

是用户存放在数据库中的信息。

4)系统数据:用来管理用户数扌居和Oracle数据库本身的数据。

※日志文件:※重做日志文件:用于记录数抿库的修改操作,可用于数扌居库的恢复。

两个或两个以上日志文件,用于镜像。

£件的配置和大小会影响性能,重做日志与数据文件分开存放。

莹做日志文件组以循环方式进行写操作。

ARCHIVELOG (归档)当所有日志组都写满之后,又回到第一组之前,该组中原有数据写入归档日志,存入磁盘。

备份吋必选。

可自动归档重做日志文件。

是非活动重做日志的备份。

]数据库只有处于ArchiveLog模式时才会生成归档日志,并且每次日志切换都会生成归档日志。

执行介质恢复(例如数据文件意外去失),則必须要用到归档日志。

N0ARCHIVEL0G (非归档)通常默认都为非归档模式。

精通 oracle 10g plsql 编程-学习笔记

精通 oracle 10g plsql 编程-学习笔记

1.PL/SQL综述本章学习目标,了解如下内容:PL/SQL的功能和作用PL/SQL 的优点和特征;Oracle 10g、Oracle9i 的PL/SQL新特征1.1.SQL简介1.1.1.SQL语言特点SQL语言采用集合操作方式1.1.2.SQL语言分类●数据查询语言(SELECT语句):检索数据库数据。

●数据操纵语言(DML):用于改变数据库数据。

包括insert,update和delete三条语句。

●事务控制语言(TCL):用于维护数据库的一致性,包括commit,rollback和savepoint 三条语句●数据定义语言(DDL):用户建立、修改和删除数据库对象。

●数据控制语言(DDL):用于执行权限授予和收回操作。

包括grant 和revoke两条命令。

1.1.3.SQL 语句编写规则●SQL关键字不区分大小写●对象名和列名不区分大小写●字符值和日期值区分大小写●书写格式随意1.2.PL/SQL简介1.3.Oracle 10G PL/SQL 新特征2.PL/SQL开发工具本章学习目标:学会使用SQL*PLUS学会使用PL/SQL developer;学会使用Procedure Builder。

2.1.SQL*PLUS在命令行运行SQL*PlusSqlplus [username]/[password] [@server]3.PL/SQL 基础学习目标:●了解PL/SQL块的基本结构以及PL/SQL块的分类;●学会在PL/SQL块中定义和使用变量●学会在PL/SQL块中编写可执行语句;●了解编写PL/SQL代码的指导方针;●了解Oracle 10g的新特征——新数据类型BINARY_FLOAT 和BINARY_DOUBLE,以及指定字符串文本的新方法。

3.1.PL/SQL 块简介3.1.1.PL/SQL块结构3.1.2.PL/SQL 块分类匿名块命名块子程序触发器3.2. 定义并使用变量3.2.1.标量变量3.2.2.复合变量3.2.3.参照变量3.2.4.LOB 变量3.2.5.非PL/SQL 变量3.3.编写 PL/SQL 代码3.3.1.PL/SQL 词汇单元分隔符标识符文本(数字文本,字符文本,字符串文本,布尔文本,日期时间文本)注释3.3.2.PL/SQL 代码编码规则标识符命名规则大小写规则代码缩进嵌套块和变量范围PL/SQL中可以使用的SQL函数4.使用SQL语句学习目标:学会使用SELECT语句去完成基本查询功能学会使用INSERT,UPDA TE和DELETE语句去操作数据库数据学会使用COMMIT,ROLLBACK和SA VEPOINT语句去控制事务学会使用SELECT语句去实现各种复杂查询功能(数据分组、连接查询、子查询、层次查询、合并查询等)4.1.使用基本查询处理NULL:函数nvl(expr1,expr2),nvl2(expr1,expr2,expr3)4.2.使用DML语句使用多表插入数据语法:INSERT ALL insert_into_clause [value_clause] subquery;INSERT conditional_insert_clause subquery;示例1:使用ALL 操作符执行多表插入INSERT ALLWHEN deptno=10 THEN INTO dept10WHEN deptno=20 THEN INTO dept20WHEN deptno=30 THEN INTO dept30WHEN job=’CLERK’ THEN INTO clerkELSE INTO otherSelect * from emp;示例2:使用FIRST 操作符执行多表插入INSERT FIRSTWHEN deptno=10 THEN INTO dept10WHEN deptno=20 THEN INTO dept20WHEN deptno=30 THEN INTO dept30WHEN job=’CLERK’ THEN INTO clerkELSE INTO otherSELECT * FROM emp;4.3.使用事务控制语句4.3.1.事务和锁4.3.2.提交事务4.3.3.回退事务设置保存点:savepoint a;或者exec dbms_transaction.savepoint(‘a’)取消部分事务Rollback to a;或者Exec dbms_transaction.rollback_savepoint(‘a’)取消全部事务:Rollback; 或者exec dbms_transaction.rollback() 4.3.4.只读事务4.3.5.顺序事务4.4.数据分组4.4.1.分组函数MaxMinAvgSumCountVarianceStddev使用分组函数注意事项:●当使用分组函数时,除了函数Count(*) 之外,其他分组函数都会忽略NULL行。

Oracle 10g经典笔记

Oracle 10g经典笔记

删除程序------>删除服务------->删除注册表----------->删除与oracle有关的环境变量------->删除oracle程序有关的程序菜单---------->删除"C:\Program Files\Oracle\Inventory"目录,此目录记录了上安装oracle的信息---------->重启-------->逐步删除oracle文件;
如果数据库需要同时处理多种语言文字,如朝鲜语、日语、德语、汉语和英语等,可选择Unicode(AL32UTF8)作为字符集。
http://IP:1158/em/console/启动控制台 和用 http://IP:5560/isqlplus 启动iSQL*Plus,注意,端口号不同。
--建立表空间
grant select any dictionary to ft;--授予查询任何字典
grant create session,create table,create procedure,create view ,unlimited tablespace to ft;
解释:session允许同一个用户在同一个客户机上建立多个同服务器的连接;
table 操作表的权限,包含创建及删除
procedure 存储过程权限 包含创建及删除
view 操作视图的权限 包含创建及删除
unlimited tablespace 表空间权限
数据库卸载注意事项:
删除用户:drop user 用户名 cascade
--给用户授权
grant dba to ft ; --授予DBA权限
grant ed tablespace to ft;--授予不限制的表空间

ORACLE自学笔记

ORACLE自学笔记

ORACLE 10G 自学笔记一.ORACLE 常用的4个用户1.最高级别管理员用户SYS/CHANGE_ON_INSTALL2.普通级别管理员用户SYSTEM/MANAGER3.普通用户SCOTT/TIGER 默认锁定alter user scott identified by "tiger" account unlock 設置密碼4.大数据用户SH/SH 默认锁定二.与ORACLE 相关服务:其中最主要的二个服务为:1.监听服务:OracleOraDb10g_home1TNSListener| 以后如果有程序要操作数据库,或者是一些远程的客户端要连接数据库则必须启动此服务2.数据库实例服务:OracleServiceTUG| 保存数据库具体信息的服务,每一个数据库有每一个数据库的实例(服务)| 命名规则:OracleServiceXXX 其中XXX为配置数据库的名称(严格的意义是SID的名称)三.ORACLE監聽問題ORACLE 二種常見的錯誤解決方案:錯誤一:註冊表相關項丟失問題HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\OracleOraDb10g_home1TNSListener ImagePath中D:\oracle\product\10.1.0\db_1\BIN\TNSLSNR錯誤二:網絡環境的改變例:計算機名的改變在ORACLE10G或者更早的版本中這個問題只能手工解決ORACLE11G則可以幫助用戶自動的重新配置1. D:\oracle\product\10.1.0\db_1\NETWORK\ADMIN中listener.ora和tnsnames.ora 用記事本打開修改其中的(HOST =xxx)部分2.如果以上方法仍舊無法解決問題那麽再進入NET MANAGER 選項選擇監聽程序中的LISTENER 選擇數據庫服務后添加數據庫添加正確的服務器名稱和SID 此更改作用与listener.ora之中。

Oracle 10g 学习记录

Oracle 10g 学习记录

目录目录 (1)1.Oracle安装及体系结构 (2)1.1 Oracle 安装 (2)1.2 内存结构(Oracle Memory Structures) (2)1.3 进程结构(Process Structures) (3)1.4 实例管理(Oracle Instance Management) (3)1.5 物理结构(Physical Database Structure) (4)1.6 逻辑结构 (4)2. SQL*PLUS基础 (5)2.1 数据库的启动(startup) (5)2.2 数据库的关闭(SHUTDOWN) (6)2.3 SQLPlus 常用命令 (7)3.SQL语言基础 (8)3.1语言分类 (8)3.2常用SQL命令 (8)3.3常用函数 (9)4.视图、同义词、序列 (10)4.1视图 (10)4.2同义词 (11)4.3序列 (11)5.安全管理 (12)1.Oracle安装及体系结构1.1 Oracle 安装Oracle10g 安装1.2 内存结构(Oracle Memory Structures)内存可以分为SGA(系统全局区)和PGA(程序全局区)组成系统全局区(SGA System Global Area)每个例程都只有一个SGA区,当多个用户同时链接到一个例程时,所有的用户进程、服务器进程都可以共同使用SGA区,数据库的各种操作主要都是在SGA区中进行,创建例程时ORACLE 为SGA区分配内存;终止例程时释放SGA区内存。

SGA区可以分为如下几个部分:1.数据高速缓存池(Database buffer cache):保存的是最近从数据文件中读取的数据块;或存储最近经常使用的数据,其中的数据可以被所有用户共享,其中包括3个缓存池,a)保持缓存池其中数据将长期保存在内存中直到关闭数据库为止;b)再生缓存池其中的数据一旦使用完毕就会被从内存中换出;c)默认缓存池如果没有为对象指定所使用的缓存池,就将其数据放在默认缓存池中。

ORACLE 10g学习笔记(解决诸多oracle难题难点)

ORACLE 10g学习笔记(解决诸多oracle难题难点)

ORACLE 10g 笔记第一部分概述一、数据库通用语言·SQL*PLUS:提供报表功能及操作系统的接口. 对SQL语言功能的扩充·PL/SQL:过程化语言用于程序设计数据库基础部分。

.Oracle数据库系统结构与产品组成。

Oracle 7.3.4Oracle 8.0.6Oracle8i 8.1.7Oracle9i 9.2.0 国税系统使用I internetOracle10g 10.2.0 G—>GridOracle 11i 不是数据库软件·SQL语言:对于数据库进行操作关系型·数据分区表技术·Oracle权限管理二、程序设计·PL/SQL程序设计·存储过程(Procedure)、包(Package)、函数(Function)、数据库触发器(Database triggers) 集中存储:一张表存放在一个数据中一张表中,同一物理磁盘中分区存储:把一张表的数据分散存放到不同表空间中,可能存放在不同物理磁盘·动态SQL程序NDS三、Oracle10g数据库系统管理(Database Administrator)DBA·ORACLE核心软件的安装与产品升级Unix:SUN Solaris(两种总线:SPARC,x86) 中油、石化系统HP-UX Super DOMIBM AIX (银行系统)Tru-64 UNIX(电力系统)SCO UNIXLinuxSUN Fire v880 速度很慢.小故事:Order by 临时表空间NT/2000/xp (重新安装要修改注册表)安装资源要求:Oracle8i: 128M/1000MOracle9i 9.0.1: 256M/3.5GOracle9i 9.2.0: 512M/3.5GOracle10g 10.2.0: 256M~512M/2G win2000必须打sp1·创建数据库主要存储结构·权限与角色管理·数据库备份与恢复·数据库性能优化与调整·监视与控制用户对数据库的存取四、Web应用开发及Web服务器Oracle 10g Application Server(PL/SQL,J2EE)Oracle10g的安装1.选择安装方法·基本安装·高级安装(选此项,下一步)2.选择安装类型·企业版主要用于构造分布式数据库(选此项,下一步)·标准版·个人版·定制3.指定主目录(下一步)4.选择配置选项·创建数据库(选此项,下一步)·配置自动存储管理·仅安装数据库软件5.选择数据库配置·一般用途(选此项,下一步)·事务处理·数据仓库·高级6.指定数据库配置选项·数据库命名一般是name.domain(域名可以不要)不能同名·系统标示符SID 数据库实例名数据库名和实例名一般相同,可不同·数据库字符集:National Language Support NLS 民族语言支持中文三种ZHS16cgh231280 支持版本Oracle 7.3 以上只支持简体ZHS16gbk 支持版本Oracle 8.0以上简体繁体日韩ZHS32gh18030 支持版本Oracle 9i以上简体繁体日韩维藏下方□创建带样本方案的数据库(选中此项,下一步)7.数据库管理选项默认下一步8.指定数据库存储选项·文件系统(指定路经,下一步)·自动存储管理·裸设备9.指定备份和恢复选项选择不启用自动备份下一步10.指定数据库方案的口令选择所有的账户都使用同一个口令下一步11.选择安装方法基本安装下一步默认选择直到安装结束Oracle10g的删除1、删除Oracle注册表regedit →HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\2、删除Oracle服务regedit →Local Machine→System→CurrentControlSet→Services→ORA*3、删除Oracle事件日志regedit →Local Machine→System→CurrentControlSet→Services→Eventlog→Application→ORA*4、删除Windows安装磁盘\Program Files\Oracle目录\Program Files\Oracle5、删除菜单6、Oracle删除环境变量。

Oracle11g数据库导入Oracle10g数据库操作笔记

Oracle11g数据库导入Oracle10g数据库操作笔记

一次Oracle11g数据库导入Oracle10g数据库操作笔记11g备份,导入10g的时候会抛错,直接阻止导入。

但是有时候还必须得把11g的数据库导入到10g,我今天就遇到了这种情况。

一开始只是把11g中的表全部备份,成功导入10g。

但是缺少视图、存储过程等。

一个个sql创建累死人,方法太笨。

请教了一下资深DBA,重新备份,重新导入,成功。

现在把我导入操作的全过程记录下来,希望可以方便更多的人!一、在11g服务器上,使用expdp命令备份数据EXPDP USERID='SYS/cuc2009@cuc as sysdba'schemas=sybj directory=DATA_PUMP_DIRdumpfile=aa.dmp logfile=aa.log version=10.2.0.1.0其中,红色文字部分是根据需要改写的地方。

例如我的sys密码是cuc2009,数据库sid是cuc,要到出的用户名是sybj,要导入到10.2.0.1.0版本的Oracle数据库中去。

aa.dmp和aa.log将会在11g的dpdump目录中生成,例如我的11g装在了E盘下面,于是aa.dmp将会在E:/app/Administrator/admin/cuc/dpdump目录下被生成。

二、在10g服务器上,使用impdp命令恢复数据准备工作:1.建库2.建表空间3.建用户并授权4.将aa.dmp拷贝到10g的dpdump目录下1-3点可以去参考博主的上一篇博客“Oracle数据库移植全步骤”,介绍的很详细,这里不再多说。

关于第4点,我的10g装在了e:/tools 目录下,于是我将aa.dmp文件拷贝到了E:/tools/admin/cucf/dpdump目录下。

IMPDP USERID='SYS/cuc2009@cucf as sysdba'schemas=sybj directory=DATA_PUMP_DIRdumpfile=aa.dmp logfile=aa.log version=10.2.0.1.0其中红色部分是根据需要改写的地方。

oracle10g教程

oracle10g教程

玩转oracle视频教程笔记一:Oracle认证,与其它数据库比较,安装Oracle安装会自动的生成sys用户和system用户:(1)sys用户是超级用户,具有最高权限,具有sysdba角色,有create database的权限,该用户默认的密码是change_on_install(2)system用户是管理操作员,权限也很大。

具有sysoper角色,没有create database的权限,默认的密码是manager(3)一般讲,对数据库维护,使用system用户登录就可以拉也就是说sys和system这两个用户最大的区别是在于有没有create database的权限。

二: Oracle的基本使用--基本命令sql*plus的常用命令连接命令1.conn[ect]用法:conn 用户名/密码@网络服务名[as sysdba/sysoper]当用特权用户身份连接时,必须带上as sysdba或是as sysoper2.disc[onnect]说明: 该命令用来断开与当前数据库的连接3.psssw[ord]说明: 该命令用于修改用户的密码,如果要想修改其它用户的密码,需要用sys/system登录。

4.show user说明: 显示当前用户名5.exit说明: 该命令会断开与数据库的连接,同时会退出sql*plus文件操作命令1.start和@说明: 运行sql脚本案例: sql>@ d:\a.sql或是sql>start d:\a.sql2.edit说明: 该命令可以编辑指定的sql脚本案例: sql>edit d:\a.sql,这样会把d:\a.sql这个文件打开3.spool说明: 该命令可以将sql*plus屏幕上的内容输出到指定文件中去。

案例: sql>spool d:\b.sql 并输入 sql>spool off交互式命令1.&说明:可以替代变量,而该变量在执行时,需要用户输入。

oracle10g学习笔记

oracle10g学习笔记
常用的动态性能view:
v$fixed_table包含常用的动态性能view和table,如:select name from v$fixed_table where name like 'V$%';
v$instance
v$sga
v$sgainfo
v$parameter
v$version
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
##############################################
oracle启动过程:
1. 启动例程nomount: 启动例程时,首先读取参数文件,然后分配SGA并启动后台进程,同时打开预警文件和后台跟踪文件。
多个数据库共用一个监听的配置如下:
listener.ora内容:
SID_LIST_LISTENER =
(SID_LIST =
# (SID_DESC =
# (SID_NAME = PLSExtProc)
# (ORACLE_HOME = E:\oracle\product\10.2.0\db_1)

Oracle 10g数据库培训学习经典笔记(ppt 30页)

Oracle 10g数据库培训学习经典笔记(ppt 30页)
Oracle 10g 数据库 培训学习笔记
1.数据库备份. 数据库备份是对数据库的物理结构文件,包括数据文件,日志文件和
控制文件的操作系统备份,这是物理的操作系统备份方法,这种备份方法 对每一个数据库来说都是必需的。操作系统备份有完全数据库及部分数据 库备份,其中,部分数据库备份在数据库恢复需要数据库前一段运行时产 生归档的日志的支持
(3) 修改数据库控制文件
* 新增/移动一个数据库控制文件 SQL>select name from v$controlfile; SQL> create pfile from spfile 生成初参文件 SQL> shutdown immediate $cp control03.ctl control04.ctl 新增一个控制文件 $mv control03.ctl ../controlbak.ctl 移动/更名一个控制文件 $vi init$ORACLE_SID.ora 修改初参文件 SQL> startup pfile=‘$ORACLE_HOME/dbs/init$ORACLE_SID.ora' SQL>select name from v$controlfile; SQL> create spfile from pfile;
1.确认数据库的归档方式可以查询数据字典v$database; SQL>select dbid 标识号,name 数据库名,created 创建时间,log_mode 归档模式 from v$database;
也可以使用sql*plus显示数据库归档模式: $sqlplus / as sysdba SQL>archive log list;
1 .参数文件备份与恢复。 参数文件名及路径:

oracle10G读书笔记

oracle10G读书笔记

1.oracle 服务器=oracle 实例+oracle 数据库2.oracle 实例=共享内存区域(sga)+后台进程或线程(主要进程dbwn ,lgwr,ckpt ,arch,pmon,smon)3.oracle 数据库即一系列的os文件,主要的文件有数据文件,日志文件和控制文件。

4.其他文件:参数文件和口令文件5.其它进程: 高级队列,RAC,共享服务器,高级复制,Oracle server运行环境:1.Client – application server – server : 客户端通过应用服务器访问oracle2.Client – server : 客户端直接通过网络访问服务器3.Host—base : 客户端和服务器位于一台机器上Oracle 服务器的两大重要组成部分:一。

Oracle 实例1.oracle instance 由共享内存结构和后台进程(windows 下线程)组成,用来管理数据库2.实例与数据库的关系一个时刻,一个实例有且仅能mount一个数据库,而一个数据库可以由多个实例来管理(例如9i以前的ops,以及9i以后的rac,都是可以一个数据库对应多个实例)4.区别实例和数据库实例就是共享内存结构+后台进程(线程)数据库就是一系列的os文件连接到oracle 实例用户连接实例的过程:1.用户打开一个客户端工具,如sqlplus,oracle forms.2.用户进程登陆到服务器,oracle服务器为用户进程开启一个服务器进程(这个应该是指独占服务器模式下,共享服务器模式下用户进程不会直接连接到服务器进程而是连接到调度器,如果存在空闲的服务器进程,调度器就将用户的请求传递给服务器进程),服务器进程代表用户进程于oracle 实例通信以及执行sql语句。

Connection:用户进程和服务器的一个通路,建立连接的三种方式1.客户端和服务器位于一台机器上,通过interprocess建立connection2.客户端和通过网络连接到oracle 服务器,这也就是常见的cs结构3.客户端通过网络连接到应用服务器,应用服务器再通过网络连接oracle服务器,这就是常说的三层结构。

Oracle课堂笔记

Oracle课堂笔记

Oracle课堂笔记2009-10-21-------2009-11-一、oracle 10 g 的安装与卸载1、oracle 10g的卸载Oracle 在windows下安装比较简单但卸载比较复杂,因为使用oracle的卸载工具oracle universal installer(OUI)无法完全卸载干净,主要涉及到修改注册表的,所以卸载步骤如下:(1)打开windows注册表:regedit(2)删除注册表中HKEY_LOCAL_MACHINE\SOFTWARE有关oracle的选项(3)删除注册表中HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services(4)删除注册表中有关oracle的事件日志HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application(5)删除oracle环境变量(6)删除oracle菜单,将“开始\程序”位置下所以带有oracle字样的目录删除;(7)删除windows安装目录中“program file\oracle”目录(8)重启windows系统(9)删除原先安装的oracle主目录至此,数据库环境已清除,可以重新安装oracle的其他产品二、oracle10g安装安装时系统默认提供四个特权帐户(sys,system,sysman,dbsnmp)Sys:change_on_installSystem:managerSysman:Dbsnmp:********************************************************听课笔记:Oracle sql 语句:Lsnrctl stop 关闭oracle监听Lsnrctl start 启动oracle 监听Sqlplus /nolog 开启sqlplus 或在运行内输入:sqlpluswConn system/manager 以system帐号登录Conn scott/tiger 以scott帐号登录Discon 关闭连接**********************************************************二、oracle的体系结构Oracle服务器是一种对象关系型数据库管理系统(ORDBMS);它提供了一种开放的体系结构,并且提供了许多功能强大的管理工具(OEM,DBCA,SQLPlus等),通过这些工具可以很方便的完成对数据库的各种操作。

oracle10g新特性中文笔记(Oracle10g新特性中文笔记)

oracle10g新特性中文笔记(Oracle10g新特性中文笔记)

oracle 10g新特性中文笔记(Oracle 10g新特性中文笔记)Chapter 1 installation targetComplete this lesson and you will be able to:* list new installation features*list mounting performance increasesInstall new features support*database storage options-file system-automatic storage management (ASM)-bare equipment*database management options-Enterprise Manager grid controller-enterprise manager database controller*database backup and recovery options * email notification options^cluster ready services * cloningOracle 10g reports on the following new installation features:Configure to use oracleasmInstall and configure the new enterprise manager (EM) frameworkIf you choose to use the Oracle Enterprise Manager database controller, you can have the option to configure the default backup policy recommended by OracleIf the Oracle Enterprise Manager database controller you use when installed, you can configure em to send a warning to you know the email address. These warnings include disk space to a non normal or close database boundaries serious.RAC's enhanced. 10g installation supports new features of RAC, especially the installation of Cluster ready servicesOracle's homes can be cloned using the enterprise configuration management tool that comes with grid controlInstallation performance enhancementMemory requirements-no database controller instance 256MDisk requirements-1G swap partition (or two times of Ram)-there's room for 400m in the /tmp directory-Oracle Software is about 0. 5g to 2. 5G-1.2g configurable database (optional)2.4G flashback area (optional)-reduce the total size of the installed database-removed the old optionFully installed, about 20minJust one CDSee the necessary conditions before installationCheck to see if there is enough temporary space -64 bit and 32 bit problems Check the correct OS -check PS's patchSystem packageSystem / kernel parameters -x server license-enough room for change -non empty oracle_home Miscellaneous mounting reinforcementThe sys and system passwords only need to be entered once Clean reverse installationNo documents leftAll files outside -oracle home are clearedRegistry records in -windows are clearedThere are specific 0C4J requirementsThe bidsableStartMenu variable is supported by ISVCD pack contentCompanion CDOracle 9iAS infrastructure CD Oracle Database 10g client Oracle Enterprise manger CD Oracle documentation 10g CD Oracle, database, 10g, demos, CD Companion CD yesHTML DBWorkflowOHSSqlj, jpublisherContext knowledgeLegato Storage Manager ExamplesManagement optionsIf you choose to create the boot database when you install, you can see many screens asking you to configure the following information for the boot databasenameDatabase character setSchema sampleDatabase managementFile storage optionsThe file system stores the files on the OS file system you configureThe ASm ASM file is automatically created and configured, and you can get additional benefits such as mirror orientation, striping, and so onBare device (partition), with no disk partitions on the filesystemBackup and restore optionsWhen installing, you will be prompted for automatic backupPasswordWhen you install, you can set the same password for all users, or you can set them for yourselfThe second chapter server configurationAfter completing this chapter, you will be able to:Describes the functional support of Oracle 10g after using DBCA to install the databaseA subset of initialization parameters is also used to simplify instance configurationInstall sample schema from DBCA (optional)View database usage statistics from OEMStrengthening of DBCADBCA provides fast, fully functional, and ready to use databases for Oracle standards:Automatically create sysaux helper table spacesThe application of flash back, and set the flash backup and recovery strategyOut-of-the-box management databaseAutomatic statistical collectionAutomatic LDAP registrationOracle 10g in order to simplify the future self management activities, the introduction of a number of properties improved. This improvement includes the common architecture of load information and to optimize the performance of the monitoring tools to store all auxiliary metadata and work. These improvements are completely DBCA support and application.The new system belongs to the sysaux table space for all there is no auxiliary database metadata system table space provides a centralized location. It reduces the number ofMoore create table space, both the seed database or user defined database. Dbca now automatically configure the default flashback area, which is the need to restore the files and database the unified storage location for the. Oem database operations, event subsystem is now automatic configuration, reducing the need for manual installation. A new embedding and completely self managing database capture workload information and statistical performance related, thus reducing the cost of the new directory management. Dbca configuration to reduce the need to use the network the API configuration of Idap. ora.Simplified seed databaseSimplified initialization parameters-reduce the sizeOptional installation of sample schemaManaging ASM for automatic storage of disk storage Now the Oracle database configuration easier. Dba only need to pay attention to a few parameters. The parameters are divided into two groups, the basic and advanced parameters. In most cases, in order to get reasonable performance, you need to set or modify the basic parameters, they probably have 20~25. You can configure the ASM DBCA now, the establishment of for Oracle database files and file system and volume instrument longitudinal integration, in order to conventional and Rac environment.Managing with a database controllerIn the DBCA on the screen, you can set up your database using the grid controller or database controller. When you run DBCA, it is to determine the Oracle management agency has been installed on this computer. If there is, you can select from the drop-down box Oracle management service and the grid control option to the central management when. When you complete the installation, the service as the management goal is to start automatically.If you are not the central management of your Oracle environment, you can still use em to manage your database. Em database control when you install the database, automatically install. You can use the DB provided by control based on the characteristics of web to monitor, manage your installed single instance or cluster database. You can also be equipped with EM SysMan users to receive email notifications, when metric to a serious or warning.When you choose DB control,You can also configure the daily backup to the recovery area.SYSAUX and DBCADBCA supports the creation of sysaux table space by forceOn the database storage page, sysaux is the original tablespace folder, and you can change the database file and storage parameters of sysaux by clicking the storage label or the corresponding sysaux entry in the datafile folderData file and storage parameters have default values. But when you click on the finish, DBCA and other seed database will create database events together to create the sysaux table space and its schema, all sysaux table space.Using the enterprise managerstart default console0s> emctl start dbconsoleAccess database controllerHttp://hostname:5500/emTo provide sys/passwd as sysdba;You need to access the EM database controller from a client browser, you must run the dbconsole process. After installation, the dbconsole process is automatically started. Then, if this integration does not start, you can ask the following command to start it manually:1.to $ORACLE HOME/bin directory2.execute the following command: emctl start dbconsoleThen you can open the web browser and enter the following URL - ortnumber/em "TARGET=_blank>http://hostnameortnumber/em”To access EM DB control.Host then your computer's name or address. Portnumber is the port number of EM DB control HTTP, which was specified at the time of installationThe default is 5500, and you can find this value in the$ORACLE_HOME/install/portlist. ini fileIf the instance is started, EM displays the DB control login page. You must log in to the database using the user who authorized access to the DB control. It started with sys users,Use the password of the sys user you identified at the time of installation. Select SYSDBA from the connect as drop-down box and log on. This will appear on the home page of the DB controlDatabase cloneAfter your successful configuration adjustment and testing of new examples, you might need to clone database to an existing Oracle home. EM clone database, you can use the wizard to complete the cloning. To clone a database, you can go to the cloning of the maintenance of the database page, and then click clone in the deployment database. The clone database tool has the following features:The clone database can come from 8.1.7 or later versionsYou can clone when the source database is openThe backup data file, put it to the specified copy Oracle home, and then through the backup of the database file archiving and restore the database to create a new database. The source database is a new database to start the backup as like as two peas.Create a new database instance, password file, set up network file, configure initialization parameter file and SPFILE according to the source instance configuration, then start new instance to open mode under the specified Oracle homeThe clone database tool uses RMAN to complete database cloningMetal ink integrationOEM 10G greatly simplifies installation of patches through built-in metalink integration, and. Em automatically warns you that critical updates and systems need to specify patch annotations. You can use EM patchThe wizard see which temporary patch can be installed. You can also use the patch wizard to select patches and view your system needs this patch. You can see the details of the patch has been readme, directly from the EM follow the steps below to access the patch WizardOneSelect the maintenance tag on the DB control home page2. in the lower deployments areaThe third chapter is loading and unloading datatargetComplete this lesson, and you will:*transmit table space on different platforms*understand the overall structure of the data pump*monitoring data pump operations*using data pumps for import and export*creating external tables for population of data * define surface attributesCross platform transportable table spaceSimplify data distribution between data warehouses and data martsAllows the database to be ported from one platform to anotherSupported platform (omitted)Transportable table spaces across platformsIn previous versions of Oracle, the characteristics of the transportable table space allowed table spaces to migrate between the same architecture and the operating systemThe characteristics of Oracle 10g further let you use transportable tablespaces, transmission platform. This simplified from the data warehouse to distribute data between the supermarket, the supermarket is usually run on the small platform. It also allows the database through the re establishment of the data dictionary and the transmission of the user table space from a platform transfer to another platform.In order to transfer data files from one platform to another, you need to ensure that the source and target systems are running on a supported platform, and that the number of supported platforms is not large...The same character set is requiredMinimum compatibilityBoth source and destination databases must set compatible to 10. 0. 0 or higherThe data file header is platform dependentBefore transmission, make sure that all read-only and offline files are platform - relatedThe two must be the 10g database: read-only and offline means file headers with no log and checkpoint numbersThe process of transmitting tablespaceFrom a platform transfer table space to another platform, the tablespace data file must be converted to the source and the target database can recognize the format. While in 10g, the disk structure meets the common format, but with different high and low in the source and target database is also possible. When you want to transfer to when high and low the different platforms, you need to use the RMAN convert command to convert the high low. This operation can be performed in the target database source can also do.If the high and low levels of the platform are the same, then there is no need to do the conversion. Basically, the process is more consistent than before, unless the platform uses different high and low levelsView the high and low platformsSelect tp.endian_formatFrom v$transportable_platform tp,V$database DWhere tp. platform_name = d. platform_name;Data file conversion: examples (omitted)CLOB exceptionWhen converting high and low places, the CLOB column is skippedChange when you selectYou can use the create table as select to do the conversionChange in dynamic performance viewV$database---------------> PLATFORM_IDPLATFORM_NAMEENDIAN_FORMATV$transportable_platformData pump overviewHigh speed data and metadata server tools modestlyStructure through dbms datapumb callsProvides new areas of export and import tools: expdb, impdb, and web page interfaces Contains the full functionality of the original exp/impData pump general architectureDIRECT PATH API (DPAPI): 10g supports the direct path API interface,This will reduce data conversion and parse time during transshipment and uninstallAppearance services: data pumps use new ORACLE DATAPUMP access drivers, allowing external reads and writes to include binary stream filesThe DBMS METADATA package is used by the worker process to load and unload all metadata. The definition of the database object is stored in XML rather than sql.The DBMSDATAPUMP package contains api. for batch data and metadata migration, high-speed import and export toolsThe Sql*loader client has been integrated into the exterior so that it provides automatic migration of loader control files for external access parametersThe expdp and impdp clients are thin clients that initialize and monitor data pump operations by calling the dbmsdatapump package. Today they introduced new features that are still compatible with the previous exp and impLike DB control, replication, transmission table space and user applications can benefit from the architecture of this. Sqlplus may be to simply query the status of the ongoing operation of the dbms_datapump client providesData pump export import overviewFailure to submit as a background job can continue. Each user has only one process, and data is written to the master tableThe data pump export import tool is a new tool for 10G, although they are similar to the previous exp/imp, but they are separate productsData pump export is a tool for uninstalling data and metadata into an operating system file called the dump file set. The data pump import is used to import metadata and data from the dump file set into the target systemThe data pump API accesses its files at the server side rather than at the clientThese tools can also be used to export data in remote databases, or directly from the source database into the target database. This is the network pattern, which is generally useful inimporting data to read-only databasesAt the core of each data pump operation is the master table (Master, table), the table created when the user runs the data pump job. The main table maintains all the convenience of the jobBased on the export documents, the main table is established, wrote dump file in the last step. On the contrary, the main table into the current user,s schema is the first step of the import operation based on the file, also used to create all of the object to be imported in order.The main table is deleted when the data pump operation is completed normallyThe benefits of data pump import and exportData access methodDirect pathappearanceSeparating and reconnecting to long-running jobsRestart the data pump jobFineness object selectionThe specified version of the displayParallel operations (Enterprise Edition)Estimating export job space consumptionNetwork model in a step by step environmentCalculate the tolerance when importingThe data pump automatically determines how the data is accessed. These can be either direct or externalDoes not affect the operation can be separated or re connected to the long running job can keep you from multiple places to monitor operation. All data can stop pump operation in case of missing data restart, although the original enough information isstill not affected. Whether this job is voluntary or not because of the affection of the stop error have Never mind.The exclude, include, and content parameters are used in fineness object screeningYou can create the dump file set for the object you want to move, knowing the version parameters, so that you will be more compatible with the previous version of Oracle to support the data pump. This parameter is reserved for later versionsYou can also use the parallel parameter to specify the maximum number of job server processes to represent the export in the specified activityYou can also use the estimateonly parameter to estimate how much space the export job will consumeThe network mode allows you to export directly from the remote database to the dump file set, which can be connected to the source database through the databaseIn import fit, you can change the names of target data files, schema, and tablespaceOverview of overall implementationThe client process calls the data pump API. Once the job is started, the client does not need it. Multiple clients can connect or disconnect this job for monitoring or princess workAs for the client login to the Oracle database, you create a shadow process. It is the data pump API request service. When is suitable for dbms_datapump. open requests, shadow create jobs, this work mainly includes the creation of master tables created for various communication process AQ objects, create the main control process. Once the operation, the main task shadow usually includes receiving getstatus requests forcustomers. If the client is disconnected, shadow will not.The master control process controls the execution and sequence of the data pump. It maintains the status of the job, the description of the job, the restart of the main table, and the information about the dump file. This process is called DMnn.After receiving the request to startjob, the main process is based on the value of the parallel parameter to create a lot of work process. Working process of the implementation of MCP is requested to work, home is the loading and unloading of metadata and data. The name is DWnn. processIf the appearance path is the access method for loading and unloading data, the worker process coordinates many parallel server processes based on loading and unloading jobs, making it possible to load and unload within partitionsThe data pump direct path needs to be consideredFineness access control tables are available in insert and select modesThe lob class has a domain indexNow there is a watch for clusteredThe global index of the partitioned table has a single partition for loadingColumns of BFILE or opacity typeReferential integrity constraintThere are varray columns embedded with transparent typesThe data pump supports two access accesses to row data on the tableDirect path using direct path API appearanceThe data pump automatically selects the most appropriate access method for each tableWhen a table structure permits it and expects the largest single flow performance, the data pump uses the direct path to load and unload dataThen, if the above condition appears, or the table contains encrypted columns, or the imported table partitions differently when loading and unloading, the data pump moves data using appearance instead of direct pathData pump file locationThere are three types of data pump filesDump filelog filesql filesAbsolute path is not supportedYou must use the Oracle path objectFile priorityPer-file pathDirectory parameterDatapump dir environment variablesThe dump file contains the data and metadata to be migratedThe log file records the information associated with this operationThe SQL file records the output of the sqlfile operationBecause the data pump is server based rather than client-side, the data pump file accesses the relative path of the oracle. For security reasons, the absolute path is not supportedThe per-file path object must be specified for each dump file, the log file, and the SQL file. They are separated by colonsThe data pump imports and exports the client to specify directory objects through the directory parameter. These path objects describe the location of the file to accessYou can define the environment variable data_pump_dir, specify the directory object name instead of the directory parameter。

oracle10g学习总结

oracle10g学习总结

ORACLE学习总结Oracle表空间创建、编辑网页:http://localhost:1158/em1.备份开始——运行——cmd:输入语句:exp userid=yz(数据库用户名)/yz(数据库密码)@orcl(数据库实例名,即全局数据库名)file=e:\yzyx.dmp(要备份数据库的存放位置和存储文件名,是数据文件名,而非表空间名)(grants=y,可有可无) log=e:\yzyx.log(备份数据库时成功或失败的日志,可有可无,记录成功或失败信息)注:该处备份时的用户名和密码是所备份表空间对应用户的用户名和密码;数据文件名可以随便定义;备份之前要确保所备份表空间的用户状态不锁定(UNLOCK);通过运行cmd备份时只能备份在英文文件夹目录下。

2.还原开始——运行——cmd:输入语句:imp userid=hjyx(数据库用户名)/hjyx(数据库密码)@orcl(数据库实例名,即全局数据库名),该处是要还原到的目标库,是一个空库,file=e:\hj.dmp(还原库,把该库数据还原到前面的目标库中)full=y (ignore=y,可有可无) log=e:\yzyx.log(还原数据库时成功或失败的日志,可有可无,记录成功或失败信息)注:该处还原时的用户名和密码是要还原到的表空间对应用户的用户名和密码;在还原之前要先创建好要还原到的目标库(包括表空间<表空间名最好与备份时的原表空间名相同>、用户名和密码)。

3.表空间与数据文件一个表空间有一个或多个数据文件,如果把一些数据入库到包含有多个数据文件的表空间里,那么是同时分配存储在这些数据文件之间的,并且几乎是平均分配存储。

备份时会自动把所有数据文件中的数据共同备份到所定义的数据文件中。

注:数据文件也可以在入库过程中随时添加。

4.表空间与用户一个表空间可以有多个用户,每个用户管理的数据不一样,在入库的时候,可以连接其中一个用户把一部分数据入到里边进行管理,再连接另一个用户把另一部分数据入到里边。

ORACLE 10G OCP笔记

ORACLE 10G OCP笔记

select * from dba_profiles where profile ='TEST_PROFILE';
PROFILE
RESOURCE_NAME
RESOURCE LIMIT
------------------------------ -------------------------------- -------- ---------------------------
未选定行 级联删除已经授予的对象权限
create role ttt; grant create table, create user, create session to ttt with admin option; grant select on test.t to ttt with grant option;
TEST_PROFILE
PASSWORD_GRACE_TIME
PASSWORD DEFAULT
SESSIONS_PER_USER CPU_PER_CALL LOGICAL_READS_PER_CALL CONNECT_TIME IDLE_TIME
用户最大并发会话数 单语句的最大 CPU 时间,超过语句会终止(单位:百分之一秒) 单语句的最大读取数据块数(包括读缓存和物理磁盘),没完成语句终止,数据回滚 连接的最长时间(单位:分钟) 不执行任何数据活动的情况下保持连接的最长时间(单位:分钟)
alter user test profile test_profile;
为用户指定配置文件
show parameter resource_limit
NAME
TYPE
VALUE
------------------------------------ ----------- ------------------------------

Oracle 10g学习笔记

Oracle 10g学习笔记

第一部分:Administration I Study Guide 第一章:10g组成和体系结构目标:✓安装软件确认系统需求使用OFA安装数据库OUI(Oracle Universal Installer)配置用户变量✓创建数据库数据库物理架构数据库内存架构✓实用工具SQLPLUS和ISQLPLUSSQL语句事务关系型数据库中的最重要的概念:表oracle元数据(metadata)的两类视图:数据字典视图(data dictionary views),以DBA_,ALL_,USER_开头。

DBA_TABLES,DBA_USERS,DBA_VIEWS,DBA_TAB_COLUMNS动态性能视图(dynamic performance views),大都以V$开头。

V$DA TABASE,V$VERSION,V$OPTION,V$SQLDBA_CONSTRAINTSDBA_CONS_COLUMNS--主键SQL> alter table t1 add constraint id_pk primary key(id);--外键SQL> create table t2(id number constraint fk_t1_id references t1(id));参照完整性(referential integrity):对有主外键关系的两个表上执行insert/update/delete等操作时均会受到主外键约束的影响。

Segment types:数据库之内凡是消耗物理存储空间的实体,叫做segment。

例如:表、索引、回滚段、分区。

Extents:每类segment组成的大段存储空间,叫做extents。

每一个segment必定至少分配到一个extents上,最多可分配到20亿个extents。

Blocks:组成extent的最小物理空间单位,叫做block。

一个10g数据库可以同时使用多种大小的block作为最基本的存储单元,如2K,4K,8K,16K。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
SQL>startup mount正常启动
SQL>alter database archivelog
SQL>alter database open
SQL>startup nomount丢失恢复启动
SQL>shutdown immediate正常关闭
SQL>shutdown等待关闭
SQL>shutdown transactional等待立即关闭
SQL>DEL 4删除缓存区某一行的命令,比如第四行
SQL>DEL 2 3
SQL>save c:\oracle\test.txt将缓存区中的命令保存到文件中
SQL>get c:\oracle\test.txt获取文件中的命令
SQL>edit 调用记事本编辑刚刚输入的语句
SQL>COLUMN deptno HEADING "编号"为查询的某一列别名显示,或者写成COL方法
SQL>UPDATE aa SET a3='aa';
SQL>SELECT LENGTH(A2),LENCTH(A3) FROM aa;
SQL>SELECT SUBSTR('abcdefg',2,3) FROM dual;
SQL>SELECT SUBSTR('sbcdefg',LENGTH('qbcdefg')-3+1,3) FROM dual;
SQL>SELECT pub,books_name,sum(price*qty) FROM books GROUP BY pubs,books_name;
SQL>SELECT pub,sum(price*qty) FROM books GROUP BY pub,books_name;
SQL>SELECT pub,sum(price*qty) FROM books WHERE price>30 GROUP BY pubs;
SQL>SELECT * FROM aa WHERE a1 LIKE 'a_';
SQL>INSERT INTO abc VALUES('bcd','123')
SQL>UPDATE abc SET b='ttt'
SQL>UPDATE abc b='YYY' WHERE a='abc';
SQL>DELETE FROM abc WHERE a='abc';
SQL>SELECT * FROM abc;
SQL>SELECT * FROM dept;
SQL>exit退出sqlplus模式,退出后缓存中的别名列自动消失
SQL>sqlplus scott/tigger,通过scott方式登录,不需要引号
SQL>COL deptno FORMAT 999,999,999格式化显示
SQL>connect "sys/test1234 as sysdba"通过sysdba查看数据文件的大小,以999,999,999格式显示
SQL>SELECT TO_NUMBER('00333') FROM dual;
4.聚集函数
SQL>SELECT * FROM books
SQL>SELECT max(price) FROM books;
SQL>SELECT min(price) FROM books;
SQL>SELECT sum(price) FROM books;
SQL>SELECT * FROM dept;
SQL>DESCRIBE用于描述一个对象,或者写成DESC
SQL>DESC dept比如描述dept表的结构
SQL>COL dname FORMAT A10为某列格式化显示
Sபைடு நூலகம்L>COL dname FORMAT A1O HEADING "部门名称"
oracle10g笔记
一、oracle数据库结构
服务器参数文件oracle\product\10.1.0\Db_2\database\spfile*.ora
oracle\10.1.0\oradata\
1.参数文件
2.*.CTL 控制文件
3.*.DBF 数据文件
4.*.LOG 日志文件
常用系统函数
1.字符
SQL>SELECT LENGTH('ABCDEF') FROM dual;
SQL>SELECT LTRIM(' ABCDEF') FROM dual;
SQL>SELECT RTRIM('ABCDEF ') FROM dual;
SQL>SELECT TRIM(' ABCDEF ') FROM dual;
SQL>SELECT pub,sum(price*qty) FROM books GROUP BY pub HAVING sum(price)>60;
SQL>SELECT a1,count(a1) FROM aa GROUP BY a1 HAVING COUNT(a1)>1;
模糊查询
SQL>SELECT * FROM aa;
SQL>SELECT a1,nvl(a2,'未输入') a2 FROM aa;对空值处理,填充'未输入'
SQL>SELECT * FROM aa WHERE a2=NULL;
SQL>SELECT * FROM aa ORDER BY a1 ASC;
SQL>SELECT * FROM aa ORDER BY a1 DESC;
SQL>edit c:\oracle\spool.txt用记事本打开spool.txt文件,查看保存是否成功
二、结构化查询语句
1.DDL
CREATE
ALTER
DROP
2.DCL
GRANT
REVOKE
3.DML
SELECT
INSERT
DELETE
UPDATE
SQL>connect scott/tiger
SQL>SELECT DISTINCT a1 FROM aa;
SQL>SELECT ALL a1 FROM aa;
分组语句
SQL>SELECT * FROM books;
SQL>SELECT sum(price*qty) FROM books
SQL>SELECT sum(price*qty) FROM books GROUP BY pubs;
3.转换
SQL>SELECT TO_CHAR(sysdate,'yyyy-mm-dd hh:mi:ss') FROM dual;
SQL>SELECT TO_CHAR(sysdate,'yyyy-mm-dd hh24:mi:ss') FROM dual;
SQL>SELECT TO_DATE('12-3月-04') FROM dual;
SQL>shutdown abort强制关闭
SQL>help index查看sqlplus帮助命令
SQL>SELECT * FROM dept;
SQL>SET SQLBLANKLINES ON设置sqlplus行输入连接为开
SQL>SELECT * FROM dept WHERE deptno=&tt设置输入参数
查询pub列名称相同的books_name的统计结果,显示为计数
SQL>spool c:\oracle\spool.txt将查询结果保存到文件中,表示开始点
以下是要查询保存的语句,将查询结果保存到spool.txt中
SQL>SELECT * FROM books;
SQL>spool off表示查询结果保存结束点
SQL>connect tt/tt11;
SQL>connect scott/tiger;
SQL>SELECT * FROM e;
SQL>SELECT SUM(DECODE(SEX,'男',1,0)) 男人数,SUM(DECODE(SEX,'女',1,0) 女人数 FROM e;判断计数,为真加1,否则加零
5.大共享池
6.固定SGA
ORACLE逻辑结构
表空间tablespace(块block、盘区extent、段segment)
表空间tablespace(数据文件datafile)
二、sqlplus的使用方法
isqlplus打开方式http://主机名:oracle访问端口/isqplus
c:\>sqlplus "sys/password as sysdba"登录系统
SQL>DESC v$controlfile描述控制文件
SQL>SELECT status,name FROM v$controlfile查看控制文件
SQL>DESC v$datafile描述数据文件
相关文档
最新文档