fixed bug in Installmip.cmd, test section would never get run and the usage section caused an error.
Massaged the test data so that some base users get added to the test schema, duplicated the seed party data upload so that the Advantica user still exists git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@2897 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
@@ -12,5 +12,5 @@ prty_id
|
|||||||
,description
|
,description
|
||||||
)
|
)
|
||||||
BEGINDATA
|
BEGINDATA
|
||||||
100|MIPADMIN|1001|08-NOV-07|||
|
1|MIPADMIN|1001|08-NOV-07|||
|
||||||
|
|
||||||
|
|||||||
@@ -26,4 +26,4 @@ manu_ref
|
|||||||
,prty_type
|
,prty_type
|
||||||
)
|
)
|
||||||
BEGINDATA
|
BEGINDATA
|
||||||
|advantica||||08-NOV-07|||||||advantica|OPEN|Advantica|User|Mr|User|100|PERS
|
|advantica||||08-NOV-07|||||||advantica|OPEN|Advantica|User|Mr|User|1|PERS
|
||||||
|
|||||||
@@ -5,17 +5,20 @@ if "%1"=="sys" goto :usage
|
|||||||
if "%1"=="system" goto :usage
|
if "%1"=="system" goto :usage
|
||||||
|
|
||||||
sqlplus %1 @delete_demo_data
|
sqlplus %1 @delete_demo_data
|
||||||
|
|
||||||
sqlldr %1 control=prty
|
sqlldr %1 control=prty
|
||||||
|
|
||||||
sqlldr %1 control=parl
|
sqlldr %1 control=parl
|
||||||
|
|
||||||
sqlldr %1 control=prel
|
sqlldr %1 control=prel
|
||||||
|
|
||||||
|
sqlldr %1 control=apau
|
||||||
|
|
||||||
|
sqlplus %1 @create_passwords
|
||||||
|
|
||||||
goto :done
|
goto :done
|
||||||
|
|
||||||
:usage
|
:usage
|
||||||
|
|
||||||
echo usage InstallDemoData user/password@database
|
echo usage InstallData user/password@database
|
||||||
|
|
||||||
:done
|
:done
|
||||||
|
|||||||
29
Data/Test/apau.ctl
Normal file
29
Data/Test/apau.ctl
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
LOAD DATA
|
||||||
|
INFILE *
|
||||||
|
INTO TABLE apex_authorization
|
||||||
|
REPLACE
|
||||||
|
FIELDS TERMINATED BY '|'
|
||||||
|
(
|
||||||
|
rt_code
|
||||||
|
,component_name
|
||||||
|
,component_type
|
||||||
|
,privilege
|
||||||
|
)
|
||||||
|
BEGINDATA
|
||||||
|
MIPADMIN|5|P|A
|
||||||
|
MIPADMIN|7|P|A
|
||||||
|
MIPADMIN|8|P|A
|
||||||
|
MIPADMIN|9|P|A
|
||||||
|
MIPADMIN|10|P|A
|
||||||
|
MIPADMIN|11|P|A
|
||||||
|
MIPADMIN|12|P|A
|
||||||
|
MIPADMIN|13|P|A
|
||||||
|
MIPADMIN|14|P|A
|
||||||
|
MIPADMIN|15|P|A
|
||||||
|
MIPADMIN|18|P|A
|
||||||
|
MIPADMIN|19|P|A
|
||||||
|
MIPADMIN|30|P|A
|
||||||
|
MIPADMIN|31|P|A
|
||||||
|
MIPADMIN|32|P|A
|
||||||
|
CS|32|P|A
|
||||||
|
CS|32|P|R
|
||||||
50
Data/Test/apau.log
Normal file
50
Data/Test/apau.log
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
|
||||||
|
SQL*Loader: Release 8.1.7.0.0 - Production on Wed Nov 28 12:28:34 2007
|
||||||
|
|
||||||
|
(c) Copyright 2000 Oracle Corporation. All rights reserved.
|
||||||
|
|
||||||
|
Control File: apau.ctl
|
||||||
|
Data File: apau.ctl
|
||||||
|
Bad File: apau.bad
|
||||||
|
Discard File: none specified
|
||||||
|
|
||||||
|
(Allow all discards)
|
||||||
|
|
||||||
|
Number to load: ALL
|
||||||
|
Number to skip: 0
|
||||||
|
Errors allowed: 50
|
||||||
|
Bind array: 64 rows, maximum of 65536 bytes
|
||||||
|
Continuation: none specified
|
||||||
|
Path used: Conventional
|
||||||
|
|
||||||
|
Table APEX_AUTHORIZATION, loaded from every logical record.
|
||||||
|
Insert option in effect for this table: REPLACE
|
||||||
|
|
||||||
|
Column Name Position Len Term Encl Datatype
|
||||||
|
------------------------------ ---------- ----- ---- ---- ---------------------
|
||||||
|
RT_CODE FIRST * | CHARACTER
|
||||||
|
COMPONENT_NAME NEXT * | CHARACTER
|
||||||
|
COMPONENT_TYPE NEXT * | CHARACTER
|
||||||
|
PRIVILEGE NEXT * | CHARACTER
|
||||||
|
|
||||||
|
|
||||||
|
Table APEX_AUTHORIZATION:
|
||||||
|
17 Rows successfully loaded.
|
||||||
|
0 Rows not loaded due to data errors.
|
||||||
|
0 Rows not loaded because all WHEN clauses were failed.
|
||||||
|
0 Rows not loaded because all fields were null.
|
||||||
|
|
||||||
|
|
||||||
|
Space allocated for bind array: 65016 bytes(63 rows)
|
||||||
|
Space allocated for memory besides bind array: 0 bytes
|
||||||
|
|
||||||
|
Total logical records skipped: 0
|
||||||
|
Total logical records read: 17
|
||||||
|
Total logical records rejected: 0
|
||||||
|
Total logical records discarded: 0
|
||||||
|
|
||||||
|
Run began on Wed Nov 28 12:28:34 2007
|
||||||
|
Run ended on Wed Nov 28 12:28:34 2007
|
||||||
|
|
||||||
|
Elapsed time was: 00:00:00.04
|
||||||
|
CPU time was: 00:00:00.03
|
||||||
21
Data/Test/create_passwords.sql
Normal file
21
Data/Test/create_passwords.sql
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
DECLARE
|
||||||
|
l_hash varchar2(240);
|
||||||
|
BEGIN
|
||||||
|
FOR l_pwd IN (SELECT id, username
|
||||||
|
FROM parties
|
||||||
|
WHERE username IS NOT NULL) LOOP
|
||||||
|
|
||||||
|
l_hash := mip_security.get_hash(p_username=>l_pwd.username, p_password=>'password');
|
||||||
|
|
||||||
|
INSERT INTO passwords
|
||||||
|
(prty_id
|
||||||
|
,password_hash
|
||||||
|
,created_on)
|
||||||
|
VALUES
|
||||||
|
(l_pwd.id
|
||||||
|
,l_hash
|
||||||
|
,SYSDATE);
|
||||||
|
END LOOP;
|
||||||
|
END;
|
||||||
|
/
|
||||||
|
exit
|
||||||
5
Data/Test/delete_demo_data.sql
Normal file
5
Data/Test/delete_demo_data.sql
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
delete from party_relationships;
|
||||||
|
delete from party_roles;
|
||||||
|
delete from passwords;
|
||||||
|
delete from parties;
|
||||||
|
exit
|
||||||
@@ -22,11 +22,7 @@ BEGINDATA
|
|||||||
207|SUPP|2071|08-NOV-07|||
|
207|SUPP|2071|08-NOV-07|||
|
||||||
208|SUPP|2081|08-NOV-07|||
|
208|SUPP|2081|08-NOV-07|||
|
||||||
400|MIPADMIN|4001|08-NOV-07|||
|
400|MIPADMIN|4001|08-NOV-07|||
|
||||||
400|CS|4002|08-NOV-07|||
|
|
||||||
400|ICU|4003|08-NOV-07|||
|
|
||||||
401|MIPADMIN|4011|08-NOV-07|||
|
401|MIPADMIN|4011|08-NOV-07|||
|
||||||
401|CS|4012|08-NOV-07|||
|
|
||||||
401|ICU|4013|08-NOV-07|||
|
|
||||||
402|MIPADMIN|4021|08-NOV-07|||
|
402|MIPADMIN|4021|08-NOV-07|||
|
||||||
403|MIPADMIN|4031|08-NOV-07|||
|
403|MIPADMIN|4031|08-NOV-07|||
|
||||||
404|AGENT|4041|08-NOV-07|||
|
404|AGENT|4041|08-NOV-07|||
|
||||||
@@ -36,3 +32,4 @@ BEGINDATA
|
|||||||
406|AGENT|4061|08-NOV-07|||
|
406|AGENT|4061|08-NOV-07|||
|
||||||
407|AGENT|4071|08-NOV-07|||
|
407|AGENT|4071|08-NOV-07|||
|
||||||
408|AGENT|4081|08-NOV-07|||
|
408|AGENT|4081|08-NOV-07|||
|
||||||
|
1|MIPADMIN|4091|08-NOV-07|||
|
||||||
@@ -17,7 +17,6 @@ manu_ref
|
|||||||
,gt_7b_contract_ref
|
,gt_7b_contract_ref
|
||||||
,adversarial_contract_ref
|
,adversarial_contract_ref
|
||||||
,username
|
,username
|
||||||
,password_hash
|
|
||||||
,status
|
,status
|
||||||
,first_name
|
,first_name
|
||||||
,last_name
|
,last_name
|
||||||
@@ -27,34 +26,35 @@ manu_ref
|
|||||||
,prty_type
|
,prty_type
|
||||||
)
|
)
|
||||||
BEGINDATA
|
BEGINDATA
|
||||||
ACT|hardya||ACTARIS||08-NOV-07|||||||||||||Manufactures meters|100|MANU
|
|advantica||||08-NOV-07|||||||advantica|OPEN|Advantica|User|Mr|User|1|PERS
|
||||||
DRE|hardya||DRESSER||08-NOV-07|||||||||||||Manufactures meters|101|MANU
|
ACT|hardya||ACTARIS||08-NOV-07||||||||||||Manufactures meters|100|MANU
|
||||||
QUI|hardya||QUINSHIELD||08-NOV-07|||||||||||||Manufactures meters|102|MANU
|
DRE|hardya||DRESSER||08-NOV-07||||||||||||Manufactures meters|101|MANU
|
||||||
|hardya|NS1|Northern Supplies||08-NOV-07|||NSUPP|LT7 Contract|GT7 Contract|Adversarial Contract|||||||Supplier of gas to the north of the UK|200|MKTP
|
QUI|hardya||QUINSHIELD||08-NOV-07||||||||||||Manufactures meters|102|MANU
|
||||||
|hardya|NS2|Extreme Northern Supplies||08-NOV-07|||ENSUPP|LT7 Contract|GT7 Contract|Adversarial Contract|||||||Supplier of gas to the extreme north of the UK|201|MKTP
|
|hardya|NS1|Northern Supplies||08-NOV-07||NSUPP|LT7 Contract|GT7 Contract|Adversarial Contract|||||||Supplier of gas to the north of the UK|200|MKTP
|
||||||
|hardya|WS1|Welsh Supplies||08-NOV-07|||WSUPP|LT7 Contract|GT7 Contract|Adversarial Contract|||||||Supplier of gas to Wales|202|MKTP
|
|hardya|NS2|Extreme Northern Supplies||08-NOV-07||ENSUPP|LT7 Contract|GT7 Contract|Adversarial Contract|||||||Supplier of gas to the extreme north of the UK|201|MKTP
|
||||||
|hardya|WS2|Welsh Supplies||08-NOV-07|||W2SUPP|LT7 Contract|GT7 Contract|Adversarial Contract|||||||Supplier of gas to Wales|203|MKTP
|
|hardya|WS1|Welsh Supplies||08-NOV-07||WSUPP|LT7 Contract|GT7 Contract|Adversarial Contract|||||||Supplier of gas to Wales|202|MKTP
|
||||||
|hardya|CE1|Central Gas Supplies||08-NOV-07|||CGSUPP|LT7 Contract|GT7 Contract|Adversarial Contract|||||||Supplier of gas to the Central region|204|MKTP
|
|hardya|WS2|Welsh Supplies||08-NOV-07||W2SUPP|LT7 Contract|GT7 Contract|Adversarial Contract|||||||Supplier of gas to Wales|203|MKTP
|
||||||
|hardya|CE2|Centre de Gas Supplies||08-NOV-07|||CDSUPP|LT7 Contract|GT7 Contract|Adversarial Contract|||||||Supplier of gas to the Central region|205|MKTP
|
|hardya|CE1|Central Gas Supplies||08-NOV-07||CGSUPP|LT7 Contract|GT7 Contract|Adversarial Contract|||||||Supplier of gas to the Central region|204|MKTP
|
||||||
|
|hardya|CE2|Centre de Gas Supplies||08-NOV-07||CDSUPP|LT7 Contract|GT7 Contract|Adversarial Contract|||||||Supplier of gas to the Central region|205|MKTP
|
||||||
|hardya|LON|London Supplies||08-NOV-07|||LONSUPP|LT7 Contract|GT7 Contract|Adversarial Contract|||||||Supplier of gas to London|206|MKTP
|
|hardya|LON|London Supplies||08-NOV-07|||LONSUPP|LT7 Contract|GT7 Contract|Adversarial Contract|||||||Supplier of gas to London|206|MKTP
|
||||||
|hardya|KER|Kernow Supplies||08-NOV-07|||KERSUPP|LT7 Contract|GT7 Contract|Adversarial Contract|||||||Supplier of gas to Cornwall|207|MKTP
|
|hardya|KER|Kernow Supplies||08-NOV-07||KERSUPP|LT7 Contract|GT7 Contract|Adversarial Contract|||||||Supplier of gas to Cornwall|207|MKTP
|
||||||
|hardya|BM|Bootiful Gas Supplies||08-NOV-07|||BGSUPP|LT7 Contract|GT7 Contract|Adversarial Contract|||||||Supplier of gas to the East|208|MKTP
|
|hardya|BM|Bootiful Gas Supplies||08-NOV-07||BGSUPP|LT7 Contract|GT7 Contract|Adversarial Contract|||||||Supplier of gas to the East|208|MKTP
|
||||||
|hardya||National Grid||08-NOV-07|||||||||||||Internal organization|300|IO
|
|hardya||National Grid||08-NOV-07||||||||||||Internal organization|300|IO
|
||||||
|hardya||National Grid Metering||08-NOV-07|||||||||||||Internal organization|301|IO
|
|hardya||National Grid Metering||08-NOV-07||||||||||||Internal organization|301|IO
|
||||||
|hardya||Customer Services||08-NOV-07|||||||||||||Internal organization|302|IO
|
|hardya||Customer Services||08-NOV-07||||||||||||Internal organization|302|IO
|
||||||
|hardya||Quotations||08-NOV-07|||||||||||||Internal organization|303|IO
|
|hardya||Quotations||08-NOV-07||||||||||||Internal organization|303|IO
|
||||||
|hardya||||08-NOV-07|||||||hardya|password|OPEN|Andrew|Hardy|Mr|User|400|PERS
|
|hardya||||08-NOV-07|||||||hardya|OPEN|Andrew|Hardy|Mr|User|400|PERS
|
||||||
|hardya||||08-NOV-07|||||||priestj|password|OPEN|Jamie|Priest|Mr|User|401|PERS
|
|hardya||||08-NOV-07|||||||priestj|OPEN|Jamie|Priest|Mr|User|401|PERS
|
||||||
|hardya||||08-NOV-07|||||||kanagasabapathy|password|OPEN|Dharshani|Kanagasabapathy||User|402|PERS
|
|hardya||||08-NOV-07|||||||kanagasabapathy|OPEN|Dharshani|Kanagasabapathy||User|402|PERS
|
||||||
|hardya||||08-NOV-07|||||||mullend|password|OPEN|Matt|Mullen||User|403|PERS
|
|hardya||||08-NOV-07|||||||mullend|OPEN|Matt|Mullen||User|403|PERS
|
||||||
|hardya||||08-NOV-07|||||||agent1|password|OPEN|Fred|Smith||User|404|PERS
|
|hardya||||08-NOV-07|||||||agent1|OPEN|Fred|Smith||User|404|PERS
|
||||||
|hardya||||08-NOV-07|||||||agent2|password|OPEN|Joe|Bloggs||User|405|PERS
|
|hardya||||08-NOV-07|||||||agent2|OPEN|Joe|Bloggs||User|405|PERS
|
||||||
|hardya||||08-NOV-07|||||||agent3|password|OPEN|Peter|Piper||User|406|PERS
|
|hardya||||08-NOV-07|||||||agent3|OPEN|Peter|Piper||User|406|PERS
|
||||||
|hardya||||08-NOV-07|||||||agent4|password|OPEN|Nigel|Normal||User|407|PERS
|
|hardya||||08-NOV-07|||||||agent4|OPEN|Nigel|Normal||User|407|PERS
|
||||||
|hardya||||08-NOV-07|||||||agent5|password|OPEN|Norah|Batty||User|408|PERS
|
|hardya||||08-NOV-07|||||||agent5|OPEN|Norah|Batty||User|408|PERS
|
||||||
|hardya||||08-NOV-07|||||||cs1|password|OPEN|Henrietta|Helpful||User|409|PERS
|
|hardya||||08-NOV-07|||||||cs1|OPEN|Henrietta|Helpful||User|409|PERS
|
||||||
|hardya||||08-NOV-07|||||||cs2|password|OPEN|Tommy|Atkins||User|410|PERS
|
|hardya||||08-NOV-07|||||||cs2|OPEN|Tommy|Atkins||User|410|PERS
|
||||||
|hardya||||08-NOV-07|||||||cs3|password|OPEN|Tracy|Beaker||User|411|PERS
|
|hardya||||08-NOV-07|||||||cs3|OPEN|Tracy|Beaker||User|411|PERS
|
||||||
|hardya||||08-NOV-07|||||||ic1|password|OPEN|Gareth|Thomas||User|412|PERS
|
|hardya||||08-NOV-07|||||||ic1|OPEN|Gareth|Thomas||User|412|PERS
|
||||||
|hardya||||08-NOV-07|||||||ic2|password|OPEN|Bhavesh|Singh||User|413|PERS
|
|hardya||||08-NOV-07|||||||ic2|OPEN|Bhavesh|Singh||User|413|PERS
|
||||||
|hardya||||08-NOV-07|||||||ic3|password|OPEN|Dave|Smith||User|414|PERS
|
|hardya||||08-NOV-07|||||||ic3|OPEN|Dave|Smith||User|414|PERS
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ if "%3"=="" goto :usage
|
|||||||
if "%4"=="" goto :usage
|
if "%4"=="" goto :usage
|
||||||
if "%5"=="" goto :usage
|
if "%5"=="" goto :usage
|
||||||
|
|
||||||
|
|
||||||
@echo Install Schema
|
@echo Install Schema
|
||||||
sqlplus /nolog @Schema\InstallMIP %1 %2 %3 %4 %5
|
sqlplus /nolog @Schema\InstallMIP %1 %2 %3 %4 %5
|
||||||
|
|
||||||
@@ -24,7 +23,7 @@ cd ..\..
|
|||||||
if "%6"=="" goto :done
|
if "%6"=="" goto :done
|
||||||
|
|
||||||
if "%6"=="demo" goto :demo
|
if "%6"=="demo" goto :demo
|
||||||
if "%6"=="test" doto :test
|
if "%6"=="test" goto :test
|
||||||
|
|
||||||
:demo
|
:demo
|
||||||
@echo Demo
|
@echo Demo
|
||||||
@@ -46,7 +45,6 @@ goto :done
|
|||||||
|
|
||||||
:usage
|
:usage
|
||||||
|
|
||||||
echo usage InstallMIP sys_name sys_password app_name app_password [demo|test]db_connect_string
|
echo usage InstallMIP sys_name sys_password app_name app_password db_connect_string demo/test
|
||||||
|
|
||||||
|
|
||||||
:done
|
:done
|
||||||
|
|||||||
Reference in New Issue
Block a user