SAP SDI – how to unregister or drop the data provisioning agent from a SAP HANA server

Today will be a few words about how to unregister, drop or move old DP Agent. In my case was a move option. I had to change the server, where DP Agent was installed and configured, for the newer version. Below You’ll find a short description of what I did in this topic.

At the beginning, if You have active subscriptions, it is recommended that you suspend them before dropping, unregister or moving the DP Agent. The same situation is with tasks. Useful links to this step are:

Data Provisniong Subscription Monitor -> http://server:port/sap/hana/im/dp/monitor/index.html?view=DPSubscriptionMonitor
Data Provisniong Task Monitor -> http://server:port/sap/hana/im/dp/monitor/index.html?view=IMTaskMonitor

A similar step we have to do in provisioning configuration because HANA won’t allow agent deletion. During deletion You’ll see below error:

Could not execute 'DROP AGENT "AGENT_NAME" CASCADE' in 6 ms 908 µs . 
SAP DBTech JDBC: [644]: remote source refers to the adapter location: XXX. Move the remote source[YYY] to use adapter[MssqlLogReaderAdapter] at a different location.

The best way to fix it is using SAP Hana Web-based Development Workbench: Catalog via http://server:port/sap/hana/catalog. Here we need to change in remote source (point 1 on the screen below) location of Agent (Group) Name (point 2 on the screen below). For migration time I chose another Agent (point 2) and saved changes. After this, I could go to the next step.

If you do not know the old agent name, you can find it using SELECT * FROM sys.m_agents or Agent Monitor via URL: http://server:port/sap/hana/im/dp/monitor/index.html?view=DPAgentMonitor

Now we can drop agent in our old configuration. I did this using SQL command:

successfully executed in 7 ms 203 µs (server processing time: 6 ms 65 µs) - Rows Affected: 0

After deletion, You should verify, in Agent Monitor or via SQL, that Your old agent disappear from the list. If Yes, You can now stopped old agent:

  • in Windows, You can Stop Service for example like: “SAP_HANA_SDI_Agent_Service_Daemon…” or from the command line using agentcli.bat –configAgent
  • in Linux using the command line –configAgent

Now we can install a new DP Agent on a new server. Few screens from the installation I’ll show You in the next article. After installation, all that remains is to configure the new agent:

  1. run command: ./ –configAgent
  2. choose:
    • step 7 -> SAP Hana Connection -> connect agent to Your HANA
    • step 8 -> Agent Registration -> register agent in HANA
    • step 9 -> Adapter Registration -> choose a suitable adapter, in my case, it was: MssqlLogReaderAdapter
    • If You need to change agent preferences in step 3
  3. Don’t forget about suitable libraries to use adapter – place them in the directory lib.
  4. At the end restart agent and check logs to see if everything is OK.
  5. Check visibility new agent via SQL or in Agent Monitor site.

Copyright © 2024. Privacy Policy