SQWareRepository:ingres

From Wiki_dbSQWare
Revision as of 00:20, 19 December 2010 by Expdbtools (talk | contribs) (Created page with '{{SQWareRepositoryPresSgbd|Ingres|database|INGRES_SID}} == Database content == {{SQWareRepositoryTables|tsqw_Repository |<nowiki> Repository </nowiki>| <pre> Repository: create table tsqw_Rep…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Presentation

It is the repository module, and stores rdbms indicators for all RDBMS.
It is a MySQL database.
Objects prefix by tsqw_% or isqw_% are generic.
Objects prefix by tsqw{{{4}}}_% or isqw{{{4}}}_% are specific for Ingres.
Installation guide for SQWareRepository for Ingres

Naming convention

All specific objects for Ingres are named with prefixes:

  • tsqw{{{4}}}_% : for tables
  • isqw{{{4}}}_% : for index
  • isqw{{{4}}}_%_u : for uniques
  • isqw{{{4}}}_%_pk : for primary key


Nuvola apps important.png
Warning:
Do not change the standard tables of the tool. For your custom objects, use another name convention than dbSQWare.

This will facilitate version upgrades.


Database content

=== tsqw_Repository

===

This table contains : Repository
Desc of tsqw_Repository

:
/* Repository */
create table tsqw_Repository (
 ingres_sid varchar(30) not null,
 virt_host_name varchar (64) not null,
 host_name varchar (64) not null,
 username  varchar (60) not null,
 port integer not null,
 comments varchar(500),
 contact varchar(100),
 status varchar(10) default 'ON',
 client varchar (60) default 'N.A',
 upd_date datetime,
 env  char(3)
)
engine InnoDb
;
grant all on tsqw_Repository to inddba;
alter table tsqw_Repository add ( constraint isqw_Repository_pk primary key (ingres_sid));


=== tsqw_RepositoryOther

===

This table contains : Repository other
Desc of tsqw_RepositoryOther

:
/* Repository other */
create table tsqw_RepositoryOther (
 ingres_sid varchar(30) not null,
 virt_host_name varchar (64) not null,
 host_name varchar(64) not null,
 username  varchar(60) not null,
 port integer not null,
 comments varchar(500),
 contact varchar(100),
 status varchar(10) default 'XXX',
 client varchar (60) default 'N.A',
 upd_date datetime,
 env  char(3)
)
engine InnoDb
;
grant all on tsqw_RepositoryOther to inddba;


=== tsqw_JobsExec

===

This table contains : Jobs monitoring
Desc of tsqw_JobsExec

:
/* Jobs monitoring */
create table tsqw_JobsExec
(
 ingres_sid varchar(50) not null,
 beginning datetime not null,
 script char(80) not null,
 parameters varchar(400) not null,
 end datetime,
 duration char(8),
 status integer
)
engine InnoDb
;
alter table tsqw_JobsExec add ( constraint isqw_JobsExec_pk primary key (ingres_sid, beginning, script, parameters) );
grant all on tsqw_JobsExec to inddba;


=== tsqw_VolFS

===

This table contains : Volumetry TS
Desc of tsqw_VolFS

:
/* Volumetry TS */
create table tsqw_VolFS (
 ingres_sid varchar(30) not null,
 gather_date datetime not null,
 host_name varchar (64) not null,
 filesystem varchar (200) not null,
 size_fs integer not null,
 used integer not null,
 free integer not null,
 rate integer not null,
 mount varchar (200)
)
engine InnoDb
;
grant all on tsqw_VolFS to inddba;
alter table tsqw_VolFS add ( constraint isqw_VolFS_pk primary key (ingres_sid, gather_date,mount));


=== tsqw_VolFSThreshold

===

This table contains : Specific FS threshold
Desc of tsqw_VolFSThreshold

:
/* Specific FS threshold */
create table tsqw_VolFSThreshold (
 ingres_sid varchar(30) not null,
 mount varchar (200),
 threshold_c integer not null,
 threshold_w integer not null
)
engine InnoDb
;
grant all on tsqw_VolFSThreshold to inddba;
alter table tsqw_VolFSThreshold add ( constraint isqw_VolFSThreshold_pk primary key (ingres_sid, mount));


=== tsqw_VolFSThresholdDef

===

This table contains : Default FS threshold
Desc of tsqw_VolFSThresholdDef

:
/* Default FS threshold */
create table tsqw_VolFSThresholdDef (
 size_fs integer not null,
 threshold_c integer not null,
 threshold_w integer not null
)
engine InnoDb
;
grant all on tsqw_VolFSThresholdDef to inddba;
alter table tsqw_VolFSThresholdDef add ( constraint isqw_VolFSThreshold_pk primary key (size_fs));

insert into tsqw_VolFSThresholdDef (size_fs,threshold_c,threshold_w) values (2048, 90, 80);
insert into tsqw_VolFSThresholdDef (size_fs,threshold_c,threshold_w) values (10240, 92, 85);
insert into tsqw_VolFSThresholdDef (size_fs,threshold_c,threshold_w) values (20480, 95, 90);
insert into tsqw_VolFSThresholdDef (size_fs,threshold_c,threshold_w) values (102400000, 99, 97);


=== tsqw_VolDb

===

This table contains : Volumetry databases
Desc of tsqw_VolDb

:
/* Volumetry databases */
create table tsqw_VolDb (
 ingres_sid varchar(30) not null,
 database_name varchar(80) not null,
 gather_date datetime not null,
 size_db integer
)
engine InnoDb
;
grant all on tsqw_VolDb to inddba;
alter table tsqw_VolDb add ( constraint isqw_VolDb_pk primary key (ingres_sid, database_name, gather_date));


=== tsqw_VolInstance

===

This table contains : Volumetry instance
Desc of tsqw_VolInstance

:
/* Volumetry instance */
create table tsqw_VolInstance (
 ingres_sid varchar(30) not null,
 gather_date datetime not null,
 size_instance integer,
 maj_version integer,
 version varchar(30)
)
engine InnoDb
;
grant all on tsqw_VolInstance to inddba;
alter table tsqw_VolInstance add ( constraint isqw_VolInstance_pk primary key (ingres_sid, gather_date));


=== tsqw_GenHisto

===

This table contains : Monthly global informations
Desc of tsqw_GenHisto

:
/* Monthly global informations */
create table tsqw_GenHisto (
 ingres_sid varchar(30) not null,
 month datetime not null,
 gather_date datetime not null,
 size_instance integer,
 maj_version integer,
 version varchar(30),
 client varchar (60),
 env  char(3)
)
engine InnoDb
;
grant all on tsqw_GenHisto to inddba;
alter table tsqw_GenHisto add ( constraint isqw_GenHisto_pk primary key (ingres_sid, month));


=== tsqw_AlertFile

===

This table contains : Alert log location
Desc of tsqw_AlertFile

:
/* Alert log location*/
create table tsqw_AlertFile  (
 ingres_sid varchar(30) not null,
 gather_date datetime not null,
 alert_file  VARCHAR (800)
)
engine InnoDb
;
grant all on tsqw_AlertFile to inddba;