FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
utPLSQL/.github/scripts/uninstall_validate_utplsql.sh at develop · utPLSQL/utPLSQL · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
utPLSQL
/
utPLSQL
Public
Notifications
You must be signed in to change notification settings
Fork
189
Star
622
Code
Issues
12
Pull requests
0
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
utPLSQL
/
.github
/
scripts
/
uninstall_validate_utplsql.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
53 lines (50 loc) · 1.72 KB
Breadcrumbs
utPLSQL
/
.github
/
scripts
/
uninstall_validate_utplsql.sh
Copy path
File metadata and controls
executable file
·
53 lines (50 loc) · 1.72 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!
/bin/bash
set
-ev
SCRIPT_DIR=
"
$(
cd
--
"
$(
dirname --
"
${BASH_SOURCE[0]}
"
)
"
&
>
/dev/null
&&
pwd
)
"
cd
${SCRIPT_DIR}
/../../source
time
"
$SQLCLI
"
sys/
$ORACLE_PWD
@//
$CONNECTION_STR
AS SYSDBA
<<
-
SQL
set feedback off
set verify off
whenever sqlerror exit failure rollback
@uninstall_all.sql
$UT3_DEVELOP_SCHEMA
SQL
time
"
$SQLCLI
"
sys/
$ORACLE_PWD
@//
$CONNECTION_STR
AS SYSDBA
<<
-
SQL
set feedback off
set verify off
whenever sqlerror exit failure rollback
set serverout on
begin
for i in (
select o.object_type||' '||o.owner||'.'||o.object_name as obj
from dba_objects o
where owner = '
$UT3_DEVELOP_SCHEMA
'
union all
select 'SYNONYM '||s.owner||'.'||s.synonym_name||' FOR '||s.table_owner||'.'||s.table_name as obj
from dba_synonyms s
where table_owner = '
$UT3_DEVELOP_SCHEMA
'
) loop
dbms_output.put_line(i.obj);
end loop;
end;
/
declare
v_leftover_objects_count integer;
begin
select sum(cnt)
into v_leftover_objects_count
from (
select count(1) cnt from dba_objects
where owner = '
$UT3_DEVELOP_SCHEMA
'
and object_name not like 'PLSQL_PROFILER%' and object_name not like 'DBMSPCC_%'
union all
select count(1) cnt from dba_synonyms
where table_owner = '
$UT3_DEVELOP_SCHEMA
'
and table_name not like 'PLSQL_PROFILER%' and table_name not like 'DBMSPCC_%'
);
if v_leftover_objects_count > 0 then
raise_application_error(-20000, 'Not all objects were successfully uninstalled - leftover objects count='||v_leftover_objects_count);
end if;
end;
/
drop user
$UT3_DEVELOP_SCHEMA
;
SQL
Back
|
FazBrowse Home
|
New Git URL