/*#ifndef DBOVWS60_SQL_HEADER **#define DBOVWS60_SQL_HEADER **static char SCCS_ID[] = @(#) LIV 2001/08/01 11:25:31 dbovws60.sql \main\callpilot2.0\1 ~ ** LIV 2001/08/01 11:25:31 dbovws60.sql \main\callpilot2.0\1 ~ ** [liv/Database/nbdb0078] ** **#endif */ -- ************************************************************************* -- * Copyright (C) 1988-2000, 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 table dbo.RowGenerator ( row_num smallint not null primary key ) IN SYSTEM go GRANT INSERT on dbo.RowGenerator TO SYS go GRANT SELECT on dbo.RowGenerator TO dbo, PUBLIC go CREATE VARIABLE I INT go BEGIN SET I = 1; WHILE I <= 255 LOOP INSERT INTO dbo.RowGenerator VALUES( I ); SET I = I + 1; END LOOP; END go CREATE view dbo.sysalternates ( suid, altsuid ) as SELECT cast(0 as unsigned int ), cast(0 as unsigned int ) FROM SYS.DUMMY WHERE dummy_col <> 0 go GRANT SELECT ON dbo.sysalternates TO dbo, PUBLIC go CREATE view dbo.syscolumns (id, number, colid, status, "type", length, offset, usertype, cdefault, "domain", "name", printfmt, prec, scale) as select cast(col.table_id+100000 as unsigned bigint ), cast(0 as smallint), cast(col.column_id as unsigned int ), cast(if nulls='Y' then 8 else 0 endif as smallint), cast(sst.ss_domain_id as smallint), cast(col.width as smallint), cast(0 as smallint), cast( (if col.user_type is not null and col.user_type> (select "max"(sa_user_type) from SYS.SYSTYPEMAP where sa_user_type is not null) then col.user_type else sst.ss_user_type endif) as smallint), cast(0 as integer), cast(0 as integer), cast(col.column_name as varchar(128)), cast(null as varchar(255)), cast(col.width as smallint), cast(col.scale as smallint) from SYS.SYSCOLUMN as col,SYS.SYSTYPEMAP as map,SYS.SYSSQLSERVERTYPE as sst where (map.sa_user_type=col.user_type or (map.sa_user_type is null and (col.user_type is null or col.user_type>108))) and map.sa_domain_id=col.domain_id and map.ss_user_type=sst.ss_user_type and (nullable='N' or nullable is null) union all select cast(parm.proc_id+200000 as integer), cast(0 as smallint), cast(parm.parm_id as smallint), cast(0 as smallint), cast(sst.ss_domain_id as smallint), cast(parm.width as smallint), cast(0 as smallint), cast(sst.ss_user_type as smallint), cast(0 as integer), cast(0 as integer), cast(parm.parm_name as varchar(128)), cast(null as varchar(255)), cast(parm.width as smallint), cast(parm.scale as smallint) from SYS.SYSPROCPARM as parm,SYS.SYSTYPEMAP as map,SYS.SYSSQLSERVERTYPE as sst where map.sa_user_type is null and parm.parm_type=0 and map.sa_domain_id=parm.domain_id and map.ss_user_type=sst.ss_user_type and (nullable='N' or nullable is null) go GRANT SELECT ON dbo.syscolumns TO dbo, PUBLIC go CREATE view dbo.syscomments ( id, number, colid, texttype, language, text, colid2 ) as SELECT cast(table_id+100000 as unsigned bigint ), cast(0 as smallint), cast(row_num as unsigned int ), cast(0 as smallint), cast(0 as smallint), cast(substr(view_def,(row_num-1)*80+1,80) as varchar(255)), cast(0 as unsigned int ) FROM SYS.SYSTABLE, dbo.RowGenerator WHERE table_type='VIEW' AND row_num <= length(view_def)/80+1 UNION ALL SELECT cast(table_id+100000 as unsigned bigint ), cast(0 as smallint), cast(row_num as smallint), cast(1 as smallint), cast(0 as smallint), cast(substr(remarks,(row_num-1)*80+1,80) as varchar(255)), cast(0 as smallint) FROM SYS.SYSTABLE, dbo.RowGenerator WHERE table_type='VIEW' AND row_num <= length(remarks)/80+1 UNION ALL SELECT cast(proc_id+200000 as int), cast(0 as smallint), cast(row_num as smallint), cast(0 as smallint), cast(0 as smallint), cast(substr(proc_defn,(row_num-1)*80+1,80) as varchar(255)), cast(0 as smallint) FROM SYS.SYSPROCEDURE, dbo.RowGenerator WHERE row_num <= length(proc_defn)/80+1 UNION ALL SELECT cast(proc_id+200000 as int), cast(0 as smallint), cast(row_num as smallint), cast(1 as smallint), cast(0 as smallint), cast(substr(remarks,(row_num-1)*80+1,80) as varchar(255)), cast(0 as smallint) FROM SYS.SYSPROCEDURE, dbo.RowGenerator WHERE row_num <= length(remarks)/80+1 UNION ALL SELECT cast(trigger_id+300000 as int), cast(0 as smallint), cast(row_num as smallint), cast(0 as smallint), cast(0 as smallint), cast(substr(trigger_defn,(row_num-1)*80+1,80) as varchar(255)), cast(0 as smallint) FROM SYS.SYSTRIGGER, dbo.RowGenerator WHERE row_num <= length(trigger_defn)/80+1 UNION ALL SELECT cast(trigger_id+300000 as int), cast(0 as smallint), cast(row_num as smallint), cast(1 as smallint), cast(0 as smallint), cast(substr(remarks,(row_num-1)*80+1,80) as varchar(255)), cast(0 as smallint) FROM SYS.SYSTRIGGER, dbo.RowGenerator WHERE row_num <= length(remarks)/80+1 go GRANT SELECT ON dbo.syscomments TO dbo, PUBLIC go CREATE view dbo.sysconstraints ( colid, spare1, constrid, tableid, error, status, spare2 ) as SELECT cast(0 as unsigned int ), cast(0 as smallint), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int) FROM SYS.DUMMY WHERE dummy_col <> 0 go GRANT SELECT ON dbo.sysconstraints TO dbo, PUBLIC go CREATE view dbo.sysdepends ( id, number, depid, depnumber, status, selall, resultobj, readobj ) as SELECT cast(0 as int), cast(0 as smallint), cast(0 as int), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint) FROM SYS.DUMMY WHERE dummy_col <> 0 go GRANT SELECT ON dbo.sysdepends TO dbo, PUBLIC go CREATE view dbo.sysindexes ( name, id, indid, doampg, ioampg, oampgtrips, status2, ipgtrips, "first", root, distribution, usagecnt, segment, status, rowpage, minlen, maxlen, maxirow, keycnt, keysl, keys2, soid, csid ) as SELECT cast(index_name as varchar(128)), cast(table_id+100000 as unsigned bigint ), cast(index_id as unsigned int ), cast(0 as int), cast(0 as int), cast(0 as int), cast((if "unique" = 'U' then 2 else 0 endif) as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as smallint), cast(0 as smallint), cast((if "unique" = 'N' then 1 else 1+2 endif) as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(NULL as binary(255)), cast(NULL as binary(255)), cast(0 as smallint), cast(0 as smallint) FROM SYS.SYSINDEX UNION ALL SELECT cast(table_name as char(128)), cast(table_id+100000 as unsigned bigint ), cast(0 as smallint), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(NULL as binary(255)), cast(NULL as binary(255)), cast(0 as smallint), cast(0 as smallint) FROM SYS.SYSTABLE UNION ALL SELECT cast(table_name as char(128)), cast(t.table_id+100000 as unsigned bigint ), cast(20000+foreign_key_id as smallint), cast(0 as int), cast(0 as int), cast(0 as int), cast(1 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(NULL as binary(255)), cast(NULL as binary(255)), cast(0 as smallint), cast(0 as smallint) FROM SYS.SYSTABLE t, SYS.SYSFOREIGNKEY fk WHERE t.table_id = fk.foreign_table_id UNION ALL SELECT cast(table_name as char(128)), cast(t.table_id+100000 as unsigned bigint ), cast(10000 as smallint), cast(0 as int), cast(0 as int), cast(0 as int), cast(2 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as smallint), cast(0 as smallint), cast(1+2+2048 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(NULL as binary(255)), cast(NULL as binary(255)), cast(0 as smallint), cast(0 as smallint) FROM SYS.SYSTABLE t WHERE exists (select table_id from SYS.SYSCOLUMN where table_id = t.table_id and pkey = 'Y') go GRANT SELECT ON dbo.sysindexes TO dbo, PUBLIC go CREATE view dbo.syskeys ( id, "type", depid, keycnt, size, key1, key2, key3, key4, key5, key6, key7, key8, depkey1, depkey2, depkey3, depkey4, depkey5, depkey6, depkey7, depkey8 ) as SELECT cast(0 as int), cast(0 as smallint), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int) FROM SYS.DUMMY WHERE dummy_col <> 0 go GRANT SELECT ON dbo.syskeys TO dbo, PUBLIC go CREATE view dbo.syslogs ( xactid, op ) as SELECT cast(NULL as binary(6)), cast(0 as smallint) FROM SYS.DUMMY WHERE dummy_col <> 0 go GRANT SELECT ON dbo.syslogs TO dbo, PUBLIC go CREATE view dbo.sysobjects ( name, id, uid, type, userstat, sysstat, indexdel, schemacnt, sysstat2, crdate, expdate, deltrig, instrig, updtrig, seltrig, ckfirst, cache, audflags, objspare ) as SELECT cast(table_name as varchar(128)), cast(table_id+100000 as unsigned bigint ), cast(creator as unsigned int ), cast(if table_type='VIEW' then 'V' else if creator=0 then 'S' else 'U' endif endif as char(2)), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(NULL as date), cast(NULL as date), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as smallint), cast(0 as int), cast(0 as int) FROM SYS.SYSTABLE UNION ALL SELECT cast(proc_name as char(128)), cast(proc_id+200000 as int), cast(creator as unsigned int ), cast('P' as char(2)), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(NULL as date), cast(NULL as date), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as smallint), cast(0 as int), cast(0 as int) FROM SYS.SYSPROCEDURE UNION ALL SELECT cast(trigger_name as char(128)), cast(trigger_id+300000 as int), cast((select creator from SYS.SYSTABLE where table_id=SYS.SYSTRIGGER.table_id) as unsigned int ), cast('TR' as char(2)), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(NULL as date), cast(NULL as date), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as smallint), cast(0 as int), cast(0 as int) FROM SYS.SYSTRIGGER go GRANT SELECT ON dbo.sysobjects TO dbo, PUBLIC go CREATE view dbo.sysprocedures ( type, id, sequence, status, number ) as SELECT cast(0 as smallint), cast(0 as int), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint) FROM SYS.DUMMY WHERE dummy_col <> 0 go GRANT SELECT ON dbo.sysprocedures TO dbo, PUBLIC go CREATE view dbo.sysprotects ( id, uid, action, protecttype, columns, grantor ) as SELECT cast(0 as int), cast(0 as unsigned int ), cast(0 as smallint), cast(0 as smallint), cast(NULL as binary(32)), cast(0 as unsigned int ) FROM SYS.DUMMY WHERE dummy_col <> 0 go GRANT SELECT ON dbo.sysprotects TO dbo, PUBLIC go CREATE view dbo.sysreferences ( indexid, constrid, tableid, reftabid, keycnt, status, frgndbid, pmrydbid, spare2, fokey1, fokey2, fokey3, fokey4, fokey5, fokey6, fokey7, fokey8, fokey9, fokey10, fokey11, fokey12, fokey13, fokey14, fokey15, fokey16, refkey1, refkey2, refkey3, refkey4, refkey5, refkey6, refkey7, refkey8, refkey9, refkey10, refkey11, refkey12, refkey13, refkey14, refkey15, refkey16, frgndbname, pmrydbname ) as SELECT cast(0 as unsigned int ), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as int), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(NULL as varchar(30)), cast(NULL as varchar(30)) FROM SYS.DUMMY WHERE dummy_col <> 0 go GRANT SELECT ON dbo.sysreferences TO dbo, PUBLIC go CREATE view dbo.sysroles ( id, lrid, type, status ) as SELECT cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint) FROM SYS.DUMMY WHERE dummy_col <> 0 go GRANT SELECT ON dbo.sysroles TO dbo, PUBLIC go CREATE view dbo.syssegments ( segment, name, status ) as SELECT cast(0 as smallint), cast(NULL as varchar(128)), cast(0 as int) FROM SYS.DUMMY WHERE dummy_col <> 0 go GRANT SELECT ON dbo.syssegments TO dbo, PUBLIC go CREATE view dbo.systhresholds ( segment, free_space, status, proc_name, suid, currauth ) as SELECT cast(0 as smallint), cast(0 as int), cast(0 as smallint), cast(NULL as varchar(255)), cast(0 as unsigned int ), cast(NULL as binary(255)) FROM SYS.DUMMY WHERE dummy_col <> 0 go GRANT SELECT ON dbo.systhresholds TO dbo, PUBLIC go CREATE view dbo.systypes(uid, usertype, "variable", allowsnulls, "type", length, tdefault, "domain", "name", printfmt, prec, scale, ident, hierarchy) as select cast(0 as unsigned int ), cast(sst.ss_user_type as smallint), cast(0 as smallint), cast(1 as smallint), cast(ss_domain_id as smallint), cast(0 as smallint), cast(0 as integer), cast(0 as integer), cast(sst.ss_type_name as varchar(128)), cast(null as varchar(255)), cast("precision" as smallint), cast(null as smallint), cast(0 as smallint), cast(0 as smallint) from SYS.SYSDOMAIN,SYS.SYSSQLSERVERTYPE as sst where SYSDOMAIN.domain_id=primary_sa_domain_id and primary_sa_user_type is null union all select cast(creator as unsigned int ), cast(ss_user_type as smallint), cast(0 as smallint), cast((if nulls='Y' then 1 else 0 endif) as smallint), cast(ss_domain_id as smallint), cast(width as smallint), cast(0 as integer), cast(0 as integer), cast(sst.ss_type_name as varchar(128)), cast(null as varchar(255)), cast("precision" as smallint), cast(scale as smallint), cast((if isnull("default",'')='autoincrement' then 1 else 0 endif) as smallint), cast(0 as smallint) from SYS.SYSUSERTYPE as t,SYS.SYSDOMAIN as d,SYS.SYSSQLSERVERTYPE as sst where t.domain_id=d.domain_id and sst.primary_sa_domain_id=t.domain_id and sst.primary_sa_user_type=t.type_id union all select cast(creator as unsigned int ), cast(t.type_id as smallint), cast(0 as smallint), cast((if nulls='Y' then 1 else 0 endif) as smallint), cast(ss_domain_id as smallint), cast(width as smallint), cast(0 as integer), cast(0 as integer), cast(t.type_name as varchar(128)), cast(null as varchar(255)), cast("precision" as smallint), cast(scale as smallint), cast((if isnull("default",'')='autoincrement' then 1 else 0 endif) as smallint), cast(0 as smallint) from SYS.SYSUSERTYPE as t,SYS.SYSDOMAIN as d,SYS.SYSSQLSERVERTYPE as sst, SYS.SYSTYPEMAP as tm where t.domain_id=d.domain_id and tm.sa_domain_id=t.domain_id and tm.sa_user_type is null and t.type_id > (select "max"(sa_user_type) from SYS.SYSTYPEMAP where sa_user_type is not null) and sst.ss_user_type = tm.ss_user_type and (nullable='N' or nullable is null) go GRANT SELECT ON dbo.systypes TO dbo, PUBLIC go CREATE view dbo.sysusers ( suid, uid, gid, name, environ ) as SELECT cast(user_id as unsigned int ), cast(user_id as unsigned int ), cast(0 as unsigned int ), cast(user_name as varchar(128)), cast(NULL as varchar(255)) FROM SYS.SYSUSERPERM go GRANT SELECT ON dbo.sysusers TO dbo, PUBLIC go CREATE view dbo.syscharsets ( "type", id, csid, status, name, description, definition ) as SELECT cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(NULL as varchar(30)), cast(NULL as varchar(255)), cast(NULL as binary(10)) FROM SYS.DUMMY WHERE dummy_col <> 0 go GRANT SELECT ON dbo.syscharsets TO dbo, PUBLIC go CREATE view dbo.sysconfigures ( config, Value, "comment", status ) as SELECT cast(0 as smallint), cast(0 as int), cast(NULL as varchar(255)), cast(0 as smallint) FROM SYS.DUMMY WHERE dummy_col <> 0 go GRANT SELECT ON dbo.sysconfigures TO dbo, PUBLIC go CREATE view dbo.syscurconfigs ( config, Value, "comment", status ) as SELECT cast(0 as smallint), cast(0 as int), cast(NULL as varchar(255)), cast(0 as smallint) FROM SYS.DUMMY WHERE dummy_col <> 0 go GRANT SELECT ON dbo.syscurconfigs TO dbo, PUBLIC go CREATE view dbo.sysdatabases ( "name", dbid, suid, status, version, logptr, crdate, dumptrdate, status2, audflags, deftabaud, defvwaud, defpraud ) as SELECT cast('*' as varchar(128)), cast(0 as smallint), cast(0 as unsigned int ), cast(0 as smallint), cast(0 as smallint), cast(0 as int), cast(NULL as date), cast(NULL as date), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int) FROM SYS.DUMMY WHERE dummy_col <> 0 go GRANT SELECT ON dbo.sysdatabases TO dbo, PUBLIC go CREATE view dbo.sysdevices ( low, high, status, cntrltype, name, phyname, mirrorname ) as SELECT cast(0 as int), cast(0 as int), cast(0 as smallint), cast(0 as smallint), cast(NULL as varchar(128)), cast(NULL as varchar(127)), cast(NULL as varchar(127)) FROM SYS.DUMMY WHERE dummy_col <> 0 go GRANT SELECT ON dbo.sysdevices TO dbo, PUBLIC go CREATE view dbo.sysengines ( engine, osprocid, osprocname, status, affinitied, cur_kpid, last_kpid, idle_1, idle_2, idle_3, idle_4, starttime ) as SELECT cast(0 as smallint), cast(0 as int), cast(NULL as char(20)), cast(NULL as char(20)), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(0 as smallint), cast(NULL as date) FROM SYS.DUMMY WHERE dummy_col <> 0 go GRANT SELECT ON dbo.sysengines TO dbo, PUBLIC go CREATE view dbo.syslanguages ( langid, dateformat, datefirst, upgrade, name, alias, months, shortmonths, days ) as SELECT cast(0 as smallint), cast(NULL as char(3)), cast(0 as smallint), cast(0 as int), cast(NULL as varchar(30)), cast(NULL as varchar(30)), cast(NULL as varchar(251)), cast(NULL as varchar(119)), cast(NULL as varchar(216)) FROM SYS.DUMMY WHERE dummy_col <> 0 go GRANT SELECT ON dbo.syslanguages TO dbo, PUBLIC go CREATE view dbo.syslocks ( id, dbid, page, type, spid, class ) as SELECT cast(0 as int), cast(0 as smallint), cast(0 as int), cast(0 as smallint), cast(0 as smallint), cast(NULL as char(3)) FROM SYS.DUMMY WHERE dummy_col <> 0 go GRANT SELECT ON dbo.syslocks TO dbo, PUBLIC go CREATE view dbo.sysloginroles ( suid, srid, status ) as SELECT cast(0 as unsigned int ), cast(0 as smallint), cast(0 as smallint) FROM SYS.DUMMY WHERE dummy_col <> 0 go GRANT SELECT ON dbo.sysloginroles TO dbo, PUBLIC go CREATE view dbo.syslogins ( suid, status, accdate, totcpu, totio, spacelimit, timelimit, resultlimit, dbname, name, password, language, pwdate, audflags, fullname ) as SELECT cast(user_id as unsigned int ), cast(0 as smallint), cast(NULL as date), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(NULL as varchar(128)), cast(user_name as varchar(128)), cast(NULL as binary(128)), cast(NULL as varchar(30)), cast(NULL as date), cast(0 as int), cast(user_name as varchar(30)) FROM SYS.SYSUSERPERM go GRANT SELECT ON dbo.syslogins TO dbo, PUBLIC go CREATE view dbo.sysmessages ( error, severity, dlevel, description, langid, "sqlstate" ) as SELECT cast(0 as int), cast(0 as smallint), cast(0 as smallint), cast(NULL as varchar(255)), cast(0 as smallint), cast(NULL as varchar(5)) FROM SYS.DUMMY WHERE dummy_col <> 0 go GRANT SELECT ON dbo.sysmessages TO dbo, PUBLIC go CREATE view dbo.sysprocesses ( spid, kpid, enginenum, status, suid, hostname, program_name, hostprocess, cmd, cpu, physical_io, memusage, blocked, dbid, uid, gid, tran_name, time_blocked, network_pktsz ) as SELECT cast(0 as smallint), cast(0 as int), cast(0 as int), cast(NULL as char(12)), cast(0 as unsigned int ), cast(NULL as char(10)), cast(NULL as char(16)), cast(NULL as char(8)), cast(NULL as char(16)), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as smallint), cast(0 as smallint), cast(0 as unsigned int ), cast(0 as unsigned int ), cast(NULL as varchar(64)), cast(0 as int), cast(0 as int) FROM SYS.DUMMY WHERE dummy_col <> 0 go GRANT SELECT ON dbo.sysprocesses TO dbo, PUBLIC go CREATE view dbo.sysremotelogins ( remoteserverid, remoteusername, suid, status ) as SELECT cast(0 as smallint), cast(NULL as varchar(30)), cast(0 as unsigned int ), cast(0 as smallint) FROM SYS.DUMMY WHERE dummy_col <> 0 go GRANT SELECT ON dbo.sysremotelogins TO dbo, PUBLIC go CREATE view dbo.syssrvroles ( srid, name ) as SELECT cast(0 as smallint), cast(NULL as varchar(10)) FROM SYS.DUMMY WHERE dummy_col <> 0 go GRANT SELECT ON dbo.syssrvroles TO dbo, PUBLIC go CREATE view dbo.sysservers ( srvid, srvstatus, srvname, srvnetname ) as SELECT cast(0 as smallint), cast(0 as smallint), cast(NULL as varchar(30)), cast(NULL as varchar(32)) FROM SYS.DUMMY WHERE dummy_col <> 0 go GRANT SELECT ON dbo.sysservers TO dbo, PUBLIC go CREATE view dbo.sysusages ( dbid, segmap, lstart, size, vstart, pad, unreservedpgs ) as SELECT cast(0 as smallint), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as int), cast(0 as smallint), cast(0 as int) FROM SYS.DUMMY WHERE dummy_col <> 0 go GRANT SELECT ON dbo.sysusages TO dbo, PUBLIC go CREATE view dbo.sysaudits ( event, eventmod, spid, eventtime, sequence, suid, dbid, objid, xactid, loginname, dbname, objname, objowner, extrainfo ) as SELECT 0, 0, 0, NULL, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL FROM SYS.DUMMY WHERE dummy_col <> 0 go GRANT SELECT ON dbo.sysaudits TO dbo, PUBLIC go CREATE view dbo.sysauditoptions ( optn, Value, "min", "max", "name", svalue, "comment" ) as SELECT 0, 0, 0, 0, NULL, NULL, NULL FROM SYS.DUMMY WHERE dummy_col <> 0 go GRANT SELECT ON dbo.sysauditoptions TO dbo, PUBLIC go commit work go