文章分类 -  Oracle的技术记录

oracle for语句
摘要:begindeclare cursor cur is select menu_code,menu_en,id from t_bd_menu where menu_name in ('员工请假申请','员工加班申请','每月考勤表','上岗通知单','员工入职面谈申请','员工转正满意度调查','员... 阅读全文

posted @ 2014-09-18 17:06 R.Ray 阅读(146) 评论(0) 推荐(0)

oracle OEM Database Control手动配置(监控单个实例的性能等)
摘要:一、删除原来的(emca -repos drop)二、重新配置(emca -repos create)三、创建Database Control(emca -config dbcontrol db)注意:1、单机用户适用:增加操作系统环境变量:ORACLE_HOSTNAME=localhost2、服务器适用:在listener.ora中增加对BlueAeri-PC或ip地址的侦听https://localhost:5500/em 阅读全文

posted @ 2013-06-12 15:53 R.Ray

oracle 变量和值
摘要:一、DEFINE和UNDEFINE命令1.DEFINE dept=finance(定义变量)2.UNDEFINE dept(删除变量)二、REM 不执行当前行的sql语句三、L和Get1.L显示之前执行的缓冲区sql语句2、GET status.sql显示这个脚本的内容3、GET on_script.sql@check.sql@crate_table.sql把两个脚本连接到一个脚本 阅读全文

posted @ 2013-06-11 18:24 R.Ray

创建windows的批处理脚本 test.bat可以执行计划任务每天执行
摘要:sqlplus username/password@connect_identifier @C:\temp\testscript.sqlnotepad.exe C:\temp\output.txt 阅读全文

posted @ 2013-06-11 17:00 R.Ray

oracle sqlplus
摘要:一、记录数据错误表:1. show errorloggingerrorlogging is OFF(表示记录错误未开启)2.开启记录数据库错误数据(要先连接数据库)set errorlogging on;3.查看错误记录的表(sperrorlog),错误包括sql语句 如果有select username,statement,message from sperrorlog;二、sqlplus CLEAR SCR(清屏)三、SCORE 命令1、STORE SET mysqlplus.sql(创建存放当前环境的变量)2、START mysqlplus.sql(复原所有系统变量的已存储的值)四、SH 阅读全文

posted @ 2013-06-11 16:56 R.Ray

oracle 创建表分区
摘要:以system身份登陆数据库,查看 v$option视图,如果其中Partition为TRUE,则支持分区功能;否则不支持。dba_segments bytes 查看表多大 10g左右算大,3000w数据。分区主要解决查询和维护功能。io情况 1次io 128块 io花费10ms分区条件:当表达到GB大小且继续增长需要将历史数据和当前的数据分开单独处理,比如历史数据仅仅需要只读,而当前数据则实现DML。共性:不同的分区之间必须有相同的逻辑属性,比如表名,列名,数据类型,约束等。个性:各个分区可以有不同的物理属性,比如pctfree, tablespaces.a分区坏了,不影响b分区使用也就是即 阅读全文

posted @ 2013-05-18 22:50 R.Ray

oracle体系结构
摘要:1、oracle内存由SGA+PGA所构成2、oracle数据库体系结构数据库的体系结构是指数据库的组成、工作过程与原理,以及数据在数据库中的组织与管理机制。SGA:系统全局区(SYSTEM GLOBAL AREA) 数据库信息存在SGA,由多个数据库进程共享。SGA包含:共享池,数据缓冲区,日志缓冲区,Large池,Stream池,java池 阅读全文

posted @ 2013-05-12 15:52 R.Ray

Oracle导入导出
摘要://创建表空间create tablespace erp_dataloggingdatafile 'E:\ERPDataBase\erpdata\erp_data.dbf' size 32m autoextend on next 32m maxsize 10240mextent management local;//创建用户create user strongerp identified by 123456(密码)default tablespace erp_data;//temporary tablespace test_temp;//给用户授予权限grant connect 阅读全文

posted @ 2013-05-06 12:46 R.Ray

oracle学习
摘要:sqlplus /nologshutdown abortstartupstartup force 重启(不管之前的 都强制重启一次)scope-both等等命令oracle not available错误:SQLPLUS /NOLOGCONN / AS SYSDBA;STARTUPconnect /as sysdba;con scott/tiger as sysdba;as sysdba 就是以sysdba登录,oracle登录身份有三种:normal 普通身份sysdba 系统管理员身份sysoper 系统操作员身份每种身份对应不同的权限sysdba权限:●启动和关闭操作●更改数据库状态为打 阅读全文

posted @ 2013-05-04 22:00 R.Ray

Oracle
摘要:重新命名关键字:alter table T_HR_RE_CHECKINDTLS rename column "LEVEL" to LEVELS;创建触发器:1、创建序列 Sequences2、create or replace trigger Trg_T_BD_MENUbefore insert on T_BD_MENU for each rowbegin select sq_csp_t_bd_menu.nextval into :new.ID from dual; end; 阅读全文

posted @ 2013-04-01 10:02 R.Ray

导航