Financial Management Blogs by SAP
Get financial management insights from blog posts by SAP experts. Find and share tips on how to increase efficiency, reduce risk, and optimize working capital.
cancel
Showing results for 
Search instead for 
Did you mean: 
carolinahefler
Participant


No processo de evolução contínua do SAP HANA DATABASE e do TDF, novos artefatos vão sendo utilizados e outros artefatos caem em desuso. Assim como em nossas casas, às vezes é necessário fazer aquela faxina para dar lugar a coisas novas e mais importantes. 

Neste blog post, vamos apresentar três ações para ajudar a manter a casa em ordem, ou seja, otimizar o seu banco de dados eliminando tudo aquilo que está obsoleto. Todas as dicas são válidas apenas para o cenário de instalação do TDF com SAP Landscape Transformation Replication Server (SLT). 

 

1. Deleção de tabelas não utilizadas  


Se o seu banco de dados do TDF possui alguns anos de vida, é possível que exista em sua base de dados tabelas replicadas via SLT que não são mais utilizadas pelo TDF no Support Package mais recente. 

Mesmo que o TDF não utilize essas tabelas, elas continuam consumindo a memória RAM e espaço em disco do seu banco de dados. Então, caso exista alguma tabela legada, a recomendação é que a mesma seja removida da SLT e deletada do SAP HANA.  

Você pode identificar se existe alguma tabela legada verificando se o nome de determinada tabela replicada não está presente na lista de tabelas replicadas das SAP Notes: 

Caso você tenha customizações ou softwares adicionais de parceiros, você pode utilizar o SQL abaixo para verificar se a tabela, em questão, está sendo utilizada por views deles. 
select caller_name, table_or_view, object_name, END_TO_END 

from _sys_bic."sap.glo.tmflocbr.ctr/VIEWS_CADEIA_DE_CONSUMO"

where table_or_view in (‘<YOUR_TABLE>’)

order by table_or_view;

 

2. Deleção de campos do tipo concat_attribute 


Nas primeiras versões do SAP HANA, ele criava uma coluna auxiliar concatenando colunas chave, visando otimizar operações de JOINs. Com as atualizações do SAP HANA, essa coluna passou a não ser mais necessária. Então, considerando que o seu SAP HANA está na versão 2 ou maior, é possível identificar e remover esse tipo de coluna, caso elas existam no seu banco de dados, para economizar memória.

Mais informações na SAP NOTE 1986747 - How-To: Analyzing internal Columns in SAP HANA Column Store. 

Identificando colunas do tipo concat_attribute:
select distinct column_name from m_cs_all_columns 

where

schema_name='<YOUR_REPLICATED_SCHEMA>'

and COLUMN_NAME like '$%'

and COLUMN_NAME not in ('$trex_udiv$','$trexexternalkey$','$rowid$');

 


Exemplo de coluna


 

Removendo colunas do tipo concat_attribute no schema replicado. 
alter table "<YOUR_REPLICATED_SCHEMA>"."<YOUR_TABLE>" with parameters('DELETE_CONCAT_ATTRIBUTE' = '<YOUR_CONCATE_ATTRIBUTE_COLUMN>'); 

 

 

3. Deleção de índice secundário criado pela SLT


Se você tem o cenário de instalação do TDF com SLT, o comportamento padrão da SLT replica até o índice secundário do ABAP dictionary para o HANA database de destino. Esse índice secundário não é necessário e tem um consumo elevado de memória. 

Para identificar e remover esse tipo de coluna da sua base de dados, siga os passos de acordo com a SAP Note 2070029 - Secondary Unique Indices created by SAP LT Replication Server in target HANA data...

 

Gostaríamos muito de saber o seu feedback. Deixe seu comentário abaixo caso tenha alguma dúvida ou sugestão para um próximo post.
Além dos comentários, você pode entrar em contato conosco através da plataformaCustomer Influence. Lá, você pode propor ideias para melhorar nosso produto, votar em outras ideias já lançadas e acompanhar ideias em implementação.
Também não se esqueça de seguir a tag SAP Tax Declaration Framework for Brazil aqui na SAP Community para ficar ligado nas últimas notícias sobre o TDF. 

Um abraço e até a próxima,

Carolina Hefler e Jovani Alves

Time de desenvolvimento TDF 

 

 ______________________________________________________________________________


TDF: Tips to optimize memory consumption 


 

In the process of SAP HANA DATABASE’s and TDF’s continuous evolution, new artifacts are being used, while others are not used any longer. Just as it happens in our own houses, sometimes it is necessary to clean up to make way for new and more important things. 

In this blog post, we introduce three actions to help with keeping the house in order, i.e., optimizing your database eliminating everything that is obsolete. All the tips mentioned here are only valid for the TDF installation scenario with SAP Landscape Transformation Replication Server (SLT). 

 

1. Deletion of unused tables  


If your TDF database is already of age, tables replicated via SLT may exist in it which are no longer used by TDF in the most recent Support Package.

Even if TDF does not use these tables, they keep consuming RAM memory and disk space from your database. Thus, if there is any legacy table, it is recommended that they are removed from SLT and deleted from SAP HANA.  

You can identify if there is any legacy table by checking if the name of the replicated table is not present in the list of replicated tables of the following SAP Notes: 

If you have customizations or additional partner software, you can use the SQL verifying if the table is being used by their views. 
select caller_name, table_or_view, object_name, END_TO_END 

from _sys_bic."sap.glo.tmflocbr.ctr/VIEWS_CADEIA_DE_CONSUMO"

where table_or_view in (‘<YOUR_TABLE>’)

order by table_or_view;

 

2. Deletion of concat_attribute type fields 


In the first versions of SAP HANA, it generated an auxiliary column concatenating key columns to optimize JOIN operations. With the updates to SAP HANA, this column became unnecessary. So, considering that your SAP HANA is in version 2 or above, it is possible to identify and remove this kind of column if they exist in your database to save memory.

More information on SAP Note 1986747 - How-To: Analyzing internal Columns in SAP HANA Column Store. 

How to identify concat_attribute type columns:
select distinct column_name from m_cs_all_columns 

where

schema_name='<YOUR_REPLICATED_SCHEMA>'

and COLUMN_NAME like '$%'

and COLUMN_NAME not in ('$trex_udiv$','$trexexternalkey$','$rowid$');

 


Column example


 

 

How to remove concat_attribute type columns in the replicated schema. 
alter table "<YOUR_REPLICATED_SCHEMA>"."<YOUR_TABLE>" with parameters('DELETE_CONCAT_ATTRIBUTE' = '<YOUR_CONCATE_ATTRIBUTE_COLUMN>'); 

 

3. Deletion of the secondary index created by SAP Landscape Transformation (SLT) 

If you have the TDF with SLT installation scenario, the SLT standard behavior replicates the secondary index of the ABAP dictionary in the target HANA database. This secondary index is not necessary and has elevated memory consumption. Thus, follow the steps according to SAP Note 2070029 - Secondary Unique Indices created by SAP LT Replication Server in target HANA data... to identify and remove this type of column in your database. 

 

We would love to have your feedback. If you have any question or suggestion for an upcoming post, please leave your comment below.  

Apart from the comment section, you can also contact us through the Customer Influence platform, where you can propose ideas to improve our product, vote on previously released ideas and follow those ideas being currently implemented.  

Follow the SAP Tax Declaration Framework for Brazil tag here at the SAP Community to keep updated with the latest news on the TDF Add-On.  

See you next time. 

Best regards,
Carolina Hefler and Jovani Alves
TDF Development Team