forked from oracle/python-cx_Oracle
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDropTest.sql
More file actions
33 lines (26 loc) · 985 Bytes
/
DropTest.sql
File metadata and controls
33 lines (26 loc) · 985 Bytes
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
/*-----------------------------------------------------------------------------
* Copyright 2017, Oracle and/or its affiliates. All rights reserved.
*---------------------------------------------------------------------------*/
/*-----------------------------------------------------------------------------
* DropTest.sql
* Drops database objects used for testing.
*
* Run this like:
* sqlplus / as sysdba @DropTest
*
* Note that the script TestEnv.sql should be modified if you would like to
* use something other than the default schemas and passwords.
*---------------------------------------------------------------------------*/
whenever sqlerror exit failure
-- setup environment
@@TestEnv.sql
begin
for r in
( select username
from dba_users
where username in (upper('&main_user'), upper('&proxy_user'))
) loop
execute immediate 'drop user ' || r.username || ' cascade';
end loop;
end;
/