摘要: 做数据库开发或管理的人经常要创建大量的测试数据,动不动就需要上万条,如果一条一条的录入,那会浪费大量的时间,本文介绍了Oracle中如何通过一条 SQL快速生成大量的测试数据的方法。产生测试数据的SQL如下:SQL> select rownum as id, 2 to_char(sysdate + 阅读全文
posted @ 2018-05-03 13:49 钱若梨花落 阅读(585) 评论(0) 推荐(0) 编辑
摘要: 1.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引。2.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如:select id from t where num is null可以在num 阅读全文
posted @ 2018-05-03 13:45 钱若梨花落 阅读(10139) 评论(0) 推荐(1) 编辑
摘要: 1.定时任务--当前月的前一个月的当前日期 05 20 1 * * /bin/sh /home/oracle/truncate_partition.sh &> /dev/null05 20 11 * * /bin/sh /home/oracle/truncate_partition.sh &> /d 阅读全文
posted @ 2018-04-26 12:36 钱若梨花落 阅读(286) 评论(0) 推荐(0) 编辑
摘要: [oracle@test ~]$ cat /home/oracle/copy_statics.sh #!/bin/bashsource /home/oracle/.bash_profileSDATE=$(date +%Y%m)TDATE=$(date -d 'next-month' +%Y%m)SP 阅读全文
posted @ 2018-04-25 11:28 钱若梨花落 阅读(658) 评论(0) 推荐(0) 编辑
摘要: 注册码: Product Code:4t46t6vydkvsxekkvf3fjnpzy5wbuhphqzserial Number:601769 password:xs374ca 阅读全文
posted @ 2018-04-25 11:15 钱若梨花落 阅读(136) 评论(0) 推荐(0) 编辑
摘要: Linux下命令行安装weblogic10.3.6 一、安装前准备工作: 1、创建用户useradd weblogic;创建用户成功linux系统会自动创建一个和用户名相同的分组,并将该用户分到改组中。并会在/home路径下创建一个和用户名相同的路径,比如我们创建的weblogic。 注:当然,你也 阅读全文
posted @ 2018-04-25 11:12 钱若梨花落 阅读(536) 评论(0) 推荐(0) 编辑
摘要: ORA-12532:TNS:无效参数 在实例安装到50%的时候ORA-12532的错误。 原因: sys密码中包含‘@’字符引起的。重新设置,通过。 阅读全文
posted @ 2018-04-25 11:10 钱若梨花落 阅读(791) 评论(0) 推荐(0) 编辑
摘要: 1.shell脚本的方式 index_re.sh sqlplus / as sysdba <<EOF spool /tmp/i.sql rep select 'alter index '||owner||'."'||index_name||'" rebuild;' from dba_indexes 阅读全文
posted @ 2018-04-25 11:05 钱若梨花落 阅读(302) 评论(0) 推荐(0) 编辑
摘要: 触发器 创建中间插入的表 create table session_history tablespace bap_data as (select sid,username,program,machine,'000.000.000.000'ipadd,sysdate moditime from v$s 阅读全文
posted @ 2018-04-24 17:16 钱若梨花落 阅读(1235) 评论(0) 推荐(0) 编辑
摘要: 触发器 创建中间插入的表 create table session_history tablespace bap_data as (select sid,username,program,machine,'000.000.000.000'ipadd,sysdate moditime from v$s 阅读全文
posted @ 2018-04-24 15:06 钱若梨花落 阅读(130) 评论(0) 推荐(0) 编辑