Unable to delete alias using nbemmcmd -deletealias

Unable to delete alias using nbemmcmd -deletealias

Article: 100022628
Modified: 2019-02-15
Ratings: 2 2
Product(s): NetBackup

Problem

If a Domain Name change occurs in your enterprise, it may be necessary to remove the old FQDN as an alias within EMM after adding the new FQDN as an alias. However, you may be unable to delete the server's alias using nbemmcmd command with the -deletealias option and you may experience the 136 error shown below.

 

Error Message

Deleting an alias using this syntax fails with the error message below.

Example:

nbemmcmd -machinealias -machinename BigMaster -machinetype master -deletealias -alias BigMaster.my_old_network.com
NBEMMCMD,Version:8.1.2
The function returned the following failure status:
invalid host name(136)
Command did not complete successfully.

The EMM log (OID 111) will show the following message:

[Error] V-111-1153 Can not delete an alias BigMaster.my_old_network.com which is same as primary name or FQName

 

Cause

The alias cannot be removed as it resolves to the same name as the primary server entry. A FQDN alias is automatically created when a Media Server or Master Server is added to the EMM database. It is then marked as the primary fully qualified key for the record in the database and therefore it can not be deleted. Newly added FQDN's are not the Primary.

Note:

  • To list aliases for a machine within EMM, use this syntax:
    nbemmcmd -machinealias -getaliases -machinetype <type> -machinename <name>

 

  • To add an alias for a machine within EMM, use this syntax:
    nbemmcmd -machinealias -addalias -alias <name> -machinetype <type> -machinename <name>

 

Solution

The Primary key needs to be renamed, so that the alias can be removed.

In order to remove the old alias, follow these steps:

1. To add a different Primary:
nbemmcmd -renamehost -machinename BigMaster -newmachinename BigMaster.my_new_network.com -machinetype master

2. To remove the old alias:
nbemmcmd -machinealias -machinename BigMaster -machinetype master -deletealias -aliasBigMaster.my_old_network.com

3. List aliases to validate your work:
nbemmcmd -machinealias -getaliases -machinetype master -machinename BigMaster

 

Was this content helpful?