home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 December
/
PCWorld_1998-12_cd.iso
/
software
/
sybase
/
ASA
/
asa60.exe
/
data1.cab
/
scripts_files
/
mksadb50.sql
< prev
next >
Wrap
Text File
|
1998-07-27
|
30KB
|
1,035 lines
-- ************************************************************************
-- * Copyright (C) 1998 by Sybase Inc. All rights *
-- * reserved. No part of this software may be reproduced *
-- * in any form or by any means - graphic, electronic or *
-- * mechanical, including photocopying, recording, taping *
-- * or information storage and retrieval systems - except *
-- * with the written permission of Sybase Inc. *
-- *************************************************************************
--
-- WARNING: This is a program generated file. Do not edit.
--
CREATE VARIABLE @avoid_view_collisions char(1)
go
set @avoid_view_collisions = @ss_compatible
go
create table SYS.SYSTABLE (
table_id smallint NOT NULL,
file_id smallint NOT NULL,
count int NOT NULL,
first_page int NOT NULL,
last_page int NOT NULL,
primary_root int NOT NULL,
creator smallint NOT NULL,
table_name char(128) NOT NULL,
table_type char(10) NOT NULL,
view_def long varchar,
remarks long varchar,
replicate char(1) NOT NULL,
existing_obj char(1),
remote_location long varchar,
remote_objtype char(1),
srvid int
)
go
create table SYS.SYSCOLUMN (
table_id smallint NOT NULL,
column_id smallint NOT NULL,
pkey char(1) NOT NULL,
domain_id smallint NOT NULL,
nulls char(1) NOT NULL,
width smallint NOT NULL,
scale smallint NOT NULL,
estimate int NOT NULL,
column_name char(128) NOT NULL,
remarks long varchar,
"default" long varchar,
"check" long varchar,
user_type smallint,
format_str char(128),
column_type char(1) NOT NULL,
remote_name varchar(128),
remote_type smallint
)
go
alter table SYS.SYSTABLE add PRIMARY KEY ( table_id )
go
alter table SYS.SYSCOLUMN add PRIMARY KEY ( table_id, column_id )
go
create table SYS.SYSINDEX (
table_id smallint NOT NULL,
index_id smallint NOT NULL,
root int NOT NULL,
file_id smallint NOT NULL,
"unique" char(1) NOT NULL,
creator smallint NOT NULL,
index_name char(128) NOT NULL,
remarks long varchar,
PRIMARY KEY ( table_id, index_id )
)
go
create table SYS.SYSIXCOL (
table_id smallint NOT NULL,
index_id smallint NOT NULL,
sequence smallint NOT NULL,
column_id smallint NOT NULL,
"order" char(1) NOT NULL,
PRIMARY KEY ( table_id, index_id, sequence )
)
go
create table SYS.SYSFOREIGNKEY (
foreign_table_id smallint NOT NULL,
foreign_key_id smallint NOT NULL,
primary_table_id smallint NOT NULL,
root int NOT NULL,
check_on_commit char(1) NOT NULL,
nulls char(1) NOT NULL,
role char(128) NOT NULL,
remarks long varchar,
PRIMARY KEY ( foreign_table_id, foreign_key_id )
)
go
create table SYS.SYSFKCOL (
foreign_table_id smallint NOT NULL,
foreign_key_id smallint NOT NULL,
foreign_column_id smallint NOT NULL,
primary_column_id smallint NOT NULL,
PRIMARY KEY ( foreign_table_id, foreign_key_id, foreign_column_id )
)
go
create table SYS.SYSFILE (
file_id smallint NOT NULL,
file_name long varchar NOT NULL,
dbspace_name char(128) NOT NULL,
PRIMARY KEY ( file_id )
)
go
create table SYS.SYSDOMAIN (
domain_id smallint NOT NULL,
domain_name char(128) NOT NULL,
type_id smallint NOT NULL,
"precision" smallint,
PRIMARY KEY ( domain_id )
)
go
create table SYS.SYSUSERPERM (
user_id smallint NOT NULL,
user_name char(128) NOT NULL,
password binary(36),
resourceauth char(1) NOT NULL,
dbaauth char(1) NOT NULL,
scheduleauth char(1) NOT NULL,
publishauth char(1) NOT NULL,
remotedbaauth char(1) NOT NULL,
user_group char(1) NOT NULL,
remarks long varchar,
PRIMARY KEY ( user_id )
)
go
create table SYS.SYSTABLEPERM (
stable_id smallint NOT NULL,
grantee smallint NOT NULL,
grantor smallint NOT NULL,
ttable_id smallint NOT NULL,
selectauth char(1) NOT NULL,
insertauth char(1) NOT NULL,
deleteauth char(1) NOT NULL,
updateauth char(1) NOT NULL,
updatecols char(1) NOT NULL,
alterauth char(1) NOT NULL,
referenceauth char(1) NOT NULL,
PRIMARY KEY ( stable_id, grantee, grantor )
)
go
create table SYS.SYSCOLPERM (
table_id smallint NOT NULL,
grantee smallint NOT NULL,
grantor smallint NOT NULL,
column_id smallint NOT NULL,
privilege_type smallint NOT NULL,
is_grantable char(1) NOT NULL,
PRIMARY KEY ( table_id, grantee, grantor, column_id, privilege_type
)
)
go
create table SYS.SYSOPTION (
user_id smallint NOT NULL,
"option" char(128) NOT NULL,
"setting" long varchar NOT NULL,
)
go
create table SYS.SYSGROUP (
group_id smallint NOT NULL,
group_member smallint NOT NULL,
PRIMARY KEY ( group_id, group_member )
)
go
create table SYS.SYSCOLLATION (
collation_id smallint NOT NULL,
collation_label char(10) NOT NULL,
collation_name char(128) NOT NULL,
collation_order BINARY(1280) NOT NULL,
PRIMARY KEY ( collation_id )
)
go
insert into SYS.SYSFILE values ( 0 , @dbfilename, 'SYSTEM'
)
go
INSERT INTO SYS.SYSDOMAIN VALUES ( 1, 'smallint', 5, 5 )
go
INSERT INTO SYS.SYSDOMAIN VALUES ( 2, 'integer', 4, 10 )
go
INSERT INTO SYS.SYSDOMAIN VALUES ( 3, 'numeric', 2, NULL )
go
INSERT INTO SYS.SYSDOMAIN VALUES ( 4, 'float', 7, 7 )
go
INSERT INTO SYS.SYSDOMAIN VALUES ( 5, 'double', 8, 15 )
go
INSERT INTO SYS.SYSDOMAIN VALUES ( 6, 'date', 9, NULL )
go
INSERT INTO SYS.SYSDOMAIN VALUES ( 7, 'char', 1, NULL )
go
INSERT INTO SYS.SYSDOMAIN VALUES ( 8, 'char', 1, NULL )
go
INSERT INTO SYS.SYSDOMAIN VALUES ( 9, 'varchar', 12, NULL )
go
INSERT INTO SYS.SYSDOMAIN VALUES ( 10, 'long varchar', -1, NULL )
go
INSERT INTO SYS.SYSDOMAIN VALUES ( 11, 'binary', -2, NULL )
go
INSERT INTO SYS.SYSDOMAIN VALUES ( 12, 'long binary', -4, NULL )
go
INSERT INTO SYS.SYSDOMAIN VALUES ( 13, 'timestamp', 11, NULL )
go
INSERT INTO SYS.SYSDOMAIN VALUES ( 14, 'time', 10, NULL )
go
INSERT INTO SYS.SYSDOMAIN VALUES ( 19, 'tinyint', -6, 3 )
go
INSERT INTO SYS.SYSDOMAIN VALUES ( 20, 'bigint', -5, 20 )
go
INSERT INTO SYS.SYSDOMAIN VALUES ( 21, 'unsigned int', -9, 10 )
go
INSERT INTO SYS.SYSDOMAIN VALUES ( 22, 'unsigned smallint', -10, 5 )
go
INSERT INTO SYS.SYSDOMAIN VALUES ( 23, 'unsigned bigint', -11, 21 )
go
INSERT INTO SYS.SYSDOMAIN VALUES ( 24, 'bit', -7, 1 )
go
INSERT INTO SYS.SYSDOMAIN VALUES ( 25, 'java.lang.Object', 0, NULL )
go
INSERT INTO SYS.SYSDOMAIN VALUES ( 26, 'java serialization', -4, NULL )
go
INSERT INTO SYS.SYSDOMAIN VALUES ( 27, 'decimal', 2, NULL )
go
INSERT INTO SYS.SYSDOMAIN VALUES ( 28, 'varbinary', -2, NULL )
go
import collseqs.sql
import custom.sql
COMMIT WORK
go
RESET COLLATION @default_collation
go
INSERT INTO SYS.SYSUSERPERM
VALUES ( 0 , 'SYS', NULL, 'Y', 'Y', 'Y', 'N', 'N', 'Y', NULL )
go
INSERT INTO SYS.SYSUSERPERM
VALUES ( 1 , 'DBA', NULL, 'Y', 'Y', 'Y', 'N', 'N', 'N', NULL )
go
INSERT INTO SYS.SYSUSERPERM
VALUES ( 2 , 'PUBLIC', NULL, 'N', 'N', 'N', 'N', 'N', 'Y', NULL )
go
INSERT INTO SYS.SYSGROUP
VALUES ( 0 , 2 )
go
INSERT INTO SYS.SYSGROUP
VALUES ( 2 , 1 )
go
INSERT INTO SYS.SYSUSERPERM
VALUES ( 3 , 'dbo', NULL, 'Y', 'Y', 'N', 'N', 'N', 'Y', NULL )
go
INSERT INTO SYS.SYSGROUP VALUES ( 3 , 2 )
go
INSERT INTO SYS.SYSGROUP VALUES ( 0 , 3 )
go
ALTER TABLE SYS.SYSOPTION ADD PRIMARY KEY ( user_id, "option" )
go
CREATE TABLE SYS.SYSPROCEDURE (
proc_id smallint NOT NULL,
creator smallint NOT NULL,
proc_name char(128) NOT NULL,
proc_defn long varchar,
remarks long varchar,
replicate char(1) NOT NULL,
PRIMARY KEY (proc_id) )
go
GRANT SELECT on SYS.SYSPROCEDURE to SYS
go
CREATE TABLE SYS.SYSPROCPARM (
proc_id smallint NOT NULL,
parm_id smallint NOT NULL,
parm_type smallint NOT NULL,
parm_mode_in char(1) NOT NULL,
parm_mode_out char(1) NOT NULL,
domain_id smallint NOT NULL,
width smallint NOT NULL,
scale smallint NOT NULL,
parm_name char(128) NOT NULL,
remarks long varchar,
"default" long varchar,
user_type int,
PRIMARY KEY (proc_id,parm_id))
go
GRANT SELECT on SYS.SYSPROCPARM to SYS
go
CREATE TABLE SYS.SYSTRIGGER (
trigger_id smallint NOT NULL,
table_id smallint NOT NULL,
event char(1) NOT NULL,
trigger_time char(1) NOT NULL,
trigger_order smallint,
foreign_table_id smallint ,
foreign_key_id smallint,
referential_action char(1),
trigger_name char(128),
trigger_defn long varchar NOT NULL,
remarks long varchar,
PRIMARY KEY (trigger_id ))
go
GRANT SELECT on SYS.SYSTRIGGER to SYS
go
CREATE TABLE SYS.SYSPROCPERM (
proc_id smallint NOT NULL,
grantee smallint NOT NULL,
PRIMARY KEY ( proc_id, grantee) )
go
GRANT SELECT on SYS.SYSPROCPERM to SYS
go
CREATE TABLE SYS.SYSPUBLICATION (
publication_id smallint NOT NULL,
creator smallint NOT NULL,
publication_name char(128) NOT NULL,
remarks long varchar,
PRIMARY KEY (publication_id)
)
go
GRANT SELECT on SYS.SYSPUBLICATION to SYS
go
create table SYS.SYSARTICLE (
publication_id smallint NOT NULL,
table_id smallint NOT NULL,
where_expr long varchar,
subscribe_by_expr long varchar,
query char(1) NOT NULL,
PRIMARY KEY (publication_id, table_id)
)
go
GRANT SELECT on SYS.SYSARTICLE to SYS
go
create table SYS.SYSARTICLECOL (
publication_id smallint NOT NULL,
table_id smallint NOT NULL,
column_id smallint NOT NULL,
PRIMARY KEY (publication_id, table_id, column_id)
)
go
GRANT SELECT on SYS.SYSARTICLECOL to SYS
go
create table SYS.SYSREMOTEUSER (
user_id smallint NOT NULL,
consolidate char(1) NOT NULL,
type_id smallint NOT NULL,
address long varchar NOT NULL,
frequency char(1) NOT NULL,
send_time time,
log_send numeric(20,0) NOT NULL,
time_sent timestamp,
log_sent numeric(20,0) NOT NULL,
confirm_sent numeric(20,0) NOT NULL,
send_count integer NOT NULL,
resend_count integer NOT NULL,
time_received timestamp,
log_received numeric(20,0) NOT NULL,
confirm_received numeric(20,0),
receive_count integer NOT NULL,
rereceive_count integer NOT NULL,
PRIMARY KEY (user_id)
)
go
GRANT SELECT on SYS.SYSREMOTEUSER to SYS
go
create table SYS.SYSSUBSCRIPTION (
publication_id smallint NOT NULL,
user_id smallint NOT NULL,
subscribe_by char(128) NOT NULL,
created numeric(20,0) NOT NULL,
started numeric(20,0),
PRIMARY KEY (publication_id, user_id, subscribe_by)
)
go
GRANT SELECT on SYS.SYSSUBSCRIPTION to SYS
go
CREATE table SYS.SYSUSERMESSAGES (
error int NOT NULL,
uid smallint NOT NULL,
description varchar(255) NOT NULL,
langid smallint NOT NULL,
unique (error,langid)
)
go
GRANT SELECT on SYS.SYSUSERMESSAGES TO SYS, PUBLIC
go
CREATE table SYS.SYSUSERTYPE (
type_id smallint NOT NULL,
creator smallint NOT NULL,
domain_id smallint NOT NULL,
nulls char(1) NOT NULL,
width smallint NOT NULL,
scale smallint NOT NULL,
type_name char(128) NOT NULL,
"default" long varchar NULL,
"check" long varchar NULL,
format_str char(128),
super_type_id smallint NULL,
unique (type_name),
primary key (type_id)
)
go
ALTER TABLE SYS.SYSUSERTYPE ADD FOREIGN KEY super_type_id references
SYS.SYSUSERTYPE( type_id )
go
GRANT SELECT on SYS.SYSUSERTYPE TO SYS, PUBLIC
go
CREATE table SYS.SYSEXTENT (
file_id smallint NOT NULL,
extent_id smallint NOT NULL,
first_page int NOT NULL,
last_page int NOT NULL,
file_name long varchar NOT NULL,
primary key (file_id, extent_id),
)
go
GRANT SELECT on SYS.SYSEXTENT TO SYS, PUBLIC
go
CREATE table SYS.SYSREMOTETYPE (
type_id smallint NOT NULL,
type_name char(128) NOT NULL,
publisher_address long varchar NOT NULL,
remarks long varchar,
PRIMARY KEY (type_id)
)
go
GRANT SELECT on SYS.SYSREMOTETYPE to SYS
go
CREATE TABLE SYS.SYSSQLSERVERTYPE (
ss_user_type smallint NOT NULL,
ss_domain_id smallint NOT NULL,
ss_type_name varchar(30) NOT NULL,
primary_sa_domain_id smallint NOT NULL,
primary_sa_user_type smallint NULL,
PRIMARY KEY ( ss_user_type )
)
go
GRANT SELECT on SYS.SYSSQLSERVERTYPE TO SYS, PUBLIC
go
CREATE TABLE SYS.SYSTYPEMAP (
ss_user_type smallint NOT NULL,
sa_domain_id smallint NOT NULL,
sa_user_type smallint NULL,
nullable char(1) NULL
)
go
GRANT SELECT on SYS.SYSTYPEMAP TO SYS, PUBLIC
go
go
CREATE TABLE SYS.SYSLOGIN (
integrated_login_id char(128) NOT NULL,
login_uid smallint NOT NULL,
remarks long varchar,
PRIMARY KEY ( integrated_login_id )
)
go
create table SYS.SYSJAR (
jar_id smallint not null,
creator smallint not null,
jar_name long varchar not null,
jar_file long varchar,
create_time timestamp not null,
update_time timestamp not null,
remarks long varchar,
primary key ( jar_id )
)
go
create table SYS.SYSJAVACLASS (
class_id smallint not null,
replaced_by smallint ,
creator smallint not null,
jar_id smallint ,
type_id smallint,
class_name long varchar not null,
public char(1) not null,
component_id smallint ,
create_time timestamp not null,
update_time timestamp not null,
class_descriptor long binary,
remarks long varchar,
primary key ( class_id ),
foreign key ( replaced_by )
references SYS.SYSJAVACLASS( class_id )
)
go
create table SYS.SYSJARCOMPONENT (
component_id smallint not null,
jar_id smallint ,
component_name long varchar,
component_type char(1),
create_time timestamp not null,
contents long binary,
remarks long varchar,
primary key ( component_id )
)
go
create table SYS.SYSCOLLATIONMAPPINGS (
collation_label char(10) NOT NULL,
collation_name char(128) NOT NULL,
cs_label char(128),
so_case_label char(128),
so_caseless_label char(128),
jdk_label char(128),
PRIMARY KEY ( collation_label )
)
go
import collsqmp.sql
import custmap.sql
CREATE TABLE SYS.SYSSERVERS (
srvid int NOT NULL,
srvname varchar(128) NOT NULL,
srvclass long varchar NOT NULL,
srvinfo long varchar,
srvreadonly char(1) NOT NULL,
PRIMARY KEY ( srvid )
)
go
GRANT SELECT on SYS.SYSSERVERS TO SYS
go
CREATE TABLE SYS.SYSEXTERNLOGINS (
user_id smallint NOT NULL,
srvid int NOT NULL,
remote_login varchar(128),
remote_password varbinary(128),
PRIMARY KEY ( user_id, srvid )
)
go
GRANT SELECT on SYS.SYSEXTERNLOGINS TO SYS
go
alter table SYS.SYSEXTERNLOGINS add foreign key for SYS.SYSUSERPERM
( user_id is user_id )
go
alter table SYS.SYSEXTERNLOGINS add foreign key for SYS.SYSSERVERS
( srvid is srvid )
go
alter table SYS.SYSTABLE add foreign key for SYS.SYSSERVERS
( srvid is srvid )
go
alter table SYSTABLE add foreign key for SYSFILE
go
alter table SYSTABLE add foreign key for SYSUSERPERM
( creator is user_id )
go
alter table SYSCOLUMN add foreign key for SYSTABLE
go
alter table SYSCOLUMN add foreign key for SYSDOMAIN
go
alter table SYSINDEX add foreign key for SYSTABLE
go
alter table SYSINDEX add foreign key for SYSUSERPERM
( creator is user_id )
go
alter table SYSIXCOL add foreign key for SYSINDEX
go
alter table SYSIXCOL add foreign key for SYSCOLUMN
go
alter table SYSFOREIGNKEY add foreign_table foreign key for SYSTABLE
( foreign_table_id is table_id )
go
alter table SYSFOREIGNKEY add primary_table foreign key for SYSTABLE
( primary_table_id is table_id )
go
alter table SYSFKCOL add foreign key for SYSFOREIGNKEY
go
alter table SYSFKCOL add foreign key for SYSCOLUMN
( foreign_table_id is table_id, foreign_column_id is column_id )
go
alter table SYSTABLEPERM add foreign key for SYSTABLE
( stable_id is table_id )
go
alter table SYSTABLEPERM add future foreign key for SYSTABLE
( ttable_id is table_id )
go
alter table SYSTABLEPERM add grantor foreign key for SYSUSERPERM
( grantor is user_id )
go
alter table SYSTABLEPERM add grantee foreign key for SYSUSERPERM
( grantee is user_id )
go
alter table SYSCOLPERM add foreign key for SYSCOLUMN
go
alter table SYSCOLPERM add grantor foreign key for SYSUSERPERM
( grantor is user_id )
go
alter table SYSCOLPERM add grantee foreign key for SYSUSERPERM
( grantee is user_id )
go
alter table SYSOPTION add foreign key for SYSUSERPERM
go
alter table SYSGROUP add group_id foreign key for SYSUSERPERM
( group_id is user_id )
go
alter table SYSGROUP add group_member foreign key for SYSUSERPERM
( group_member is user_id )
go
alter table SYSLOGIN add foreign key for SYSUSERPERM
( login_uid is user_id )
go
alter table SYSJAVACLASS add foreign key for SYSJARCOMPONENT
go
alter table SYSJARCOMPONENT add foreign key for SYSJAR
go
alter table SYSJAVACLASS add foreign key for SYSUSERPERM
( creator is user_id )
go
alter table SYSJAVACLASS add foreign key for SYSUSERTYPE
go
ALTER table SYSPROCEDURE add foreign key for SYSUSERPERM
( creator is user_id )
go
ALTER table SYSPROCPARM add foreign key for SYSPROCEDURE
go
ALTER table SYSPROCPARM add foreign key for SYSDOMAIN
go
ALTER table SYSTRIGGER add foreign key for SYSTABLE
go
ALTER table SYSTRIGGER add foreign key for SYSFOREIGNKEY
go
ALTER table SYSPROCPERM add foreign key for SYSUSERPERM
( grantee is user_id )
go
ALTER table SYSPROCPERM add foreign key for SYSPROCEDURE
go
ALTER table SYSPUBLICATION add foreign key for SYSUSERPERM
( creator is user_id )
go
ALTER table SYSARTICLE add foreign key for SYSPUBLICATION
go
ALTER table SYSARTICLE add foreign key for SYSTABLE
go
ALTER table SYSARTICLECOL add foreign key for SYSARTICLE
go
ALTER table SYSARTICLECOL add foreign key for SYSCOLUMN
go
ALTER table SYSREMOTEUSER add foreign key for SYSUSERPERM
go
ALTER table SYSSUBSCRIPTION add foreign key for SYSPUBLICATION
go
ALTER table SYSSUBSCRIPTION add foreign key for SYSREMOTEUSER
go
ALTER table SYSREMOTEUSER add foreign key for SYSREMOTETYPE
go
ALTER table SYSUSERTYPE add foreign key for SYSUSERPERM
(creator is user_id)
go
ALTER table SYSUSERTYPE add foreign key for SYSDOMAIN
go
ALTER table SYSCOLUMN add foreign key for SYSUSERTYPE
(user_type is type_id)
go
ALTER table SYSEXTENT add foreign key for SYSFILE
go
ALTER table SYSTYPEMAP add foreign key for SYSDOMAIN
(sa_domain_id is domain_id)
go
CREATE UNIQUE INDEX table_name ON SYSTABLE (table_name, creator )
go
CREATE UNIQUE INDEX index_name ON SYSINDEX (index_name, table_id )
go
CREATE UNIQUE INDEX user_name ON SYSUSERPERM (user_name )
go
CREATE UNIQUE INDEX role_name ON SYSFOREIGNKEY (role, foreign_table_id )
go
CREATE UNIQUE INDEX procedure_name ON SYSPROCEDURE
( proc_name, creator )
go
CREATE UNIQUE INDEX trigger_index ON SYSTRIGGER
( table_id, event, trigger_time, trigger_order )
go
CREATE UNIQUE INDEX trigger_name ON SYSTRIGGER
( trigger_name )
go
CREATE UNIQUE INDEX trigger_referential_actions ON SYSTRIGGER
( table_id, foreign_table_id, foreign_key_id, event )
go
CREATE UNIQUE INDEX publication_name ON SYSPUBLICATION
( publication_name, creator )
go
CREATE UNIQUE INDEX remote_address ON SYSREMOTEUSER
( type_id, address )
go
CREATE INDEX remote_frequency ON SYSREMOTEUSER
( frequency, send_time )
go
CREATE UNIQUE INDEX remote_type ON SYSREMOTETYPE
( type_name )
go
COMMIT WORK
go
go
CREATE UNIQUE INDEX jar_name ON SYSJAR ( jar_name )
go
GRANT CONNECT TO "DBA" IDENTIFIED BY "SQL"
go
import sysviews.sql
CREATE TABLE SYS.DUMMY ( dummy_col INT NOT NULL )
go
INSERT INTO SYS.DUMMY VALUES ( 0 )
go
GRANT SELECT on SYS.DUMMY to SYS
go
CREATE TABLE SYSINFO (
page_size smallint NOT NULL,
encryption char(1) NOT NULL,
blank_padding char(1) NOT NULL,
case_sensitivity char(1) NOT NULL,
default_collation char(10),
database_version smallint NOT NULL,
classes_version char(10)
)
go
INSERT INTO SYSINFO VALUES
(@page_size,
@encryption,
@blank_padding,
@case_sensitivity,
@default_collation,
@database_version,
'1.1.3' )
go
GRANT SELECT on SYS.SYSINFO to SYS
go
COMMIT WORK
go
import dbovws50.sql
grant select on SYSTABLE to SYS
go
grant select on SYSCOLUMN to SYS
go
grant select on SYSINDEX to SYS
go
grant select on SYSIXCOL to SYS
go
grant select on SYSFOREIGNKEY to SYS
go
grant select on SYSFKCOL to SYS
go
grant select on SYSFILE to SYS
go
grant select on SYSDOMAIN to SYS
go
grant select on SYSTABLEPERM to SYS
go
grant select on SYSCOLPERM to SYS
go
grant select on SYSOPTION to SYS
go
grant select on SYSGROUP to SYS
go
grant select on SYSCOLLATION to SYS
go
grant select on SYSCOLLATIONMAPPINGS to SYS
go
CREATE DOMAIN money numeric(19,4)
go
CREATE DOMAIN smallmoney numeric(10,4)
go
CREATE DOMAIN datetime timestamp
go
CREATE DOMAIN smalldatetime timestamp
go
CREATE DOMAIN text long varchar
go
CREATE DOMAIN image long binary
go
CREATE DOMAIN oldbit tinyint
go
CREATE DOMAIN sysname varchar(30) not null
go
go
grant connect to rs_systabgroup
go
grant group to rs_systabgroup
go
grant resource to rs_systabgroup
go
commit work
go
create table rs_systabgroup.rs_lastcommit (
origin int primary key,
origin_qid binary(36),
secondary_qid binary(36),
origin_time datetime,
commit_time datetime )
go
create table rs_systabgroup.rs_threads (
id int primary key,
seq int )
go
commit work
go
import sybprc50.sql
import saopts.sql
INSERT INTO SYS.SYSREMOTETYPE ( type_id, type_name, publisher_address )
VALUES ( 0, 'FILE', '' )
go
INSERT INTO SYS.SYSREMOTETYPE ( type_id, type_name, publisher_address )
VALUES ( 1, 'MAPI', '' )
go
INSERT INTO SYS.SYSREMOTETYPE ( type_id, type_name, publisher_address )
VALUES ( 2, 'VIM', '' )
go
INSERT INTO SYS.SYSREMOTETYPE ( type_id, type_name, publisher_address )
VALUES ( 3, 'SMTP', '' )
go
INSERT INTO SYS.SYSREMOTETYPE ( type_id, type_name, publisher_address )
VALUES ( 4, 'FTP', '' )
go
go
INSERT INTO SYS.SYSSQLSERVERTYPE
VALUES ( 1 , 47, 'char', 8 , NULL )
go
INSERT INTO SYS.SYSSQLSERVERTYPE
VALUES ( 2 , 39, 'varchar', 9 , NULL )
go
INSERT INTO SYS.SYSSQLSERVERTYPE
VALUES ( 3 , 45, 'binary', 11 , NULL )
go
INSERT INTO SYS.SYSSQLSERVERTYPE
VALUES ( 4 ,37, 'varbinary', 11 , NULL )
go
INSERT INTO SYS.SYSSQLSERVERTYPE
VALUES ( 5 , 48, 'tinyint', 19 , NULL )
go
INSERT INTO SYS.SYSSQLSERVERTYPE
VALUES ( 6 , 52, 'smallint', 1 , NULL )
go
INSERT INTO SYS.SYSSQLSERVERTYPE
VALUES ( 7 , 56, 'int', 2 , NULL )
go
INSERT INTO SYS.SYSSQLSERVERTYPE
VALUES ( 8 , 62, 'float', 5 , NULL )
go
INSERT INTO SYS.SYSSQLSERVERTYPE
VALUES ( 10 , 63, 'numeric', 3 , NULL )
go
INSERT INTO SYS.SYSSQLSERVERTYPE
VALUES ( 11 , 60, 'money', 3 , 101 )
go
INSERT INTO SYS.SYSSQLSERVERTYPE
VALUES ( 12 , 61, 'datetime', 13 , 103 )
go
INSERT INTO SYS.SYSSQLSERVERTYPE
VALUES ( 13 , 38, 'intn', 2 , NULL )
go
INSERT INTO SYS.SYSSQLSERVERTYPE
VALUES ( 14 , 109, 'floatn', 5 , NULL )
go
INSERT INTO SYS.SYSSQLSERVERTYPE
VALUES ( 15 , 111, 'datetimn', 13 , 103 )
go
INSERT INTO SYS.SYSSQLSERVERTYPE
VALUES ( 16 , 50, 'bit', 24 , NULL )
go
INSERT INTO SYS.SYSSQLSERVERTYPE
VALUES ( 17 , 110, 'moneyn', 3 , 101 )
go
INSERT INTO SYS.SYSSQLSERVERTYPE
VALUES ( 18 , 39, 'sysname', 9 , 108 )
go
INSERT INTO SYS.SYSSQLSERVERTYPE
VALUES ( 19 , 35, 'text', 10 , 105 )
go
INSERT INTO SYS.SYSSQLSERVERTYPE
VALUES ( 20 , 34, 'image', 12 , 106 )
go
INSERT INTO SYS.SYSSQLSERVERTYPE
VALUES ( 21 ,122, 'smallmoney', 3 , 102 )
go
INSERT INTO SYS.SYSSQLSERVERTYPE
VALUES ( 22 ,58, 'smalldatetime', 13 , 104 )
go
INSERT INTO SYS.SYSSQLSERVERTYPE
VALUES ( 23 , 59, 'real', 4 , NULL )
go
go
go
INSERT INTO SYS.SYSSQLSERVERTYPE
VALUES ( 26 , 55, 'decimal', 3 , NULL )
go
INSERT INTO SYS.SYSSQLSERVERTYPE
VALUES ( 27 , 106, 'decimaln', 3 , NULL )
go
INSERT INTO SYS.SYSSQLSERVERTYPE
VALUES ( 28 , 108, 'numericn', 3 , NULL )
go
INSERT INTO SYS.SYSSQLSERVERTYPE
VALUES ( 80 ,37, 'timestamp', 13 , NULL )
go
INSERT INTO SYS.SYSTYPEMAP
VALUES ( 6 , 1 , NULL, NULL )
go
INSERT INTO SYS.SYSTYPEMAP
VALUES ( 7 , 2 , NULL, 'N' )
go
INSERT INTO SYS.SYSTYPEMAP
VALUES ( 13 , 2 , NULL, 'Y' )
go
INSERT INTO SYS.SYSTYPEMAP
VALUES ( 10 , 3 , NULL, 'N' )
go
INSERT INTO SYS.SYSTYPEMAP
VALUES ( 28 , 3 , NULL, 'Y' )
go
INSERT INTO SYS.SYSTYPEMAP
VALUES ( 23 , 4 , NULL, NULL )
go
INSERT INTO SYS.SYSTYPEMAP
VALUES ( 8 , 5 , NULL, 'N' )
go
INSERT INTO SYS.SYSTYPEMAP
VALUES ( 14 , 5 , NULL, 'Y' )
go
INSERT INTO SYS.SYSTYPEMAP
VALUES ( 12 , 6 , NULL, 'N' )
go
INSERT INTO SYS.SYSTYPEMAP
VALUES ( 15 , 6 , NULL, 'Y' )
go
INSERT INTO SYS.SYSTYPEMAP
VALUES ( 1 , 7 , NULL, NULL )
go
INSERT INTO SYS.SYSTYPEMAP
VALUES ( 2 , 9 , NULL, NULL )
go
INSERT INTO SYS.SYSTYPEMAP
VALUES ( 1 , 8 , NULL, NULL )
go
INSERT INTO SYS.SYSTYPEMAP
VALUES ( 19 , 10 , NULL, NULL )
go
INSERT INTO SYS.SYSTYPEMAP
VALUES ( 3 , 11 , NULL, NULL )
go
INSERT INTO SYS.SYSTYPEMAP
VALUES ( 20 , 12 , NULL, NULL )
go
INSERT INTO SYS.SYSTYPEMAP
VALUES ( 80 , 13 , NULL, NULL )
go
INSERT INTO SYS.SYSTYPEMAP
VALUES ( 12 , 14 , NULL, 'N' )
go
INSERT INTO SYS.SYSTYPEMAP
VALUES ( 15 , 14 , NULL, 'Y' )
go
INSERT INTO SYS.SYSTYPEMAP
VALUES ( 5 , 19 , NULL, NULL )
go
INSERT INTO SYS.SYSTYPEMAP
VALUES ( 16 , 24 , NULL, NULL )
go
INSERT INTO SYS.SYSTYPEMAP
VALUES ( 11 , 3 , 101, 'N' )
go
INSERT INTO SYS.SYSTYPEMAP
VALUES ( 17 , 3 , 101, 'Y' )
go
INSERT INTO SYS.SYSTYPEMAP
VALUES ( 21 , 3 , 102, NULL )
go
INSERT INTO SYS.SYSTYPEMAP
VALUES ( 12 , 13 , 103, 'N' )
go
INSERT INTO SYS.SYSTYPEMAP
VALUES ( 15 , 13 , 103, 'Y' )
go
INSERT INTO SYS.SYSTYPEMAP
VALUES ( 22 , 13 , 104, NULL )
go
INSERT INTO SYS.SYSTYPEMAP
VALUES ( 19 , 10 , 105, NULL )
go
INSERT INTO SYS.SYSTYPEMAP
VALUES ( 20 , 12 , 106, NULL )
go
INSERT INTO SYS.SYSTYPEMAP
VALUES ( 18 , 9 , 108, NULL )
go
COMMIT WORK
go
go
import instjava.sql
create table dbo.EXCLUDEOBJECT (
name char( 128 ),
type char(1),
PRIMARY KEY( name, type )
);
grant select on dbo.EXCLUDEOBJECT to PUBLIC;
go
import mkexclud.sql
go