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

jsquizz

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 355
    • 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
#AIX #CMOD #DB2 #TSM #XENOS #AFP2PDF #MIGRATION #TROUBLESHOOT

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 1748
  • 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.
#Install, #Educate, #Repair, #Upgrade, #Migrate, #Enhance, #Optimize.

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

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

jsquizz

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 355
    • 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!
#AIX #CMOD #DB2 #TSM #XENOS #AFP2PDF #MIGRATION #TROUBLESHOOT