-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy_dev.sql
More file actions
49 lines (36 loc) · 1.47 KB
/
deploy_dev.sql
File metadata and controls
49 lines (36 loc) · 1.47 KB
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
/************************************************************************************
Filename : deploy_dev.sql
Author :
Purpose : Automated deployment script for the [DB Name] database, this is intended for use on the development environment
Description: The release included: data model deployment on a blank schema
Usage: Using Windows X open a command line window and change the directory to the [SQL Directory] directory in the working copy of the repository and execute the script using the "@" syntax. When prompted enter the server credentials in the format defined in the corresponding code comments
************************************************************************************/
SET FEEDBACK ON
SET TRIMSPOOL ON
SET VERIFY OFF
SET SQLBLANKLINES ON
SET AUTOCOMMIT OFF
SET EXITCOMMIT OFF
SET ECHO ON
WHENEVER SQLERROR EXIT 1
WHENEVER OSERROR EXIT 1
SET DEFINE ON
-- Provide credentials in the form: USER@TNS/PASSWORD when using a TNS Name
-- Provide credentials in the form: USER/PASSWORD@HOSTNAME/SID when specifying hostname and SID values
DEFINE apps_credentials=&1
CONNECT &apps_credentials
COL spool_fname NEW_VALUE spoolname NOPRINT
SELECT '[DB Name]_deploy_dev_' || TO_CHAR( SYSDATE, 'yyyymmdd' ) spool_fname FROM DUAL;
SPOOL logs/&spoolname APPEND
SET DEFINE OFF
SHOW USER;
PROMPT running DDL scripts
@[DB Name]_combined_DDL_DML.sql
PROMPT loading data
--@LOAD_DATA.SQL
PROMPT granting privileges
--@PRIVILEGES.SQL
DISCONNECT;
SET DEFINE ON
SPOOL OFF
EXIT