2017年8月19日

17.08.18

摘要: flashback 功能 依赖组件 相关参数 典型错误 query undo tbs undo_retention dml version query undo tbs undo_retention dml flashback table undo tbs undo_retention dml fl 阅读全文

posted @ 2017-08-19 09:19 zhang_x 阅读(159) 评论(0) 推荐(0) 编辑

17.08.17

摘要: 控制文件 丢失部分控制文件: SQL> select * from v$controlfile; $ >/u01/app/oracle/oradata/orcl/control01.ctl SQL> select * from v$tablespace; 报错 SQL> alter system c 阅读全文

posted @ 2017-08-19 09:18 zhang_x 阅读(135) 评论(0) 推荐(0) 编辑

17.08.16

摘要: 数据文件 Restore(恢复数据文件) Recover(写日志) 1. redo(roll forward) 2. undo(roll back) RPO/RTO 数据文件: 不归档方式下丢失一个数据文件: SQL> archive log list 备份前工作: SQL> create tabl 阅读全文

posted @ 2017-08-19 09:17 zhang_x 阅读(115) 评论(0) 推荐(0) 编辑

17.08.15

摘要: RMAN备份 不归档 归档 online offline online offline 完全 部分 完全 部分 完全 部分 完全 部分 shutdown nomount mount open 备份数据文件: 1.全数据库备份,部分备份 2. 联机备份(热备份)<数据库开启,一致性有差别>,脱机备份( 阅读全文

posted @ 2017-08-19 09:11 zhang_x 阅读(98) 评论(0) 推荐(0) 编辑

17.08.12

摘要: 调度作业 $ ps -ef | grep cjq SQL> show parameter job_queue_processes 后台预先设置的自动化管理作业: 自定义作业: SQL> create table session_history(snap_time timestamp with loc 阅读全文

posted @ 2017-08-19 09:10 zhang_x 阅读(98) 评论(0) 推荐(0) 编辑

17.08.11

摘要: 死锁: session1: SQL> select * from t1; X 1 2 SQL> update t1 set x=11 where x=1; session2: SQL> update t1 set x=22 where x=2; session1: SQL> update t1 se 阅读全文

posted @ 2017-08-19 09:08 zhang_x 阅读(163) 评论(0) 推荐(0) 编辑

17.08.09

摘要: 用户管理 AAA: Authentication: 身份验证 Authorization: 权限管理 Audition: 审计 authentication user 用户 schema 模式 预定义的系统用户: SQL> select USERNAME, ACCOUNT_STATUS from d 阅读全文

posted @ 2017-08-19 09:04 zhang_x 阅读(97) 评论(0) 推荐(0) 编辑

17.08.08

摘要: Oracle NET 1.客户端通过@ora10g的名字去tnsname.ora文件获取服务器的具体连接信息 2.客户端通过tnsname.ora中的描述向服务器发出链接请求服务器端 3.服务器的监听器接收到连接请求后,验证请求的服务的有效性 4.服务器端产生一个服务进程和客户端进程建立连接 查看会 阅读全文

posted @ 2017-08-19 09:01 zhang_x 阅读(84) 评论(0) 推荐(0) 编辑

17.08.07

摘要: 查询预定义表空间: SQL> select TABLESPACE_NAME,CONTENTS from dba_tablespaces; SQL> select FILE_NAME, TABLESPACE_NAME from dba_data_files; SYSTEM 系统表 SYSAUX 系统辅 阅读全文

posted @ 2017-08-19 08:58 zhang_x 阅读(89) 评论(0) 推荐(0) 编辑

17.08.04

摘要: 实例管理 监听 启动监听: $ netstat -tlnp | grep 1521 $ lsnrctl LSNRCTL> help $ lsnrctl status $ lsnrctl stop $ netstat -tln | grep 1521 快速动态注册:(可选) $ sqlplus / a 阅读全文

posted @ 2017-08-19 08:54 zhang_x 阅读(91) 评论(0) 推荐(0) 编辑

17.08.03

摘要: oracle管理 体系结构 SGA: 大的缓冲区 $ sqlplus / as sysdba SQL> show sga 显示sga的设置 SQL> show parameter sga_max_size 查看系统里面初始化参数 SQL> select * from V$SGAINFO; 动态性能视 阅读全文

posted @ 2017-08-19 08:51 zhang_x 阅读(93) 评论(0) 推荐(0) 编辑

17.08.02

摘要: instead of trigger视图触发器 replace 序列: SQL> create sequence test_seq increment by 1 start with 1 maxvalue 1000 nocycle cache 20; SQL> create table t1(x i 阅读全文

posted @ 2017-08-19 08:49 zhang_x 阅读(79) 评论(0) 推荐(0) 编辑

17.08.01

摘要: 集合操作 当列的数量和列的数值类型,要完全一致, 不能确定的时候,要用null和数值类型函数来确定 select employee_id, job_id from employees union all select employee_id, job_id from job_history; sel 阅读全文

posted @ 2017-08-19 08:46 zhang_x 阅读(110) 评论(0) 推荐(0) 编辑

17.07.29 分组函数 多表连接 子查询

摘要: 分组函数: 将得到的原始数据进行进一步的处理 count 对非空的数值做统计 只有 count(*) 不去除空值 处理过程: select From from where group by sum having 阅读全文

posted @ 2017-08-19 08:39 zhang_x 阅读(77) 评论(0) 推荐(0) 编辑

17.7.31

摘要: 有员工的部门名称; SQL> select department_name from departments where department_id in(select department_id from employees where department_id is not null); (i 阅读全文

posted @ 2017-08-19 08:39 zhang_x 阅读(73) 评论(0) 推荐(0) 编辑

17.07.26 Oracle安装

摘要: 修改主机名: 在root用户下, hostname node1.test.com vi /etc/sysconfig/network vi /etc/hosts vi ~oracle/.bash_profile $ netca 监听 $ lsnrctl status 监听状态 $ netstat - 阅读全文

posted @ 2017-08-19 08:38 zhang_x 阅读(62) 评论(0) 推荐(0) 编辑

17.07.28 SQL 函数

摘要: 排序:order by SQL> select last_name, salary from employees order by salary; 默认升序 SQL> select last_name, salary from employees order by salary desc; 降序 S 阅读全文

posted @ 2017-08-19 08:38 zhang_x 阅读(95) 评论(0) 推荐(0) 编辑

17.07.25 Linux8 任务计划

摘要: ps aux tty为 “?” 说明为后台进程 ps -ef | grep …… ps -fu root top M P q 退出 * 杀死进程 kill -l sleep 999& ps -ef | grep sleep pstree 21763(sleep的父进程pid) * 任务计划 serv 阅读全文

posted @ 2017-08-19 08:38 zhang_x 阅读(100) 评论(0) 推荐(0) 编辑

导航