Different help functions
List all the machines known by the SKR
skr_get_mc_list(…)
Parameter |
Type |
Description |
---|---|---|
__sSchema |
text |
Schema of the primary database, whose machines are to be listed (‘skr‘ or ‘skr_archive‘) |
Parameter |
Type |
Description |
---|---|---|
DB_KEY |
integer |
SKR machine ID of the machine |
MC_NAME |
text |
Machine name |
MC_TYPE |
text |
Type of machine |
POLL_STATE |
smallint |
Prompt state of the machine (1 == active) |
BO_GUID |
text |
Definite identification of the machine (used to be a Windows GUID, but currently it is "only" a definite string) |
IP_ADDR |
text |
Network location of the machine + additional information like SKR2 or SKR3 protocol, PortNo or SimID in case of simulated machines. |
Code example
SELECT * from skrpps_02.skr_get_mc_list('skr');
Conversion functions SKR machine ID --- Machine GUID --- Machine name
The primary key for administrating a machine in the SKR database is the SKR machine ID. The machine itself is identified clearly by a machine GUID. The user instead prefers the machine name for identification.
The UDFs described below allow a conversion between these values.
- Machine GUID → SKR machine ID:
- FUNCTION:
skrpps_02.skr_mcguid2mcid(guid cstring, src_schema cstring) - E.g.:
SELECT * from skrpps_02.skr_mcguid2mcid( '150.782.7053..0005','skr_archive'); - SKR machine ID -> Machine GUID
- FUNCTION:
skrpps_02.skr_mcid2mcguid(mc_id integer, src_schema cstring) - E.g.:
SELECT * from skrpps_02.skr_mcid2mcguid( 1403103646,'skr_archive'); - SKR machine ID -> Machine name
- FUNCTION:
skrpps_02.skr_mcid2mcname(mc_id integer, src_schema cstring) - E.g.:
SELECT * from skrpps_02.skr_mcid2mcname( 1403103646,'skr_archive'); - Machine GUID → Machine name
- FUNCTION:
skrpps_02.skr_mcguid2mcname(guid cstring, src_schema cstring) - E.g.:
SELECT * from skrpps_02.skr_mcguid2mcname( '150.782.7053..0005','skr_archive');