-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgfcbuildspool.sql
51 lines (43 loc) · 2.09 KB
/
gfcbuildspool.sql
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
rem gfcbuildspool.sql
rem (c) Go-Faster Consultancy
rem 17.9.2008 - moved spool commands from gfcbuild.sql to this script
column line format a254
set timi off head off feedback off echo off verify off pages 0 lines 1024 trimspool on sqlblanklines on
set termout off
column SPOOL_FILENAME new_value SPOOL_FILENAME
select LOWER('gfcbuild_'||MAX(dbname)||'.sql') SPOOL_FILENAME from ps.psdbowner where UPPER(ownerid) = NVL(sys_context('userenv','current_schema'),user);
spool &&SPOOL_FILENAME
undefine SPOOL_FILENAME
select * from table(gfc_pspart.spooler(0));
spool off
column SPOOL_FILENAME new_value SPOOL_FILENAME
select LOWER('gfcindex_'||MAX(dbname)||'.sql') SPOOL_FILENAME from ps.psdbowner where UPPER(ownerid) = NVL(sys_context('userenv','current_schema'),user);
spool &&SPOOL_FILENAME
undefine SPOOL_FILENAME
select * from table(gfc_pspart.spooler(1));
spool off
column SPOOL_FILENAME new_value SPOOL_FILENAME
select LOWER('gfcstats_'||MAX(dbname)||'.sql') SPOOL_FILENAME from ps.psdbowner where UPPER(ownerid) = NVL(sys_context('userenv','current_schema'),user);
spool &&SPOOL_FILENAME
undefine SPOOL_FILENAME
select * from table(gfc_pspart.spooler(2));
spool off
column SPOOL_FILENAME new_value SPOOL_FILENAME
select LOWER('gfcalter_'||MAX(dbname)||'.sql') SPOOL_FILENAME from ps.psdbowner where UPPER(ownerid) = NVL(sys_context('userenv','current_schema'),user);
spool &&SPOOL_FILENAME
undefine SPOOL_FILENAME
select * from table(gfc_pspart.spooler(3));
spool off
column SPOOL_FILENAME new_value SPOOL_FILENAME
select LOWER('gfcarch1_'||MAX(dbname)||'.sql') SPOOL_FILENAME from ps.psdbowner where UPPER(ownerid) = NVL(sys_context('userenv','current_schema'),user);
spool &&SPOOL_FILENAME
undefine SPOOL_FILENAME
select * from table(gfc_pspart.spooler(4));
spool off
column SPOOL_FILENAME new_value SPOOL_FILENAME
select LOWER('gfcarch2_'||MAX(dbname)||'.sql') SPOOL_FILENAME from ps.psdbowner where UPPER(ownerid) = NVL(sys_context('userenv','current_schema'),user);
spool &&SPOOL_FILENAME
undefine SPOOL_FILENAME
select * from table(gfc_pspart.spooler(5));
spool off
set head on feedback on termout on pages 50