上周还算有点忙吧,周记没有写,这周趁项目组开周例会,把这两周的一起写了:
一、做的事情:
1、关于ORACLE索引,有人问要对一个varray类型加上索引,研究了将近一天,还是没有解决,不过对自己也
算是有提高
SQL> create or replace type Author_typ as object
2 (
3 LastName VARCHAR2(50),
4 ForeName VARCHAR2(50),
5 Initials VARCHAR2(10)
6 )
7
8 /
类型已创建。
SQL> create or replace type varray_author_typ as varray(200) of author_typ;
2 /
类型已创建。
SQL> create table test_varray(a varray_author_typ);
表已创建。
SQL> create index index_array on test_varray (a.author_typ(lastname));
create index index_array on test_varray (a.author_typ(lastname))
*
ERROR 位于第 1 行:
ORA-00904: "A"."AUTHOR_TYP": 无效的标识符
SQL> create index index_array on test_varray (a.lastname);
create index index_array on test_varray (a.lastname)
*
ERROR 位于第 1 行:
ORA-00904: "A"."LASTNAME": 无效的标识符
SQL> create table b(b author_typ);
表已创建。
SQL> create index b on b (b.lastname);
索引已创建。
4.0 Domain Indexes on Embedded Object Types
============================================
Oracle9i extends domain indexes so they can be created on an object embedded
within another object. Even though there is no syntax change, the users get
the added capability to build domain indexes on embedded object types. They
can also take an object type with a domain index built on it and seamlessly
make it a part of another object. Existing domain indexes on the embedded
object will continue to work.
Example 3
---------
SQL> CREATE TYPE super_spatial AS OBJECT (
attr NUMBER,
data mdsys.sdo_geometry );
/
Type created.
SQL> CREATE TABLE super_markets (
c1 NUMBER,
c2 super_spatial );
Table created.
SQL> INSERT INTO user_sdo_geom_metadata VALUES (
'SUPER_MARKETS',
'C2.DATA',
mdsys.sdo_dim_array (
mdsys.sdo_dim_element ('Long', -180, 180, 0.005),
mdsys.sdo_dim_element ('Lat', -90, 90, 0.005)), 8307);
1 row created.
SQL> CREATE INDEX idx ON super_markets(c2.data)
INDEXTYPE IS mdsys.spatial_index;
Index created.
用这个表示数组就很方便:
CREATE OR REPLACE PROCEDURE PRO_TEST
AS
-- 定义一个自定义类型,存放分析出的数值
TYPE type_record IS RECORD (
col1 number(10,0),
col2 number(10,0),
col3 NUMBER(10,0)
);
TYPE type_tab IS TABLE OF type_record INDEX BY BINARY_INTEGER;
arr_indx_tab type_tab;
var_par varchar2(8000); -- 容纳要分析的字符串
var_temp1 varchar2(8000);
var_temp2 varchar2(8000);
n_position number(5,0);
n_count number(5,0);
i number(5,0);
BEGIN
var_par := '1,2,3;4,5,6;';
var_temp1 := var_par;
i := 0;
IF substr(var_temp1,length(var_temp1)) <> ';' THEN
var_temp1 := var_temp1 || ';';
END IF;
WHILE length(var_temp1) > 1 LOOP
i := i + 1;
-- 找出第一个';'的位置
n_position := instr(var_temp1, ';');
-- 从开始截取 n_position - 1 个字符
var_temp2 := substr(var_temp1, 1, n_position - 1);
-- 从var_temp2中去掉第一个';'字符之前的字符
var_temp1 := substr(var_temp1, n_position + 1);
n_position := instr(var_temp2, ',');
arr_indx_tab(i).col1 := to_number(substr(var_temp2, 1, n_position - 1));
var_temp2 := substr(var_temp2, n_position + 1);
n_position := instr(var_temp2, ',');
arr_indx_tab(i).col2 := to_number(substr(var_temp2, 1, n_position - 1));
arr_indx_tab(i).col3 := to_number(substr(var_temp2, n_position + 1));
END LOOP;
n_count := i;
FOR j in 1 .. n_count LOOP
dbms_output.put_line('row '||to_char(j)||' : '|| to_char(arr_indx_tab(j).col1)
||' '||to_char(arr_indx_tab(j).col2)||' '||to_char(arr_indx_tab(j).col3));
END LOOP;
END;
/
2、还是HP的问题:
System: jtcwdb2 Tue Aug 2 10:51:31 2005
Load averages: 1.27, 1.09, 0.95
235 processes: 209 sleeping, 25 running, 1 zombie
服务器负载很高,没有办法只有把CA的服务停了,不过也好不了多少。用友的工程师来问我服务器的负载,
我只抓了上班部分,他要看CPU的其他指标,我只关注了IDLE,结果他说他要关注的是SWAIT,偶无言.
# awservices stop
STOPPED prfAgent:prfAgent
STOPPED proAgent:proAgent
STOPPED caiLogA2:caiLogA2
STOPPED hpaAgent:hpaAgent
STOPPED aws_snmp:aws_snmp
STOPPED caiUxOs:caiUxOs
STOPPED aws_sadmin:aws_sadmin
STOPPED aws_orb:aws_orb
awservices stopped
# awservices start
awservices started 29412
# awservices status
RUNNING aws_orb:aws_orb
RUNNING aws_sadmin:aws_sadmin
RUNNING caiLogA2:caiLogA2
RUNNING caiUxOs:caiUxOs
RUNNING hpaAgent:hpaAgent
RUNNING aws_snmp:aws_snmp
RUNNING prfAgent:prfAgent
RUNNING proAgent:proAgent
3、.net的session
以前用PHP做过session,都是保存在本地,这次修改别人设计的代码,半天都不能调试,结果总算是明白
了.net中的session。
使用sqlserver来存放和取得session
2005-07-28 文/
asp.net 提供了三种存放 session的方式。
1 InProc
2 State Server
3 SQL Server
第一种是我们经常用的,第2中就是使用一个名为 state server 的机器用它的内存来存放其他机器的
session 状态,其实,我们还可以在 sql server 里面来存放和取得 session。是不是第一次听说。
下面讲述实现过程。
找到这个文件
c:/WINNT/Microsoft.NET/Framework/v1.0.2914/ InstallSqlState.sql
这个文件,装入 sql server (不要告诉我不会)
2 修改 web.config ,大概象下面这样
<sessionState mode="SQLServer"
sqlConnectionString="data source=
WIN2000;userid=
sa;password=" cookieless= "false"timeout=
"20" />
3 使用它。这个大家都会吧。呵呵
4、参加了用友的成本模块培训,搞不懂。修改财务网站的代码,主要还是美工方面的。
二、漏做的事情
1、GWY的书没有看多少
2、网站代码还没有通过