<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Read data from DB02/DBACOCKPIT. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-from-db02-dbacockpit/m-p/12241591#M1985294</link>
    <description>&lt;P&gt;Thank you Luis for quick reply.&lt;/P&gt;&lt;P&gt;we are using DB2 database and need to fetch below data and keep those data into custom table.&lt;/P&gt;&lt;P&gt;Total size, used size, free size,  Tbsp NUM indexs, Tbsp NUM tables. Please find the attached screenshot. &lt;A href="https://answers.sap.com/storage/temp/1850710-db02.png"&gt;db02.png&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Please help me with the logic/ standard FM.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Satish Kumar.  &lt;/P&gt;</description>
    <pubDate>Tue, 13 Oct 2020 13:52:42 GMT</pubDate>
    <dc:creator>former_member565266</dc:creator>
    <dc:date>2020-10-13T13:52:42Z</dc:date>
    <item>
      <title>Read data from DB02/DBACOCKPIT.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-from-db02-dbacockpit/m-p/12241589#M1985292</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;
  &lt;P&gt;&lt;BR /&gt;we will need to collect some data from DB02/DBACOCKPIT. We will need to build a custom tool to fetch and keep these data in custom tables.&lt;BR /&gt; Please help to get data from DB02/DBACOCKPIT. Is there any FM available to read data.&lt;/P&gt;
  &lt;P&gt;Regards,&lt;/P&gt;
  &lt;P&gt;Satish Kumar.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2020 10:54:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-from-db02-dbacockpit/m-p/12241589#M1985292</guid>
      <dc:creator>former_member565266</dc:creator>
      <dc:date>2020-10-13T10:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: Read data from DB02/DBACOCKPIT.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-from-db02-dbacockpit/m-p/12241590#M1985293</link>
      <description>&lt;P&gt;Hi &lt;SPAN class="mention-scrubbed"&gt;satish.kumar144&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;You will have to work with the tools of the specific database you have in your landscape, mostly through native SQL statements.&lt;/P&gt;&lt;P&gt;In the case of Oracle database for instance, dba_data_files and dba_free_space are not tables in the ABAP dictionary, they are dictionary views in the underlying Oracle database.&lt;/P&gt;&lt;P&gt;DB02 gives information on allocation of data in the Oracle database.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Considering primary functions of DB02 in the Database are:&lt;/EM&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;Space analysis of the SAP database and transaction logs showing space allocated, free space and used space.&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;List of basic options and the recovery model that have been set for the database. By default, automatic creation and update of statistics is set for an SAP system.&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;List of all files of the SAP database and the free space available on disk.&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;&lt;EM&gt;Specifies the space allocated for individual files, the amount of space used and other data.&lt;/EM&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Here as some SQL statement examples you can use:&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Dba_data_files:&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;The dba_data_files means total size of the data file. The data file size is total number of the dba_free_space + dba_segments.&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SQL&amp;gt; select tablespace_name,sum(bytes)/(1024*1024*1024) from dba_data_files group by tablespace_name order by 1;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;This example display the total size of the data file:&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SQL&amp;gt; select sum(bytes)/(1024*1024*1024) from dba_data_files;SUM(BYTES)/(1024*1024*1024)
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;STRONG&gt;Dba_segments:&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;The dba_segments means used size of the data file.&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SQL&amp;gt; select tablespace_name,sum(bytes)/(1024*1024*1024) from dba_segments group by tablespace_name order by 1;&lt;/CODE&gt;&lt;/PRE&gt;&lt;EM&gt;This example display the total size of the segments:&lt;BR /&gt;&lt;/EM&gt;&lt;PRE&gt;&lt;CODE&gt;SQL&amp;gt; select sum(bytes)/(1024*1024*1024) from dba_segments;SUM(BYTES)/(1024*1024*1024)
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Dba_free_space:&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;The dba_free_space means free size of the data file.&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SQL&amp;gt; select tablespace_name,sum(bytes)/(1024*1024*1024)from dba_free_space group by tablespace_name order by 1;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;This example display the total size of the free space:&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SQL&amp;gt; select sum(bytes)/(1024*1024*1024) from dba_free_space;SUM(BYTES)/(1024*1024*1024)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;These tables are accessed using the native SQL statements .&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Example IN DB02&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;dba_data_files&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;EXEC SQL PERFORMING APP_1.SELECT TABLESPACE_NAME, SUM(NVL(BYTES,0))/1024FROM DBA_DATA_FILESGROUP BY TABLESPACE_NAME INTO :TAB_1ENDEXEC.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;dba_free_space&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;EXEC SQL PERFORMING APP_2.SELECT TABLESPACE_NAME, SUM(NVL(BYTES,0))/1024 FROM DBA_FREE_SPACEGROUP BY TABLESPACE_NAME INTO :TAB_2ENDEXEC.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;dba_tablespaces&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;EXEC SQL PERFORMING DBA_SEG_ANALYZER2.SELECT * FROM DBA_TABLESPACESINTO :TAB_3ENDEXEC.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;dba_segments&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;EXEC SQL PERFORMING DBA_SEG_ANALYZER2.SELECT OWNER, SEGMENT_NAME, TABLESPACE_NAME,EXTENTS, SEGMENT_TYPE, BYTES / 1024FROM DBA_SEGMENTSINTO :DBA_SEG_ANENDEXEC.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Luis &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2020 11:47:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-from-db02-dbacockpit/m-p/12241590#M1985293</guid>
      <dc:creator>Private_Member_467521</dc:creator>
      <dc:date>2020-10-13T11:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: Read data from DB02/DBACOCKPIT.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-from-db02-dbacockpit/m-p/12241591#M1985294</link>
      <description>&lt;P&gt;Thank you Luis for quick reply.&lt;/P&gt;&lt;P&gt;we are using DB2 database and need to fetch below data and keep those data into custom table.&lt;/P&gt;&lt;P&gt;Total size, used size, free size,  Tbsp NUM indexs, Tbsp NUM tables. Please find the attached screenshot. &lt;A href="https://answers.sap.com/storage/temp/1850710-db02.png"&gt;db02.png&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Please help me with the logic/ standard FM.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Satish Kumar.  &lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2020 13:52:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-from-db02-dbacockpit/m-p/12241591#M1985294</guid>
      <dc:creator>former_member565266</dc:creator>
      <dc:date>2020-10-13T13:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: Read data from DB02/DBACOCKPIT.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-from-db02-dbacockpit/m-p/12241592#M1985295</link>
      <description>&lt;P&gt;HI &lt;SPAN class="mention-scrubbed"&gt;satish.kumar144&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;If you DB is Oracle, use the following DB02_ORA function modules list.&lt;/P&gt;&lt;P&gt;&lt;A href="https://answers.sap.com/storage/temp/1853592-db02-ora.jpg"&gt;db02-ora.jpg&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Luis &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2020 15:25:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-from-db02-dbacockpit/m-p/12241592#M1985295</guid>
      <dc:creator>Private_Member_467521</dc:creator>
      <dc:date>2020-10-13T15:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: Read data from DB02/DBACOCKPIT.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-from-db02-dbacockpit/m-p/12241593#M1985296</link>
      <description>&lt;P&gt;Hi Luis,&lt;/P&gt;&lt;P&gt;Thank you for reply, we are using DB2 as Database. Please help me to get those data from DBACOCKPIT/DB02. This is very urgent.&lt;/P&gt;&lt;P&gt;Attached file is output fields, Path is DB02--&amp;gt;SPACE--&amp;gt;DATABASE .&lt;A href="https://answers.sap.com/storage/temp/1850744-db02.png"&gt;db02.png&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Satish Kumar&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 08:13:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-from-db02-dbacockpit/m-p/12241593#M1985296</guid>
      <dc:creator>former_member565266</dc:creator>
      <dc:date>2020-10-14T08:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: Read data from DB02/DBACOCKPIT.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-from-db02-dbacockpit/m-p/12241594#M1985297</link>
      <description>&lt;P&gt;HI &lt;SPAN class="mention-scrubbed"&gt;satish.kumar144&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;I personally did not have experience into DB2 using the function modules. You would need to investigate further. Here is what I have found - it can help you as a starting point:&lt;/P&gt;&lt;P&gt;&lt;A href="https://answers.sap.com/storage/temp/1853610-db2-kpis.jpg"&gt;db2-kpis.jpg&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Our purpose here is to help the community to the best of our knowledge, but if you have something urgent that is impacting your ability to deliver, I strongly suggest you create a ticket with SAP and do not rely only on this channel to get your problem addressed. Also, it is your responsibility to accept and use any suggestion or recommendation shared here.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Luis &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 12:54:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-from-db02-dbacockpit/m-p/12241594#M1985297</guid>
      <dc:creator>Private_Member_467521</dc:creator>
      <dc:date>2020-10-14T12:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: Read data from DB02/DBACOCKPIT.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-from-db02-dbacockpit/m-p/12241595#M1985298</link>
      <description>&lt;P&gt;Thank you so much Luis for helping/advise to my query. I will raise a ticket to SAP for the same and will have a look at FM which you have provided.&lt;/P&gt;&lt;P&gt;Good day.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Satish Kumar&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 02:20:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-from-db02-dbacockpit/m-p/12241595#M1985298</guid>
      <dc:creator>former_member565266</dc:creator>
      <dc:date>2020-10-15T02:20:22Z</dc:date>
    </item>
  </channel>
</rss>

