Ticket #8349: sqlall.sql

File sqlall.sql, 5.3 KB (added by guneeyoufix, 16 years ago)

Output of the sqlall command for the application

Line 
1CREATE TABLE "SITES" (
2 "SITEID" NUMBER(38, 0) NOT NULL PRIMARY KEY,
3 "OFFICIALNAME" NVARCHAR2(200) NULL,
4 "SITENAME" NVARCHAR2(200) NULL,
5 "FRIENDLYNAME" NVARCHAR2(100) NULL,
6 "DOMAIN" NVARCHAR2(50) NULL,
7 "HOMEURI" NVARCHAR2(255) NULL,
8 "EMAIL" NVARCHAR2(100) NULL,
9 "CONTACTTEL" NVARCHAR2(255) NULL,
10 "EMERGENCYTEL" NVARCHAR2(255) NULL,
11 "CSIRTEMAIL" NVARCHAR2(255) NULL,
12 "CSIRTTEL" NVARCHAR2(255) NULL,
13 "HOURS" NVARCHAR2(30) NULL,
14 "TIMEZONEID" NUMBER(38, 0) NULL,
15 "COUNTRY" NVARCHAR2(50) NULL,
16 "REGION" NVARCHAR2(10) NULL,
17 "TIER" NUMBER(38, 0) NULL,
18 "GIISURL" NVARCHAR2(250) NULL,
19 "PRIMARYSITE" NVARCHAR2(1) NULL,
20 "INMONITORING" NVARCHAR2(1) NULL,
21 "SITETAG" NVARCHAR2(50) NULL,
22 "SITECVSTAG" NVARCHAR2(50) NULL,
23 "COMMENTS" NVARCHAR2(255) NULL,
24 "ISCERTIFIED" NVARCHAR2(1) NULL,
25 "STATUS" NVARCHAR2(20) NULL,
26 "TYPE" NVARCHAR2(20) NULL,
27 "ORGID" NUMBER(38, 0) NULL,
28 "LATITUDE" NUMBER(126, -127) NULL,
29 "LONGITUDE" NUMBER(126, -127) NULL,
30 "FWIP" NVARCHAR2(255) NULL,
31 "ISDELETED" NVARCHAR2(1) NULL
32)
33;
34CREATE TABLE "VO" (
35 "VOID" NUMBER(38, 0) NOT NULL PRIMARY KEY,
36 "VONAME" NVARCHAR2(100) NULL
37)
38;
39CREATE TABLE "SERVICE" (
40 "SERVICEID" NUMBER(38, 0) NOT NULL PRIMARY KEY,
41 "WEIGHT" NUMBER(38, 0) NOT NULL,
42 "SERVICESCOPE" NVARCHAR2(1) NULL,
43 "SERVICEABBR" NVARCHAR2(8) NULL,
44 "SERVICENAME" NVARCHAR2(100) NULL,
45 "ISDELETED" NVARCHAR2(1) NULL
46)
47;
48CREATE TABLE "TESTDEF" (
49 "TESTID" NUMBER(38, 0) NOT NULL PRIMARY KEY,
50 "SERVICEID" NUMBER(38, 0) NOT NULL,
51 "CREATEDTIMESTAMP" NUMBER(38, 0) NOT NULL,
52 "TESTNAME" NVARCHAR2(100) NULL,
53 "TESTTITLE" NVARCHAR2(255) NULL,
54 "TESTABBR" NVARCHAR2(50) NULL,
55 "DATATYPE" NVARCHAR2(64) NULL,
56 "DATAUNIT" NVARCHAR2(30) NULL,
57 "DATATHRESHOLD" NVARCHAR2(64) NULL,
58 "TESTHELP" NCLOB NULL,
59 "ISDELETED" NVARCHAR2(1) NULL
60)
61;
62CREATE TABLE "VOSITE" (
63 "VOSITEID" NUMBER(0, -127) NOT NULL PRIMARY KEY,
64 "SITEID" NUMBER(38, 0) NULL REFERENCES "SITES" ("SITEID") DEFERRABLE INITIALLY DEFERRED,
65 "VOSITENAME" NVARCHAR2(255) NULL,
66 "TIER" NUMBER(0, -127) NULL
67)
68;
69CREATE TABLE "VOSITEMAP" (
70 "ID" NUMBER(11) NOT NULL PRIMARY KEY,
71 "SITEID" NUMBER(38, 0) NULL REFERENCES "SITES" ("SITEID") DEFERRABLE INITIALLY DEFERRED,
72 "VOSITEID" NUMBER(0, -127) NULL REFERENCES "VOSITE" ("VOSITEID") DEFERRABLE INITIALLY DEFERRED
73)
74;
75CREATE SEQUENCE VOSITEMAP_SQ;
76
77 CREATE OR REPLACE TRIGGER VOSITEMAP_TR
78 BEFORE INSERT ON "VOSITEMAP"
79 FOR EACH ROW
80 WHEN (new."ID" IS NULL)
81 BEGIN
82 SELECT VOSITEMAP_SQ.nextval
83 INTO :new."ID" FROM dual;
84 END;
85 /
86CREATE TABLE "TOPOLOGYGROUP" (
87 "GROUPID" NUMBER(38, 0) NOT NULL PRIMARY KEY,
88 "GROUPNAME" NVARCHAR2(256) NULL,
89 "VOID" NUMBER(38, 0) NOT NULL,
90 "ISVISIBLE" NUMBER(2, 0) NOT NULL
91)
92;
93CREATE TABLE "TOPOLOGYENTRY" (
94 "ID" NUMBER(11) NOT NULL PRIMARY KEY,
95 "GROUPID" NUMBER(38, 0) NOT NULL REFERENCES "TOPOLOGYGROUP" ("GROUPID") DEFERRABLE INITIALLY DEFERRED,
96 "SITEID" NUMBER(38, 0) NOT NULL
97)
98;
99CREATE SEQUENCE TOPOLOGYENTRY_SQ;
100
101 CREATE OR REPLACE TRIGGER TOPOLOGYENTRY_TR
102 BEFORE INSERT ON "TOPOLOGYENTRY"
103 FOR EACH ROW
104 WHEN (new."ID" IS NULL)
105 BEGIN
106 SELECT TOPOLOGYENTRY_SQ.nextval
107 INTO :new."ID" FROM dual;
108 END;
109 /
110CREATE TABLE "AVL_ATLAS" (
111 "AVAILABILITYID" NUMBER(11) CHECK ("AVAILABILITYID" >= 0) NOT NULL PRIMARY KEY,
112 "AVAILABILITYNAME" NVARCHAR2(255) NULL,
113 "BDIIFLAG" NVARCHAR2(1) NULL,
114 "VOID" NUMBER(38, 0) NOT NULL REFERENCES "VO" ("VOID") DEFERRABLE INITIALLY DEFERRED
115)
116;
117CREATE TABLE "AVAILABILITYINSTANCE" (
118 "AVAILABILITYINSTANCEID" NUMBER(0, -127) NOT NULL PRIMARY KEY,
119 "AVAILABILITYID" NUMBER(11) NOT NULL REFERENCES "AVL_ATLAS" ("AVAILABILITYID") DEFERRABLE INITIALLY DEFERRED,
120 "VOSITEID" NUMBER(0, -127) NOT NULL REFERENCES "VOSITE" ("VOSITEID") DEFERRABLE INITIALLY DEFERRED
121)
122;
123CREATE TABLE "AVAILABILITYTESTCRITICALITY" (
124 "ID" NUMBER(11) NOT NULL PRIMARY KEY,
125 "AVAILABILITY_ID" NUMBER(11) NOT NULL REFERENCES "AVL_ATLAS" ("AVAILABILITYID") DEFERRABLE INITIALLY DEFERRED,
126 "TESTDEF_ID" NUMBER(38, 0) NOT NULL REFERENCES "TESTDEF" ("TESTID") DEFERRABLE INITIALLY DEFERRED,
127 UNIQUE ("AVAILABILITY_ID", "TESTDEF_ID")
128)
129;
130CREATE SEQUENCE AVAILABILITYTESTCRITICALITY_SQ;
131
132 CREATE OR REPLACE TRIGGER AVAILABILITYTESTCRITICALITY_TR
133 BEFORE INSERT ON "AVAILABILITYTESTCRITICALITY"
134 FOR EACH ROW
135 WHEN (new."ID" IS NULL)
136 BEGIN
137 SELECT AVAILABILITYTESTCRITICALITY_SQ.nextval
138 INTO :new."ID" FROM dual;
139 END;
140 /
141CREATE INDEX "VOSITE_SITEID" ON "VOSITE" ("SITEID");
142CREATE INDEX "VOSITEMAP_SITEID" ON "VOSITEMAP" ("SITEID");
143CREATE INDEX "VOSITEMAP_VOSITEID" ON "VOSITEMAP" ("VOSITEID");
144CREATE INDEX "TOPOLOGYENTRY_GROUPID" ON "TOPOLOGYENTRY" ("GROUPID");
145CREATE INDEX "AVL_ATLAS_VOID" ON "AVL_ATLAS" ("VOID");
146CREATE INDEX "AVAILABILITYINSTANCE_AVAILC314" ON "AVAILABILITYINSTANCE" ("AVAILABILITYID");
147CREATE INDEX "AVAILABILITYINSTANCE_VOSITEID" ON "AVAILABILITYINSTANCE" ("VOSITEID");
148COMMIT;
Back to Top