1、在本地数据库中创建如下表:
-- Create table
create table TMP_CR_PERSONS
(
SPECIALTY VARCHAR2(50),
USER_GROUP VARCHAR2(50),
USER_NAME VARCHAR2(50),
USER_CATEGORY VARCHAR2(50)
)
2、创建DBLINK:
create database link LK2PMS connect to XXX identified by XX
using '(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.5.99)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = oradb9)
)
)'
3、创建视图,查询变更清单:
CREATE OR REPLACE VIEW V_TMP_CR_LIST AS
SELECT D.CHANGE_REQUEST_CODE,
D.PROJECT_NAME,
D.PRODUCT_NAME,
D.MODULE_NAME,
D.TYPE,
D.PRIVILEGE,
D.PROPOSE_TIME,
WF.TRANSACTOR,
WF.TASKNAME,
P.SPECIALTY,
P.USER_GROUP,
P.USER_CATEGORY
FROM PMS_CHANGE@lk2pms D,
(SELECT MAX(ID) ID
FROM WFT_FLOWCONTROL@lk2pms WF
WHERE WF.WORKFLOWID = 'ChangeRequest'
GROUP BY WF.WORKID) MX,
WFT_FLOWCONTROL@lk2pms WF,
TMP_CR_PERSONS P
WHERE WF.ID = MX.ID
AND WF.WORKID = D.CHANGE_REQUEST_ID
AND D.CHANGE_REQUEST_CODE LIKE 'CR%'
AND WF.TRANSACTOR = P.USER_NAME
AND D.STATE NOT IN ('结束','终止','拒绝');
4、创建统计视图:
CREATE VIEW V_TMP_CR_STAT AS
SELECT T.USER_GROUP, T.USER_NAME, COUNT(V.CHANGE_REQUEST_CODE) TOTAL
FROM V_TMP_CR_LIST V, TMP_CR_PERSONS T
WHERE V.TRANSACTOR(+) = T.USER_NAME
GROUP BY CUBE(T.USER_GROUP, T.USER_NAME);
1、当然是访问老系统中的,应该都采用兼容视图
2、在访问网公司系统的时候,出现内存不能写的错误提示,让后直接页面加载失败,解决办法是,找到用SOGOU浏览器加载页面后,发现需要安装JITDSign这个插件,所以手工找到JITDSign.cab,解压后直接运行“regsvr32 JITDSign.ocx”,再刷新页面,OK了。
3、其他问题暂未发现。