-
Notifications
You must be signed in to change notification settings - Fork 189
Improved installation routine #384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
7d89f1c
7d6b4b8
4dbf6e8
3bd33d1
f4fd702
d0dbccb
1d71dd0
a8a0093
766af11
f97db36
5605837
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,10 @@ | ||
| declare | ||
| l_tab_exist number; | ||
| begin | ||
| select count(*) into l_tab_exist from user_tables where table_name = 'PLSQL_PROFILER_RUNS'; | ||
| select count(*) into l_tab_exist from | ||
| (select table_name from all_tables where table_name = 'PLSQL_PROFILER_RUNS' and owner in (user,'PUBLIC') | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We cannot have any table with owner = 'PUBLIC' |
||
| union all | ||
| select synonym_name from user_synonyms where synonym_name = 'PLSQL_PROFILER_RUNS'); | ||
| if l_tab_exist = 0 then | ||
| execute immediate q'[create table plsql_profiler_runs | ||
| ( | ||
|
|
@@ -27,7 +30,10 @@ end; | |
| declare | ||
| l_tab_exist number; | ||
| begin | ||
| select count(*) into l_tab_exist from user_tables where table_name = 'PLSQL_PROFILER_UNITS'; | ||
| select count(*) into l_tab_exist from | ||
| (select table_name from all_tables where table_name = 'PLSQL_PROFILER_UNITS' and owner in (user,'PUBLIC') | ||
| union all | ||
| select synonym_name from user_synonyms where synonym_name = 'PLSQL_PROFILER_UNITS'); | ||
| if l_tab_exist = 0 then | ||
| execute immediate q'[create table plsql_profiler_units | ||
| ( | ||
|
|
@@ -55,7 +61,10 @@ end; | |
| declare | ||
| l_tab_exist number; | ||
| begin | ||
| select count(*) into l_tab_exist from user_tables where table_name = 'PLSQL_PROFILER_DATA'; | ||
| select count(*) into l_tab_exist from | ||
| (select table_name from all_tables where table_name = 'PLSQL_PROFILER_DATA' and owner in (user,'PUBLIC'); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| union all | ||
| select synonym_name from user_synonyms where synonym_name = 'PLSQL_PROFILER_DATA'); | ||
| if l_tab_exist = 0 then | ||
| execute immediate q'[create table plsql_profiler_data | ||
| ( | ||
|
|
@@ -84,7 +93,10 @@ end; | |
| declare | ||
| l_seq_exist number; | ||
| begin | ||
| select count(*) into l_seq_exist from user_sequences where sequence_name = 'PLSQL_PROFILER_RUNNUMBER'; | ||
| select count(*) into l_seq_exist from | ||
| (select sequence_name from all_sequences where sequence_name = 'PLSQL_PROFILER_RUNNUMBER' and sequence_owner in (user,'PUBLIC'); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| union all | ||
| select synonym_name from user_synonyms where synonym_name = 'PLSQL_PROFILER_RUNNUMBER'); | ||
| if l_seq_exist = 0 then | ||
| execute immediate q'[create sequence plsql_profiler_runnumber start with 1 nocache]'; | ||
| dbms_output.put_line('Sequence PLSQL_PROFILER_RUNNUMBER created'); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still thinking if we should make scripts rerunable or drop objects on uninstall.
Also, since we modify script provided from Oracle, should we split it into one script per object?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we shouldn't drop it. Could you explain why do you want to split it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use a pattern of one script for one object so this script is the only one breaking the pattern
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but its an oracle object, not our... But I can fix it tonight
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, lets leave it as it is