IBM Sterling products unofficial blog

Database, IBM Sterling B2B Integrator, IBM Sterling Filegateway, troubleshooting

Useful queries for IBM Sterling Filegateway SFG

SFG useful SQL queries

IBM Sterling Filegateway SFG useful SQL queries

I share in this blog some useful Sterling Filegateway SFG SQL queries.

The FG_ARRIVEDFILE and FG_DELIVERY contain information about SFG transfers. FG_EVENT and FG_EVENTATTR contain the transfer details.

The table SCI_PROFILE contains information about trading partners.

We will query these tables to extract very useful information:

SFG IBM Sterling Filegateway ARRIVED FILES stats per hour: (ORACLE and DB2)

select count(*),TO_CHAR(CREATETS ,'YYYY-MM-DD'),
TO_CHAR(CREATETS ,'HH24') 
from FG_ARRIVEDFILE 
group by TO_CHAR(CREATETS ,'YYYY-MM-DD'),
TO_CHAR(CREATETS ,'HH24')
order by 2,3

SFG IBM Sterling Filegateway Delivery stats per hour:
(ORACLE and DB2)

select count(*),
TO_CHAR(CREATETS ,'YYYY-MM-DD'),
TO_CHAR(CREATETS ,'HH24') 
from FG_DELIVERY 
group by TO_CHAR(CREATETS ,'YYYY-MM-DD'),
TO_CHAR(CREATETS ,'HH24')
order by 2,3

SFG ARRIVED FILES stats per month:
(ORACLE and DB2)

select count(*), 
TO_CHAR(CREATETS,'MMYYYY') 
from FG_ARRIVEDFILE 
group by TO_CHAR(CREATETS,'MMYYYY') 
order by 1 desc

SFG Deliveries stats per month:
(ORACLE and DB2)

select count(*), 
TO_CHAR(CREATETS,'MMYYYY') 
from FG_DELIVERY
group by TO_CHAR(CREATETS,'MMYYYY') 
order by 1 desc

SFG Arrived files per partner:

select count(*),PROD_ORG_KEY 
from FG_ARRIVEDFILE
group by PROD_ORG_KEY 
order by 1 desc

SFG Deliveries by state:

select count(*), STATE 
from FG_DELIVERY
GROUP BY STATE 
ORDER BY 1 DESC

Remember to run SQL queries returning large result-sets OUTSIDE of the B2B Integrator application SQL manager. Use tools like Oracle SQL developer.

Check more useful SQL queries:

If you are struggling to find some information in the B2B Integrator Database, please post a comment below. You can also share your useful SQL for Integrator and SFG!

3 Comments

  1. Selvaraj Munusamy

    Hi All,

    Could you please let me know how to identify the ciphers that are being used for both inbound and outbound communications for SFTP(SSH) ?

    Can we fetch from the Database tables ?

    Regards
    Selvaraj

  2. Laurie

    Where in the database can I find if a mailbox consumer setup is ‘initiate’ or ‘listen’?

  3. Laurie

    Afternoon of research I was able to build:

    select nvl(substr(ee.EXTENSION_VALUE, 0, instr(ee.EXTENSION_VALUE, ‘CONNECT’)-1), ee.EXTENSION_VALUE) as CONSUME_TYPE
    from SCI_ENTITY_EXTNS ee,
    SCI_CODE_USR_XREF cux
    where ee.ENTITY_ID = cux.TP_OBJECT_ID
    and ee.EXTENSION_KEY = ‘CONSUMERCONNECTION’
    and cux.USER_ID = ?

    where ? is the Consumer Mailbox Name

Leave a Reply

We’ve detected that you’re using an ad blocker. Please disable it to support our website.