Présentation PowerPoint - Gaia · select system_object_name, system_object_schema,...
Transcript of Présentation PowerPoint - Gaia · select system_object_name, system_object_schema,...
![Page 1: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/1.jpg)
![Page 2: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/2.jpg)
![Page 3: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/3.jpg)
•
o
o
o
•
o
![Page 4: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/4.jpg)
•
o CHGSRVA ORDPTFAUTO ORDPTFGRP
o
•
o PWRDWNSYS INSPTFDEV(*SERVICE)
•
o
o
![Page 5: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/5.jpg)
•
o
o
•
o
o
•
o
![Page 6: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/6.jpg)
![Page 7: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/7.jpg)
![Page 8: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/8.jpg)
•
o
o
•
o
o
•
o
o
![Page 9: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/9.jpg)
•
o
o
o
•
o
![Page 10: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/10.jpg)
•
o
•
o
•
o
o
•
o
![Page 11: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/11.jpg)
![Page 12: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/12.jpg)
•
o
•
o
o
•
o
![Page 13: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/13.jpg)
•
o
•
o
•
o
•
o
![Page 14: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/14.jpg)
•
![Page 15: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/15.jpg)
•
o
o
![Page 16: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/16.jpg)
•SELECT SYSTEM_OBJECT_NAME, SYSTEM_OBJECT_SCHEMA,
AUTHORITY_SOURCE
FROM QSYS2/AUTHORITY_COLLECTION
WHERE AUTHORIZATION_NAME = 'PLB'
![Page 17: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/17.jpg)
•
SELECT AUTHORIZATION_NAME, TEXT_DESCRIPTION
FROM USER_INFO
WHERE AUTHORITY_COLLECTION_ACTIVE = 'YES'
![Page 18: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/18.jpg)
•
o
•
o
•
o
![Page 19: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/19.jpg)
•SELECT * FROM QSYS2/AUTHORITY_COLLECTION
WHERE USER_NAME = 'USR'
•SELECT * FROM QSYS2.AUTHORITY_COLLECTION
WHERE USER_NAME = 'USR' AND
SYSTEM_OBJECT_NAME = 'OBJETX' AND
SYSTEM_OBJECT_SCHEMA = 'LIBX'
•SELECT * FROM QSYS2.AUTHORITY_COLLECTION
WHERE SYSTEM_OBJECT_NAME = 'OBJETX' AND
SYSTEM_OBJECT_SCHEMA = 'LIBX'
![Page 20: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/20.jpg)
•
o
o
![Page 21: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/21.jpg)
•
o
•
o
o
•
o
![Page 23: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/23.jpg)
![Page 24: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/24.jpg)
•
o
CRTJRNRCV JRNRCV(JRNLIB/AUDRCV0001)
o
CRTJRN JRN(QSYS/QAUDJRN)
JRNRCV(JRNLIB/AUDRCV0001)
MNGRCV(*SYSTEM)
DLTRCV(*NO)
AUT(*EXCLUDE)
TEXT('Auditing Journal')
![Page 25: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/25.jpg)
•
o QAUDCTL
•
o *OBJAUT
– CHGAUD
– CHGDLOAUD
– CHGOBJAUD
– CHGSECAUD
– CHGUSRAUD
o *AUDLVL
QAUDLVL QAUDLVL2
![Page 27: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/27.jpg)
o *AUTFAIL
TYPE PW
o
DSPAUDJRNE
o
CRTDUPOBJ OBJ(QASYPWJ5) FROMLIB(QSYS) OBJTYPE(*FILE) TOLIB(biblio) NEWOBJ(objet)
DSPOBJD OBJ(QSYS/QASY*)OBJTYPE(*FILE) OUTPUT(*OUTFILE) OUTFILE(QTEMP/LISTEAUD)
![Page 28: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/28.jpg)
SELECT ODOBNM, ODOBTX FROM liste where odobtx like('%type PW%')
– Object
– QASYPWJE PW
– QASYPWJ4 PW
– QASYPWJ5 PW
–
![Page 29: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/29.jpg)
•DSPJRN JRN(QAUDJRN)
ENTTYP(PW) OUTPUT(*OUTFILE) INCHIDENT(*YES) OUTFILFMT(*TYPE5) OUTFILE(biblio/fichier)
o
![Page 30: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/30.jpg)
SELECT * FROM TABLE (
QSYS2.Display_Journal( 'biblio', 'journal') )AS ANALYSE_JRN
WHERE journal_entry_type = ('PW')
o
![Page 31: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/31.jpg)
•
o *NETUDP
o *NETTELSVR
o *NETSECURE
•
o *NETSCK
![Page 32: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/32.jpg)
![Page 33: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/33.jpg)
•
o
o
o
•
o
o
o
![Page 34: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/34.jpg)
•
o
o
![Page 35: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/35.jpg)
•
*NETSCK
*NETUDP
*NETTELSVR
*NETSECURE
![Page 36: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/36.jpg)
• SK
o
•
o QASYSKJ4/J5
•
o
DSPJRN JRN(QAUDJRN) ENTTYP(SK) OUTPUT(*OUTFILE) INCHIDENT(*YES) OUTFILFMT(*TYPE5)OUTFILE(biblio/fichier)
![Page 37: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/37.jpg)
![Page 38: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/38.jpg)
![Page 39: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/39.jpg)
•
o SET_SERVER_SBS_ROUTING
o
•
o
o
![Page 40: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/40.jpg)
![Page 41: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/41.jpg)
• QSYS2.SERVER_SBS_ ROUTING
•
o QZHQSSRV_SUBSYSTEM
o QZSCSRVS_SUBSYSTEM
o QNPSERVS_SUBSYSTEM
o QPWFSERVSO_SUBSYSTEM
o QRWTSRVR_ROLLOVER
o QZDASOINIT_ROLLOVER
o QZRCSRVS_ROLLOVER
o QZHQSSRV_ROLLOVER
o QZSCSRVS_ROLLOVER
o QNPSERVS_ROLLOVER
o QPWFSERVSO_ROLLOVER
•
o SELECT * FROM QSYS2.SERVER_SBS_ROUTING
![Page 42: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/42.jpg)
•SELECT substr(AUTHORIZATION_NAME, 1, 10) as user,
QZDASOINIT_SUBSYSTEM, QZDASOINIT_ROLLOVERFROM QSYS2.SERVER_SBS_ROUTING WHERE = AUTHORIZATION_NAME = 'PLB'
•SELECT substr(AUTHORIZATION_NAME, 1, 10) as user,
QZDASOINIT_SUBSYSTEM, QZDASOINIT_ROLLOVERFROM QSYS2.SERVER_SBS_ROUTINGWHERE QZDASOINIT_SUBSYSTEM <> ' '
![Page 43: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/43.jpg)
•
CALL QSYS2/SET_SERVER_SBS_ROUTING ('profil', '*ALL', '')
![Page 44: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/44.jpg)
•
o CHGSHRPOOL POOL(*SHRPOOL10) SIZE(10000) ACTLVL(5) PAGING(*CALC) TEXT('ODBC FOR SERVERS')
o CRTSBSD SBSD(biblio/ODBCSVR) POOLS((1 *SHRPOOL16)) TEXT('ODBC FOR SERVERS')
o CRTJOBD JOBD(biblio /ODBCSVR) TEXT('ODBC FOR SERVERS') RTGDTA(ODBCSVR) INLLIBL(VOTREBD QGPL QSYS)
o CRTJOBQ biblio /ODBCSVR TEXT('ODBC FOR SERVERS')
o ADDJOBQE SBSD(biblio /ODBCSVR ) JOBQ(biblio /ODBCSVR ) MAXACT(99) SEQNBR(10)
o CRTCLS CLS(biblio /ODBCSVR ) RUNPTY(55) TIMESLICE(100) TEXT('ODBC FOR SERVERS')
o ADDRTGE SBSD(biblio /ODBCSVR) SEQNBR(10) CMPVAL('ODBCSVR') PGM(QCMD)
o ADDPJE SBSD(biblio /ODBCSVR ) PGM(QSYS/QZDASOINIT) JOBD(biblio /ODBCSVR) CLS(biblio /ODBCSVR)
o STRSBS SBSD(biblio /ODBCSVR )
o runsql sql('CALL QSYS2.SET_SERVER_SBS_ROUTING(''ODBCSVRU'',''QZDASOINIT'',''ODBCSVR'')') COMMIT(*NONE)
![Page 45: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/45.jpg)
![Page 46: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/46.jpg)
•
o
![Page 47: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/47.jpg)
• QSYS2
o NETSTAT_INFO
o NETSTAT_JOB_INFO
o NETSTAT_ROUTE_INFO
o NETSTAT_INTERFACE_INFO
![Page 48: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/48.jpg)
•
o NETSTAT_JOB_INFO
o JOB_TYPE
AUTOSTART
BATCH
INTERACTIVE
MONITOR
READER
SCPF
SYSTEM
WRITER
![Page 49: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/49.jpg)
o NETSTAT_INFO
o PROTOCOL
TCP
UDP
![Page 50: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/50.jpg)
•SELECT substr(REMOTE_ADDRESS, 1, 15) as REMOTE_ADDRESS,
AUTHORIZATION_NAME, JOB_NAME FROM QSYS2.NETSTAT_JOB_INFOWHERE JOB_TYPE = 'INTERACTIVE'
•SELECT substr(REMOTE_ADDRESS) as REMOTE_ADDRESS
JOB_NAME, AUTHORIZATION_NAME FROM QSYS2.NETSTAT_JOB_INFO WHERE JOB_NAME like ('%QRWTSRVR%')
![Page 51: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/51.jpg)
•SELECT substr(REMOTE_ADDRESS, 1, 15) as REMOTE_ADDRESS,
JOB_NAME, JOB_TYPE FROM QSYS2.NETSTAT_JOB_INFO WHERE AUTHORIZATION_NAME = 'PLB'
•SELECT * FROM QSYS2.NETSTAT_INFO WHERE REMOTE_ADDRESS = '192.168.253.151'
•SELECT * FROM QSYS2.NETSTAT_ROUTE_INFO
![Page 52: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/52.jpg)
![Page 53: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/53.jpg)
•
o
o
![Page 54: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/54.jpg)
![Page 55: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/55.jpg)
![Page 56: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/56.jpg)
•
create or replace table clients(nocli int as identity primary key,nomcli char(50),depcli dec(2, 0),datcrt date not null with default current date,usrcrt varchar(128) generated always as (session_user),action char(1) generated always as (data change operation),debut timestamp(12) not null generated always as row begin,fin timestamp(12) not null generated always as row end,tsid timestamp(12) generated always as transaction start id,period system_time (debut , fin) ) ;
![Page 57: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/57.jpg)
•
create or replace table clients_histo like clients ;
•
alter table clients add versioning use history table clients_histo on delete add extra row ;
•
alter table clients drop versioning ;
![Page 58: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/58.jpg)
o Row-begin
0001-01-01-00.00.00.000000000000
Row-begin row-end.
o Row-end 9999-12-30-
00.00.00.000000000000
o Transaction ID
o SYSTEM_TIME
o Change-op
–
–
–
![Page 59: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/59.jpg)
•
o
o
![Page 60: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/60.jpg)
•
o
![Page 61: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/61.jpg)
•
o
![Page 62: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/62.jpg)
![Page 63: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/63.jpg)
•
select nocli, action, debut, fin from clients
NOCLI ACTION DEBUT FIN 1 U 2016-02-11-14.18.48.915480000244 9999-12-30-00.00.00.0000000000002 I 2016-02-08-14.30.33.608585000244 9999-12-30-00.00.00.0000000000003 I 2016-02-08-14.30.58.621274000244 9999-12-30-00.00.00.0000000000004 I 2016-02-08-14.31.14.640404000244 9999-12-30-00.00.00.000000000000
select nocli, action, debut, fin from clients_histo
NOCLI ACTION DEBUT FIN1 I 2016-02-08-14.29.58.915480000244 2016-02-11-14.18.48.915480000244
![Page 64: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/64.jpg)
•
select * from clients for system_time as of '2016-02-10-12.00.00.00000000000'
•select * from clients for system_time from '2016-02-01-00.00.00.00000000000'
to '2016-02-10-23.59.59.00000000000'
•select * from clients for system_time between '2016-02-01-00.00.00.00000000000'
and '2016-02-10-23.59.59.00000000000'
![Page 65: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/65.jpg)
• CURRENT TEMPORAL SYSTEM_TIME
SET CURRENT TEMPORAL SYSTEM_TIME = CURRENT TIMESTAMP - 1 YEAR
SELECT * FROM clients
•
SELECT * FROM clients
FOR SYSTEM_TIME AS OF CURRENT TEMPORAL SYSTEM_TIME;
![Page 66: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/66.jpg)
•
o … FROM table FOR SYSTEM_TIME…
AS OF valeur
row-beginvaleur
FROM valeur1 TO valeur2
row-beginvaleur2 row-end valeur1
BETWEEN valeur1 AND valeur2
row-beginvaleur2 row-end valeur1
![Page 67: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/67.jpg)
•
o *ERROR
SQLCODE -20528 / SQLSTATE 57062
o *ADJUST
row-end row-begin
start-IDrow-begin
![Page 68: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/68.jpg)
•create view clients2017 as
select * from clients for system_timebetween '2017-01-01 00:00:00.000000000000' and
'2017-12-31 23:59:59.999999999999'
![Page 69: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/69.jpg)
•select c1.*, c2.*from clients for system_time as of
'2017-01-01' c1 full outer join clients for system_time as of
'2017-02-01' c2 on c1.nocli = c2.nocli ;
•select * from clients for system_time
between '0001-01-01' and '9999-12-31' where nocli = 1 ;
![Page 70: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/70.jpg)
![Page 71: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/71.jpg)
•
o
•
o
o
•
o
o GENERATED ALWAYS AS
![Page 72: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/72.jpg)
ctl-opt option(*nodebugio) alwnull(*usrctl) actgrp(*new) ccsid(*char:*jobrun);
// fichier clientdcl-f clients keyed usage(*update:*output) rename( clients : fmtcli ) ;
// variablesdcl-ds enreg likerec(fmtCli:*all) ;dcl-ds cle likerec(fmtCli:*key) ;
// Lecture ---------------------------------------------------------------------cle.NOCLI = 1 ;chain cle.NOCLI fmtCli enreg ;if %found( clients ) ;
dsply enreg.NOMCLI ;else ;
dsply 'non trouve' ;endif ;
// Maj de l'enregistrement -----------------------------------------------------enreg.NOMCLI = %trim( enreg.NOMCLI ) + ' -- modif GESTCLI' ;update fmtcli enreg ;
// Copie de l'enregistrement ---------------------------------------------------enreg.NOCLI = 1 ;enreg.NOMCLI = 'Créé par GESTCLI' ;write fmtcli enreg ;
![Page 73: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/73.jpg)
• CLIENTS
• CLIENTS CLIENTS_HISTO
![Page 74: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/74.jpg)
•
o
–
o
![Page 75: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/75.jpg)
•SELECT *FROM CLIENTS FOR SYSTEM_TIME AS OF
'2017-02-01 14:45:02.934758000244'
![Page 76: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/76.jpg)
•
o
o
•
o
•
o
o
![Page 77: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/77.jpg)
![Page 78: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/78.jpg)
•
o CREATE OR REPLACE TABLE base
CREATE TABLE basehistorique
o DROP TABLE historique | ALTER TABLE historique
o
•
![Page 79: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/79.jpg)
•
o WHERE CURRENT OF
CREATE OR REPLACE PROCEDURE majClientLANGUAGE SQLBEGINDECLARE cur_nom CHAR(50);DECLARE updCursor CURSOR FORSELECT nomcliFROM clients FOR SYSTEM_TIME AS OF '2017-01-30-17.00.00.000000';
OPEN updCursor;FETCH updCursor INTO cur_nom ;UPDATE clients SET nomcli = upper( cur_nom ) WHERE CURRENT OF updCursor;
CLOSE updCursor;END;
![Page 80: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/80.jpg)
•
o DROP TABLE base
base historique
o ALTER TABLE base ADD COLUMN
historique
o ALTER TABLE base DROP COLUMN
o DELETE FROM historique
![Page 81: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/81.jpg)
•
CREATE OR REPLACE VIEW clients2017 ASSELECT nocli, nomcliFROM clients FOR SYSTEM_TIME AS OF
TIMESTAMP('2017-01-30-18.00.00.000000');
UPDATE clients2017 SET nomcli = upper(nomcli) WHERE nocli = 1 ;
![Page 82: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/82.jpg)
![Page 83: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/83.jpg)
•
o
select * from qsys2.SYSHISTORYTABLESwhere history_table_schema = 'IDAY3' ;
•
o
![Page 84: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/84.jpg)
•
o
select table_name, table_type, file_type, temporal_typefrom qsys2.systables where table_schema = 'IDAY3' ;
![Page 85: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/85.jpg)
•
o
select column_name, table_name, column_default from qsys2.syscolumns where table_schema = 'IDAY3' and table_name like 'CLIENTS%';
![Page 86: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/86.jpg)
![Page 87: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/87.jpg)
• RUNSQLSTMRUNSQL
o SYSTIME
CURRENT TEMPORAL SYSTEM_TIME
– *YES
– *NO
• CRTSQL*
o OPTION(*SYSTIME or *NOSYSTIME)
• SQL
o SET OPTION SYSTIME = *YES or *NO
![Page 88: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/88.jpg)
•
o
•
o
•
o
•
o
•
o
o
o
![Page 89: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/89.jpg)
•
o
•
o
o
o
![Page 90: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/90.jpg)
•
o
•
o
•
o
•
o
•
o
![Page 91: Présentation PowerPoint - Gaia · select system_object_name, system_object_schema, authority_source from qsys2/authority_collection where authorization_name = 'plb' •](https://reader034.fdocuments.us/reader034/viewer/2022052011/60265672b55d4f6dda74e814/html5/thumbnails/91.jpg)