Author Topic: Need help with a query, DB2.  (Read 1509 times)

jsquizz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 576
    • View Profile
Need help with a query, DB2.
« on: October 14, 2019, 09:26:40 AM »
This is probably a very simple query, but not sure of the best way to approach it. anyways instead of just asking for someone to DO it for me, here's my scenario.

I need to query datatables for two things

1) row count for total docs loaded
2) total number of doc names

Concern of course is for when there's tables that go above our 25,000,000 row limit, or whatever we have it setup in prod as.

I am thinking for this the arsseg table is a good way to start. I can query-

select a.name, b.table_name from arsag a, arsseg b where a.agid=b.agid

Why am I doing this?

Writing a little script so my ops team can see, "where an extraction process is at"

thanks in advance, as always I am open to any other approaches
#CMOD #DB2 #AFP2PDF #TSM #AIX #RHEL #AWS #AZURE #GCP #EVERYTHING

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 2229
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: Need help with a query, DB2.
« Reply #1 on: October 14, 2019, 10:46:47 AM »
The CMOD Wiki to the rescue:  https://cmod.wiki/index.php?title=Useful_SQL_Queries_for_Content_Manager_OnDemand#How_many_documents_are_in_CMOD_Application_Groups.3F

And you want to do a "select distinct doc_name on <table>" to get a list of objects.  But this might not be a good way to reconcile your old vs. new loads.

-JD.
IBM CMOD Professional Services: http://TenaciousConsulting.com
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Education & Webinars:  https://CMOD.Training/

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

jsquizz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 576
    • View Profile
Re: Need help with a query, DB2.
« Reply #2 on: October 14, 2019, 10:54:43 AM »
The CMOD Wiki to the rescue:  https://cmod.wiki/index.php?title=Useful_SQL_Queries_for_Content_Manager_OnDemand#How_many_documents_are_in_CMOD_Application_Groups.3F

And you want to do a "select distinct doc_name on <table>" to get a list of objects.  But this might not be a good way to reconcile your old vs. new loads.

-JD.

YES

Second query is perfect Thanks!
#CMOD #DB2 #AFP2PDF #TSM #AIX #RHEL #AWS #AZURE #GCP #EVERYTHING