摘要:
Server.MapPath specifies the relative or virtual path to map to a physical directory. Server.MapPath(".") returns the current physical directory of the file (e.g. aspx) being executed Server.MapPath(... 阅读全文
随笔档案-2011年06月
Dingjun123:DBMS_PROFILER
2011-06-28 16:35 by Tracy., 310 阅读, 收藏, 编辑
摘要:
DECLARE ReturnCode BINARY_INTEGER; BEGIN ReturnCode := DBMS_PROFILER.start_profiler ('Profiler Demo 2'); nocopy_test.test_copy (400, 1); ReturnCode := DBMS_PROFILER.stop_profiler; DBMS_OUTPUT.put_lin... 阅读全文
Asktom:Single Block IO Vs Multi Block IO
2011-06-28 15:31 by Tracy., 480 阅读, 收藏, 编辑
摘要:
You Asked Tom: I was reading this Oracle magazine http://www.oracle.com/technetwork/issue-archive/2011/11-jul/o40asktom-402616.html <quote> A full index scan reads the index a block at a time, from s... 阅读全文
设置会话TRACE的方法(二)
2011-06-28 13:19 by Tracy., 337 阅读, 收藏, 编辑
摘要:
很多时候需要设置会话的SQL_TRACE,以便于分析,简单总结一下设置的方法和适用的情况。 这一篇介绍设置其他会话SQL_TRACE的方法。 设置会话TRACE的方法(一):http://yangtingkun.itpub.net/post/468/519830 Oracle10g新增DBMS_MONITOR包(一):http://yangtingkun.itpub.net/post/468/4... 阅读全文
设置会话TRACE的方法(一)
2011-06-28 13:18 by Tracy., 468 阅读, 收藏, 编辑
摘要:
很多时候需要设置会话的SQL_TRACE,以便于分析,简单总结一下设置的方法和适用的情况。 这一篇介绍设置当前会话SQL_TRACE的方法。 DBMS_SESSION包小议(五):http://yangtingkun.itpub.net/post/468/498559 最显而易见的方法设置SQL_TRACE参数: SQL> ALTER SESSION SET SQL_TRACE = TRUE; 会... 阅读全文
Oracle10g新增DBMS_MONITOR包(一)
2011-06-28 13:16 by Tracy., 766 阅读, 收藏, 编辑
摘要:
在10g中,Oracle新增了DBMS_MONITOR包,使得用户可以更加方便的设置TRACE和统计信息。 这一篇介绍TRACE相关的过程。 DBMS_MONITOR包中提供了多种方法来开启、关闭会话或整个实例的TRACE。 除了最常用的通过会话的SID和SERIAL#进行设置的SESSION_TRACE_ENABLE/SESSION_TRACE_DISABLE外,还包括设置数据库实例上所有会话的... 阅读全文
转itpub:DBMS_SESSION包小议(五)
2011-06-28 13:14 by Tracy., 437 阅读, 收藏, 编辑
摘要:
除了使用ALTER SESSION设置会话的状态,利用V$SESSION查询会话状态,Oracle还提供了PL/SQL接口DBMS_SESSION来查询和设置会话相关的状态。 描述用来设置TRACE的SET_SQL_TRACE、SESSION_TRACE_ENABLE和SESSION_TRACE_DISABLE过程。 DBMS_SESSION包小议(一):http://yangtingkun.i... 阅读全文
Oracle:index fast full scan VS. index skip scan (未解决)
2011-06-28 11:31 by Tracy., 1057 阅读, 收藏, 编辑
摘要:
index fast full scan VS. index skip scan index fast full scan VS. index skip scan SELECT count(*) FROM TNOTNDB.sysindexes WHERE id = tnotndb.object_id('TNOTNDB..tCustomerUser') AND name = 'idx_tCusto... 阅读全文
Oracle :Parallel execution when table created.
2011-06-28 11:18 by Tracy., 358 阅读, 收藏, 编辑
摘要:
You Asked I was a bit surprised to notice in my development environment a couple of months, a large number of sessions that were invoking parallel operations, especially since I made sure to set all ... 阅读全文
C#操作Oracle BLOB字段的写入读取方法
2011-06-24 17:21 by Tracy., 1094 阅读, 收藏, 编辑
摘要:
1.写入BLOB string file_name = "D:\\20080523.jpg"; string conn_str = "Provider=OraOLEDB.Oracle.1;Password=agoodjob;Persist Security Info=True;User ID=ams;Data Source=ims;Extended Properties=";//Provider... 阅读全文
Oracle 10g: UTL_MAIL
2011-06-24 17:08 by Tracy., 338 阅读, 收藏, 编辑
摘要:
UTL_MAIL The UTL_MAIL package provides a simple API to allow email to be sent from PL/SQL. In prior versions this was possible using the UTL_SMTP package (shown here), but this required knowledge of t... 阅读全文
Oracle10g :Nested Table Enhancements
2011-06-24 17:03 by Tracy., 225 阅读, 收藏, 编辑
摘要:
Nested Table Enhancements Nested tables in PL/SQL now support more operations than before. Collections can be assigned directly to the value of another collection of the same type, or to the result of... 阅读全文
FORALL Support for Non-Consecutive Indexes (Sparse Collections)
2011-06-24 16:58 by Tracy., 267 阅读, 收藏, 编辑
摘要:
Oracle 10g introduces support for the FORALL syntax with non-consecutive indexes in collections. The INDICES OFclause allows the FORALL syntax to be used with sparse collections, while the VALUE OF cl... 阅读全文
Adaptive Cursor Sharing in Oracle Database 11g Release 1
2011-06-24 16:47 by Tracy., 263 阅读, 收藏, 编辑
摘要:
Adaptive Cursor Sharing in Oracle Database 11g Release 1 DBAs are always encouraging developers to use bind variables, but when bind variables are used against columns containing skewed data they som... 阅读全文
CTM天赋模拟图
2011-06-24 12:34 by Tracy., 1810 阅读, 收藏, 编辑
摘要:
FZ WQZ FQ NQ FS-火 FS-奥 DZ-刺杀 DZ-刺杀 MS- 戒律 MS-暗牧 NS 元素S 冰双手DK 血坦DK 阅读全文
CTM4.1几个职业若干改动
2011-06-23 14:28 by Tracy., 1690 阅读, 收藏, 编辑
摘要:
圣骑士 · 圣骑士获得了新的能量资源条。 · 驱邪术的伤害大概提高了50%。 · 圣光普照对离开圣骑士8码以外的目标效果降低了。 · 真理圣印:谴罚的持续性伤害降低25%。 · 力量祝福和王者祝福的法力值消耗被提高约217%,让它们与野性印记的法力值消耗大致相当。 · 十字军打击造成135%武器伤害,而不再只是115%武器伤害。 · 神圣之光的法力值消耗提高了大约10%。 · 现在神圣恳求持续9秒... 阅读全文
转:创新工场CE0李开复:互联网创业黄金时代来临
2011-06-20 09:19 by Tracy., 250 阅读, 收藏, 编辑
摘要:
6月15日消息,创新工场董事长李开复今日在腾讯合作伙伴大会上表示,互联网创业黄金时代已经来临,创业成本从来没有这么低过。 李开复指出,一方面是用户获取门槛降低,在中国,创业者可以用QQ、Q+这样的方式,更容易吸引让用户。另一方面,创业者不再需要去雇销售团队,放到网上就可以销售,就可以直接分成。此外,过去拉投资非常困难,但现在只要有真实的互联网创业想法,像创新工场这类企业就可以很快帮助创业者获得资... 阅读全文
B*Tree indexes
2011-06-17 14:29 by Tracy., 280 阅读, 收藏, 编辑
摘要:
B*Tree, or what I call 'conventional', indexes are the most commonly used type of indexing structure in the database. They are similar in implementation to a binary search tree you might have learned... 阅读全文
Oracle:Materialized Views
2011-06-17 13:41 by Tracy., 1429 阅读, 收藏, 编辑
摘要:
Types of Materialized Views The SELECT clause in the materialized view creation statement defines the data that the materialized view is to contain. There are only a few restrictions on what may be s... 阅读全文
利用递归WITH子查询进行优化的实例
2011-06-16 17:29 by Tracy., 749 阅读, 收藏, 编辑
摘要:
利用递归WITH子查询进行优化的实例 递归WITH子查询我已经用过不少了,不过都是当作玩具,没有在实践中用过。昨天碰到了一个实用例子。 在一个OLTP中有一张表,主键是随着创建时间递增的。每天产生大约1万条记录,全表大约有几百万,没有分区,创建时间没有索引。 现在要求取出最近两天的数据并且从中过滤出部分记录。过滤条件上也没有索引。 原来的查询为全表扫描,效率太低,有没有办法改善?前提:因为原表索... 阅读全文
Oracle Clusters
2011-06-16 17:02 by Tracy., 445 阅读, 收藏, 编辑
摘要:
A cluster is a schema object that contains one or more tables that all have one or more columns in common. Rows of one or more tables that share the same value in these common columns are physically s... 阅读全文
Dingjun123 :使用Partitioned Outer Join实现稠化报表
2011-06-16 15:22 by Tracy., 405 阅读, 收藏, 编辑
摘要:
使用Partitioned Outer Join实现稠化报表 作者:丁俊(dingjun123) 背景介绍:在数据库表中,存储的数据经常是稀疏数据(sparse data),而不是稠密数据(dense data)。先来了解一下什么是稀疏数据,比如一个产品销售情况表(比如有产品名、销售时间(精确到年月)、销售量3个列),假设某个时间某些产品它没有销售,一般也不会将这些产品的销售量存储为0,而是不存... 阅读全文
What are the difference between DDL, DML and DCL commands?
2011-06-16 10:08 by Tracy., 290 阅读, 收藏, 编辑
摘要:
DDL Data Definition Language (DDL) statements are used to define the database structure or schema. Some examples: CREATE - to create objects in the database ALTER - alters the structure of the databas... 阅读全文
正则表达式使用一例
2011-06-16 08:58 by Tracy., 360 阅读, 收藏, 编辑
摘要:
如何用正则表达式实现这样的需求 通过wm_concat()函数得到了这样的结果: '014,014,018,022,317,319,023,021' 如何继续排序和去重复呢? 期望结果:'014,018,021,022,023,317,319' 测试数据: select '014,014,018,022,317,319,023,021' from dual; wm_concat集合函数在plsq... 阅读全文
ITPUB:字符串去冗余
2011-06-15 17:11 by Tracy., 356 阅读, 收藏, 编辑
摘要:
字符串去冗余,请教 有字符串'ABCD6F6CAAX' 要求得到 'ABCD6FX' 即对于重复的字符,只保留一个 谢谢 -------------------------------Answers----------------------------------------------------------- 1. scott@SZTYORA> CREATE OR REPLACE FUNCT... 阅读全文
ITPUB:求一段字符串截取的Pl/sql
2011-06-15 17:01 by Tracy., 974 阅读, 收藏, 编辑
摘要:
求一段字符串截取的Pl/sql 小弟做java开发的,对ORACLE pl/sql不甚了解,现项目中需要用一段函数,求各位大侠帮忙,感激不尽! 现有一 项目参与人的字段PROJECT_IN_PEOPLE 字符类型,里面存储的内容如下: CP860040,SAL67,CP690041 存的是对应人员的ID号码,因为人员数量不确定, 有可能没有, 有可能一个或者多个, 现在页面上显示的也是ID号码,... 阅读全文
反向索引去汉字符号
2011-06-15 16:50 by Tracy., 282 阅读, 收藏, 编辑
摘要:
select translate('+861059602775(总机)','\'||translate('+861059602775(总机)','0123456789','\'),'\') from dual 阅读全文
转ITPUB:Oracle多层级查询兼容的性能问题
2011-06-15 16:49 by Tracy., 369 阅读, 收藏, 编辑
摘要:
我们在写plsql的时候,由于外部条件的复杂性,在调用接口时,需要考虑到不同层次查询的需求。以购买基金为例,有账户编号、份额类别、基金代码,其中一个账户下有多个份额类别的基金。 假设有两个表: accoinfo: 账户信息表。有客户编号和基金帐号 tradeinfo: 交易信息表。有基金帐号、份额类别、基金代码、交易日期、交易金额、备注字段 其中,在账户信息表的客户编号字段和交易信息的基金帐号字段... 阅读全文
ITPUB上关于Oracle正则表达式的博文
2011-06-15 14:47 by Tracy., 664 阅读, 收藏, 编辑
摘要:
Oracle 8 和Oracle 9i中缺乏灵活性的SQL 正则表达式最终在Oracle 10g中得到了解决。Oracle 数据库目前内建了符合POSIX 标准的正则表达式。 四个新的函数分别是:REGEXP_LIKE、REGEXP_INSTR、REGEXP_SUBSTR、和EGEXP_REPLACE。它们在用法上与 Oracle SQL 函数LIKE、INSTR、SUBSTR 和REPLACE 用法,但是它们使用POSIX 正则表达式代替了老的百分号(%)和通配符(_)字符。 POSIX 正则表达式由标准的元字符(metacharacters)所构成: '^' 表示字符串的开 阅读全文
oracle的正则表达式
2011-06-15 14:22 by Tracy., 675 阅读, 收藏, 编辑
摘要:
必须明白的是,oracle的正则表达式和其它的语言的并不是完全一样。 oracle支持以下标准的正则表达式: IEEE Portable Operating System Interface (POSIX) standard draft 1003.2/D11.2Unicode Regular Expression Guidelines of the Unicode ConsortiumExtends the matching capabilities for multilingual data beyond what is specified in the POSIX standard(即p. 阅读全文
如何用正则取美国人名.
2011-06-15 11:06 by Tracy., 809 阅读, 收藏, 编辑
摘要:
类似”Celmer,Kenneth Raymond”,"Cockrell Jr,Robert Charles”,"St John,Michael Raymond”需要取出颠倒然后用空格分隔取出第一个名字“Kenneth Celmer”,”Robert Cockrell”,”Michael St’。通过ITPUB高手指点,可用如下代码实现。SELECT name full_name, REGEXP_REPLACE(name,'\s*(\S+)[^,]*\,+\s*(\S+)[^,]*','\2 \1') name, userid usernam 阅读全文
Using Regular Expressions in Oracle Database
2011-06-14 16:53 by Tracy., 490 阅读, 收藏, 编辑
摘要:
4 Using Regular Expressions in Oracle DatabaseThis chapter introduces regular expression support for Oracle Database. This chapter covers the following topics:Using Regular Expressions with Oracle Database: OverviewRegular Expression Metacharacters in Oracle DatabaseUsing Regular Expressions in SQL 阅读全文
转yangtingkun小议Oracle外键约束修改行为
2011-06-09 16:21 by Tracy., 803 阅读, 收藏, 编辑
摘要:
---------------------------------------Part A------------------------------------------------------------ Oracle的外键用来限制子表中参考的字段的值,必须在主表中存在。而且在主表的记录发生变化导致外键参考唯一约束值发生了变化时,定义了一系列的动作。 在SQL92标准中定义了几种外键改变后,... 阅读全文
PL/SQL Enhancements in Oracle Database 10g
2011-06-09 14:18 by Tracy., 367 阅读, 收藏, 编辑
摘要:
Oracle 10g includes many PL/SQL enhancements including: PL/SQL Native Compilation FORALL Support for Non-Consecutive Indexes (Sparse Collections) New IEEE Floating-Point Types Improved Overloading Wi... 阅读全文
使用Oracle在线重定义包 DBMS_REDEFINITION 在不停业务的情况下增加或修改字段
2011-06-09 14:02 by Tracy., 1008 阅读, 收藏, 编辑
摘要:
--原表的定义语句, 做在线重定义之前, 记得先把原表定义语句先取出来备用, 可以从toad里取得. ALTER TABLE U_TEST.CARD_TEST DROP PRIMARY KEY CASCADE; DROP TABLE U_TEST.CARD_TEST CASCADE CONSTRAINTS; CREATE TABLE U_TEST.CARD_TEST ( CARD_NO VAR... 阅读全文
Oracle 11g: DBMS_PARALLEL_EXECUTE
2011-06-09 13:49 by Tracy., 1390 阅读, 收藏, 编辑
摘要:
DBMS_PARALLEL_EXECUTE The DBMS_PARALLEL_EXECUTE package allows a workload associated with a base table to be broken down into smaller chunks which can be run in parallel. This process involves several... 阅读全文
Commit Enhancements in Oracle 10g Database Release 2
2011-06-09 13:28 by Tracy., 241 阅读, 收藏, 编辑
摘要:
Commit Enhancements in Oracle 10g Database Release 2 In Oracle 10g Release 2 the COMMIT command has been enhanced with the WRITE clause to give a degree of control over the way redo information is wri... 阅读全文
Partitioning Enhancements in Oracle Database 11g Release 1
2011-06-09 13:12 by Tracy., 348 阅读, 收藏, 编辑
摘要:
Partitioning Enhancements in Oracle Database 11g Release 1 This article uses simple examples to describe the partitioning enhancements in Oracle 11g Release 1. Extended Composite Partitioning Interval... 阅读全文
Online Table Redefinition Enhancements in Oracle Database 11g Release 1
2011-06-09 13:00 by Tracy., 414 阅读, 收藏, 编辑
摘要:
Online Table Redefinition Enhancements in Oracle Database 11g Release 1 By default, online table redefinitions no longer invalidate dependent objects (PL/SQL, views, synonyms etc.), provided the redef... 阅读全文
关羽(162-219)
2011-06-02 14:45 by Tracy., 369 阅读, 收藏, 编辑
摘要:
关羽(162-219),字云长,本字长生,并州河东解县人(今山西运城市),汉族。一直是历来民间崇祀的对象,三国时期蜀汉著名将领,前将军,汉寿亭侯,军事家。死后受民间推崇,又经历代朝廷褒封,被人奉为关圣帝君,佛教称为伽蓝菩萨,尊称为“关公”。被后来的统治者崇为“武圣”,与号为“文圣”的孔子齐名。此外,关羽还被台湾同胞视为恩主神,日本也有关羽崇拜者。 关羽字云长,本字长生,河东解人也。亡命奔涿郡。先主... 阅读全文
ITPUB:按道理应该走的局部分区索引
2011-06-02 13:48 by Tracy., 310 阅读, 收藏, 编辑
摘要:
从400万行记录的1个分区中进行查询10行记录,为什么不走局部索引? 分区表,从400万行记录中取出10行记录,为什么没有走索引? 目前情况: windows2003系统, 11gR1版本。 1, 设计rece为分区表,其中的gpsdate上建立了list分区, '20100501'对应的分区名是“P_20100501”,这个分区的记录约为400万行。 数据情况如下: SQL> select co... 阅读全文
如何切换用户到不同用户Session上
2011-06-02 09:56 by Tracy., 1420 阅读, 收藏, 编辑
摘要:
CREATE OR REPLACE PACKAGE BODY TMS.SESSION_TMS AS PROCEDURE SESSION_TMS (STATUS VARCHAR2) IS tmpVar VARCHAR2 (3); present_schema VARCHAR2 (10); present_user VARCHAR2 (10); mesg VARCHAR2 (300); ... 阅读全文
Oracle 高水位(HWM)
2011-06-02 09:16 by Tracy., 965 阅读, 收藏, 编辑
摘要:
1. 准备知识:ORACLE的逻辑存储管理. ORACLE在逻辑存储上分4个粒度:表空间,段,区和块. 1.1 块:是粒度最小的存储单位,现在标准的块大小是8K,ORACLE每一次I/O操作也是按块来操作的,也就是说当ORACLE从数据文件读数据时,是读取多少个块,而不是多少行. 1.2 区:由一系列相邻的块而组成,这也是ORACLE空间分配的基本单位,举个例子来说,当我们创建一个表PM_USER... 阅读全文