标签:
2015-10-09
-------------------------------------------
第01章 oracle数据库基础
SQL语言
1.DDL(Data Definition Language)数据定义语言
create,alter,drop
rename
truncate
grant,revoke
audit,noaudit
comment
2.DML(Data Manipulation Language)数据操作语言
select
insert
update
merge
delete
explain plan
lock table
3.DCL(Data Control Language)数据控制语言
commit
rollback
savepoint
set transaction
alter session
set role
alter system
declare cursor,open,close
declare database,connect
declare statement
describe
whenever
prepare,execute,execute immediate
fetch
----------------------------------------
第02章 oracle数据库连接
sqlplus 用户名/密码 as 角色
sqlplus sys/oracle as sysdba
sqlplus scott/tiger as sysdba
查看当前数据库名
SQL> select name from v$database;
-----------------------------------------
第03章 数据库的启动与关闭
数据库启动到NOMOUNT状态
$sqlplus / nolog
SQL> connect / as sysdba
SLQ> startup
查看告警追踪文件位置
SQL> show parameter background_dump_dest;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
background_dump_dest string /u01/app/oracle/diag/rdbms/orc
l/orcl/trace
查看控制文件是否打开
SQL> select * from v$controlfile;
STATUS
-------
NAME
--------------------------------------------------------------------------------
IS_ BLOCK_SIZE FILE_SIZE_BLKS
--- ---------- --------------
/u01/app/oracle/oradata/orcl/control01.ctl
NO 16384 594
/u01/app/oracle/flash_recovery_area/orcl/control02.ctl
NO 16384 594
STATUS
-------
NAME
--------------------------------------------------------------------------------
IS_ BLOCK_SIZE FILE_SIZE_BLKS
--- ---------- --------------
查看控制文件位置
SQL> show parameter control_files;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files string /u01/app/oracle/oradata/orcl/c
ontrol01.ctl, /u01/app/oracle/
flash_recovery_area/orcl/contr
ol02.ctl
SQL> select * from scott.dept;
DEPTNO DNAME LOC
---------- -------------- -------------
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON
标签:
原文地址:http://www.cnblogs.com/cenliang/p/4863934.html