diff --git a/Data/Seed/parl.ctl b/Data/Seed/parl.ctl index 2ba95f1..b1120b4 100644 --- a/Data/Seed/parl.ctl +++ b/Data/Seed/parl.ctl @@ -12,5 +12,5 @@ prty_id ,description ) BEGINDATA -100|MIPADMIN|1001|08-NOV-07||| +1|MIPADMIN|1001|08-NOV-07||| diff --git a/Data/Seed/prty.ctl b/Data/Seed/prty.ctl index 5286ea0..18f9169 100644 --- a/Data/Seed/prty.ctl +++ b/Data/Seed/prty.ctl @@ -26,4 +26,4 @@ manu_ref ,prty_type ) 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 diff --git a/Data/Test/InstallData.cmd b/Data/Test/InstallData.cmd index d01f561..d844199 100644 --- a/Data/Test/InstallData.cmd +++ b/Data/Test/InstallData.cmd @@ -5,17 +5,20 @@ if "%1"=="sys" goto :usage if "%1"=="system" goto :usage sqlplus %1 @delete_demo_data - sqlldr %1 control=prty sqlldr %1 control=parl sqlldr %1 control=prel +sqlldr %1 control=apau + +sqlplus %1 @create_passwords + goto :done :usage -echo usage InstallDemoData user/password@database +echo usage InstallData user/password@database :done diff --git a/Data/Test/apau.ctl b/Data/Test/apau.ctl new file mode 100644 index 0000000..d296e48 --- /dev/null +++ b/Data/Test/apau.ctl @@ -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 \ No newline at end of file diff --git a/Data/Test/apau.log b/Data/Test/apau.log new file mode 100644 index 0000000..b3ad078 --- /dev/null +++ b/Data/Test/apau.log @@ -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 diff --git a/Data/Test/create_passwords.sql b/Data/Test/create_passwords.sql new file mode 100644 index 0000000..4bafe9b --- /dev/null +++ b/Data/Test/create_passwords.sql @@ -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 diff --git a/Data/Test/delete_demo_data.sql b/Data/Test/delete_demo_data.sql new file mode 100644 index 0000000..7d58f9c --- /dev/null +++ b/Data/Test/delete_demo_data.sql @@ -0,0 +1,5 @@ +delete from party_relationships; +delete from party_roles; +delete from passwords; +delete from parties; +exit diff --git a/Data/Test/parl.ctl b/Data/Test/parl.ctl index b7ff654..def2ee3 100644 --- a/Data/Test/parl.ctl +++ b/Data/Test/parl.ctl @@ -22,11 +22,7 @@ BEGINDATA 207|SUPP|2071|08-NOV-07||| 208|SUPP|2081|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|CS|4012|08-NOV-07||| -401|ICU|4013|08-NOV-07||| 402|MIPADMIN|4021|08-NOV-07||| 403|MIPADMIN|4031|08-NOV-07||| 404|AGENT|4041|08-NOV-07||| @@ -36,3 +32,4 @@ BEGINDATA 406|AGENT|4061|08-NOV-07||| 407|AGENT|4071|08-NOV-07||| 408|AGENT|4081|08-NOV-07||| +1|MIPADMIN|4091|08-NOV-07||| \ No newline at end of file diff --git a/Data/Test/prty.ctl b/Data/Test/prty.ctl index 00badf0..172c020 100644 --- a/Data/Test/prty.ctl +++ b/Data/Test/prty.ctl @@ -17,7 +17,6 @@ manu_ref ,gt_7b_contract_ref ,adversarial_contract_ref ,username -,password_hash ,status ,first_name ,last_name @@ -27,34 +26,35 @@ manu_ref ,prty_type ) BEGINDATA -ACT|hardya||ACTARIS||08-NOV-07|||||||||||||Manufactures meters|100|MANU -DRE|hardya||DRESSER||08-NOV-07|||||||||||||Manufactures meters|101|MANU -QUI|hardya||QUINSHIELD||08-NOV-07|||||||||||||Manufactures meters|102|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 -|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|WS1|Welsh Supplies||08-NOV-07|||WSUPP|LT7 Contract|GT7 Contract|Adversarial Contract|||||||Supplier of gas to Wales|202|MKTP -|hardya|WS2|Welsh Supplies||08-NOV-07|||W2SUPP|LT7 Contract|GT7 Contract|Adversarial Contract|||||||Supplier of gas to Wales|203|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 +|advantica||||08-NOV-07|||||||advantica|OPEN|Advantica|User|Mr|User|1|PERS +ACT|hardya||ACTARIS||08-NOV-07||||||||||||Manufactures meters|100|MANU +DRE|hardya||DRESSER||08-NOV-07||||||||||||Manufactures meters|101|MANU +QUI|hardya||QUINSHIELD||08-NOV-07||||||||||||Manufactures meters|102|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 +|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|WS1|Welsh Supplies||08-NOV-07||WSUPP|LT7 Contract|GT7 Contract|Adversarial Contract|||||||Supplier of gas to Wales|202|MKTP +|hardya|WS2|Welsh Supplies||08-NOV-07||W2SUPP|LT7 Contract|GT7 Contract|Adversarial Contract|||||||Supplier of gas to Wales|203|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|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||National Grid||08-NOV-07|||||||||||||Internal organization|300|IO -|hardya||National Grid Metering||08-NOV-07|||||||||||||Internal organization|301|IO -|hardya||Customer Services||08-NOV-07|||||||||||||Internal organization|302|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|||||||priestj|password|OPEN|Jamie|Priest|Mr|User|401|PERS -|hardya||||08-NOV-07|||||||kanagasabapathy|password|OPEN|Dharshani|Kanagasabapathy||User|402|PERS -|hardya||||08-NOV-07|||||||mullend|password|OPEN|Matt|Mullen||User|403|PERS -|hardya||||08-NOV-07|||||||agent1|password|OPEN|Fred|Smith||User|404|PERS -|hardya||||08-NOV-07|||||||agent2|password|OPEN|Joe|Bloggs||User|405|PERS -|hardya||||08-NOV-07|||||||agent3|password|OPEN|Peter|Piper||User|406|PERS -|hardya||||08-NOV-07|||||||agent4|password|OPEN|Nigel|Normal||User|407|PERS -|hardya||||08-NOV-07|||||||agent5|password|OPEN|Norah|Batty||User|408|PERS -|hardya||||08-NOV-07|||||||cs1|password|OPEN|Henrietta|Helpful||User|409|PERS -|hardya||||08-NOV-07|||||||cs2|password|OPEN|Tommy|Atkins||User|410|PERS -|hardya||||08-NOV-07|||||||cs3|password|OPEN|Tracy|Beaker||User|411|PERS -|hardya||||08-NOV-07|||||||ic1|password|OPEN|Gareth|Thomas||User|412|PERS -|hardya||||08-NOV-07|||||||ic2|password|OPEN|Bhavesh|Singh||User|413|PERS -|hardya||||08-NOV-07|||||||ic3|password|OPEN|Dave|Smith||User|414|PERS +|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||National Grid||08-NOV-07||||||||||||Internal organization|300|IO +|hardya||National Grid Metering||08-NOV-07||||||||||||Internal organization|301|IO +|hardya||Customer Services||08-NOV-07||||||||||||Internal organization|302|IO +|hardya||Quotations||08-NOV-07||||||||||||Internal organization|303|IO +|hardya||||08-NOV-07|||||||hardya|OPEN|Andrew|Hardy|Mr|User|400|PERS +|hardya||||08-NOV-07|||||||priestj|OPEN|Jamie|Priest|Mr|User|401|PERS +|hardya||||08-NOV-07|||||||kanagasabapathy|OPEN|Dharshani|Kanagasabapathy||User|402|PERS +|hardya||||08-NOV-07|||||||mullend|OPEN|Matt|Mullen||User|403|PERS +|hardya||||08-NOV-07|||||||agent1|OPEN|Fred|Smith||User|404|PERS +|hardya||||08-NOV-07|||||||agent2|OPEN|Joe|Bloggs||User|405|PERS +|hardya||||08-NOV-07|||||||agent3|OPEN|Peter|Piper||User|406|PERS +|hardya||||08-NOV-07|||||||agent4|OPEN|Nigel|Normal||User|407|PERS +|hardya||||08-NOV-07|||||||agent5|OPEN|Norah|Batty||User|408|PERS +|hardya||||08-NOV-07|||||||cs1|OPEN|Henrietta|Helpful||User|409|PERS +|hardya||||08-NOV-07|||||||cs2|OPEN|Tommy|Atkins||User|410|PERS +|hardya||||08-NOV-07|||||||cs3|OPEN|Tracy|Beaker||User|411|PERS +|hardya||||08-NOV-07|||||||ic1|OPEN|Gareth|Thomas||User|412|PERS +|hardya||||08-NOV-07|||||||ic2|OPEN|Bhavesh|Singh||User|413|PERS +|hardya||||08-NOV-07|||||||ic3|OPEN|Dave|Smith||User|414|PERS diff --git a/InstallMIP.cmd b/InstallMIP.cmd index e147fb5..0cc0987 100644 --- a/InstallMIP.cmd +++ b/InstallMIP.cmd @@ -6,7 +6,6 @@ if "%3"=="" goto :usage if "%4"=="" goto :usage if "%5"=="" goto :usage - @echo Install Schema sqlplus /nolog @Schema\InstallMIP %1 %2 %3 %4 %5 @@ -24,7 +23,7 @@ cd ..\.. if "%6"=="" goto :done if "%6"=="demo" goto :demo -if "%6"=="test" doto :test +if "%6"=="test" goto :test :demo @echo Demo @@ -46,7 +45,6 @@ goto :done :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