-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sql.in
72 lines (56 loc) · 1.68 KB
/
install.sql.in
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
--
-- SQLInstaller install
--
set echo off
set define on
set verify off
set serveroutput on
set feedback off
whenever sqlerror exit sql.sqlcode;
--
-- Load ORADBA schema variables
@@confdir@/schema-define
define ORA_SCHEMA_OWNER = &&ORADBA_SYS_OWNER
define ORA_TBSP_TBLS = &&ORADBA_TBSP_TBLS
define ORA_TBSP_INDX = &&ORADBA_TBSP_INDX
prompt
prompt I: Start installation
prompt
--
-- Set new schema owner
alter session set current_schema = &&ORADBA_SYS_OWNER;
prompt
prompt I: Current schema is &&ORADBA_SYS_OWNER
prompt
--
-- Create type
@@datadir@/types/sqlinstaller_config_type
--
-- Create and load configuration table
@@datadir@/tables/sqlinstaller_config
@@datadir@/tables/load_sqlinstaller_config
--
-- Create packages
@@datadir@/packages/sqlinstaller_def
@@datadir@/packages/sqlinstaller_body
--
-- Create synonyms
create or replace public synonym SQLINSTALLER_CONFIG_TYPE for &&ORADBA_SYS_OWNER..sqlinstaller_config_type;
create or replace public synonym SQLINSTALLER for &&ORADBA_SYS_OWNER..sqlinstaller;
prompt
prompt I: Package SQLINSTALLER created
prompt
alter session set current_schema = &&l_cur_schema;
prompt
prompt I: Setting grants ...
prompt
grant select on sys.dba_jobs to &&ORADBA_SYS_OWNER;
grant select on sys.dba_jobs_running to &&ORADBA_SYS_OWNER;
grant select on sys.dba_source to &&ORADBA_SYS_OWNER;
grant select on sys.dba_triggers to &&ORADBA_SYS_OWNER;
grant select on sys.dba_objects to &&ORADBA_SYS_OWNER;
grant select on sys.dba_roles to &&ORADBA_SYS_OWNER;
grant select on sys.dba_profiles to &&ORADBA_SYS_OWNER;
prompt
prompt I: Finish installation
prompt