none
Turn off Auto Discovery in DPM

    Question

  • Is there any way to turn off Auto Discovery in DPM?

    In our scenario, we have very limited bandwidth between the DPM installation and LDAP source (domain controller). By default (according to this http://www.scribd.com/doc/69740299/58/Auto-Discovery ), the Auto Discovery feature runs at 1am daily. This causes a massive amount of data to be pulled over the network (several hundred MBs) during the first run of the Auto Discovery (after the first run it is deltas) since our AD is quite large. Anyone know how to turn off this feature?


    My Microsoft Core Infrastructure & Systems Management blog - blog.danovich.com.au

    Thursday, February 23, 2012 3:43 AM

Answers

  • Hi Wilson,

    Thanks for your help on this one. Here's my finaly solution: http://blog.tyang.org/2012/03/01/disabling-auto-discovery-in-scdpm-2010/

    Cheers

    Tao

    • Marked as answer by danovich_ Thursday, March 01, 2012 9:36 AM
    Thursday, March 01, 2012 9:32 AM
  • Hi Danovich,

    You can run this T-SQL on your DPM server.

    This T-SQL script has the following assumptions:

    1. You are running DPM 2010.

    2. SQL was installed as part of the DPM installation

    3. The user account you are using to run this script is sysadmin

    DECLARE @DPMServer varchar(40), @Jobname varchar(max), @ownerloginname varchar(40), @query nvarchar(max),
    		@stepname varchar(max), @schedulename varchar(max), @starttime int, @name varchar(36)
    select @DPMServer = netbiosname from DPMDB.dbo.tbl_am_server where ServerId = DPMServerId
    set @Jobname	    = 'Cancel DPM Auto Discovery'
    set @ownerloginname =  @DPMServer + '\MICROSOFT$DPM$Acct'
    set @stepname       = 'Inactivate DPM Auto Discovery Job'
    set @schedulename   = 'Job to cancel Auto Discovery'
    set @DPMServer = @DPMServer + '\MSDPM2010' 
    set @query = 'use msdb
    select @jobname = name from msdb.dbo.sysjobs 
    where name = convert(varchar(36),
       (select ScheduleId  from dpmdb.dbo.tbl_SCH_ScheduleDefinition 
    	where JobDefinitionId in 
    	   (select JobDefinitionId from dpmdb.dbo.tbl_JM_JobDefinition 
            where Type = ''8BC21871-BE3D-469D-AB26-C6C758C15621'')
    and isdeleted = 0))'
    exec sp_executesql @statement = @query, @parameters = N'@jobname varchar(36) output', @Jobname = @name output
    set @query = 'Declare @jobname varchar(36) ' + @query  + ' EXEC sp_update_job @job_name = @jobname, @enabled = 0'
    USE msdb
    EXEC dbo.sp_add_job @job_name = @Jobname, @enabled = 1, @description = 'Job to cancel DPM Auto Discovery',
                         @category_name = N'DPM', @owner_login_name = @ownerloginname;
    EXEC sp_add_jobstep @job_name = @Jobname, @step_name = @stepname, @subsystem = N'TSQL', @command = @query;
    select @starttime = active_start_time from msdb.dbo.sysschedules sche
    join msdb.dbo.sysjobschedules jobsche
    on sche.schedule_id = jobsche.schedule_id
    join msdb.dbo.sysjobs jobs
    on jobsche.job_id = jobs.job_id
    where jobs.name = @name
    set @starttime = @starttime - 4500
    EXEC sp_add_schedule @schedule_name = @schedulename, @freq_type = 4, @freq_interval = 1, @active_start_time = @starttime;
    EXEC sp_attach_schedule @job_name = @Jobname, @schedule_name = @schedulename ;
    EXEC sp_add_jobserver @job_name = @Jobname, @Server_name = @DPMServer
    GO


    Thursday, February 23, 2012 9:00 AM

All replies

  • Hi Danovich,

    You can run this T-SQL on your DPM server.

    This T-SQL script has the following assumptions:

    1. You are running DPM 2010.

    2. SQL was installed as part of the DPM installation

    3. The user account you are using to run this script is sysadmin

    DECLARE @DPMServer varchar(40), @Jobname varchar(max), @ownerloginname varchar(40), @query nvarchar(max),
    		@stepname varchar(max), @schedulename varchar(max), @starttime int, @name varchar(36)
    select @DPMServer = netbiosname from DPMDB.dbo.tbl_am_server where ServerId = DPMServerId
    set @Jobname	    = 'Cancel DPM Auto Discovery'
    set @ownerloginname =  @DPMServer + '\MICROSOFT$DPM$Acct'
    set @stepname       = 'Inactivate DPM Auto Discovery Job'
    set @schedulename   = 'Job to cancel Auto Discovery'
    set @DPMServer = @DPMServer + '\MSDPM2010' 
    set @query = 'use msdb
    select @jobname = name from msdb.dbo.sysjobs 
    where name = convert(varchar(36),
       (select ScheduleId  from dpmdb.dbo.tbl_SCH_ScheduleDefinition 
    	where JobDefinitionId in 
    	   (select JobDefinitionId from dpmdb.dbo.tbl_JM_JobDefinition 
            where Type = ''8BC21871-BE3D-469D-AB26-C6C758C15621'')
    and isdeleted = 0))'
    exec sp_executesql @statement = @query, @parameters = N'@jobname varchar(36) output', @Jobname = @name output
    set @query = 'Declare @jobname varchar(36) ' + @query  + ' EXEC sp_update_job @job_name = @jobname, @enabled = 0'
    USE msdb
    EXEC dbo.sp_add_job @job_name = @Jobname, @enabled = 1, @description = 'Job to cancel DPM Auto Discovery',
                         @category_name = N'DPM', @owner_login_name = @ownerloginname;
    EXEC sp_add_jobstep @job_name = @Jobname, @step_name = @stepname, @subsystem = N'TSQL', @command = @query;
    select @starttime = active_start_time from msdb.dbo.sysschedules sche
    join msdb.dbo.sysjobschedules jobsche
    on sche.schedule_id = jobsche.schedule_id
    join msdb.dbo.sysjobs jobs
    on jobsche.job_id = jobs.job_id
    where jobs.name = @name
    set @starttime = @starttime - 4500
    EXEC sp_add_schedule @schedule_name = @schedulename, @freq_type = 4, @freq_interval = 1, @active_start_time = @starttime;
    EXEC sp_attach_schedule @job_name = @Jobname, @schedule_name = @schedulename ;
    EXEC sp_add_jobserver @job_name = @Jobname, @Server_name = @DPMServer
    GO


    Thursday, February 23, 2012 9:00 AM
  • Hi Wilson,

    I noticed there is a table in DPM database that contains all computers in the domain. Is there a way to pre-populate records in this table to only contain the machine it needs to backup before turning off Auto Discovery using the stored procedure that you provided?

    Thanks

    Tao

    Thursday, February 23, 2012 10:42 AM
  • Thanks for your help Wilson. Are you able to assist with Tao's question also?

    My Microsoft Core Infrastructure & Systems Management blog - blog.danovich.com.au

    Thursday, February 23, 2012 12:36 PM
  • Hi Wilson,

    It seems the SQL commands you provided creates a scheduled SQL job to disable the Auto Discovery DPM SQL job at 12:55am. is there a reason this has to be done daily? Can the Auto Discovery DPM SQL job been disabled once for all?

    Thanks for your help.

    Regards,

    Tao

    Thursday, February 23, 2012 11:23 PM
  • Hi Tao,

    No Auto Discovery can't be disabled. So during maintenance schedule, DPM will check its tables and do a refresh on all SQL jobs that DPM created and will re-create or update jobs that are not in the correct state. So the supported way to avoid this job from running is to disable it using the method above...


    Thanks, Wilson Souza - MSFT This posting is provided "AS IS" with no warranties, and confers no rights

    Thursday, February 23, 2012 11:27 PM
  • There are other tables/data updated by Auto Discovery that I don't encourage you update these tables in any other way than by Auto Discovery itself....


    Thanks, Wilson Souza - MSFT This posting is provided "AS IS" with no warranties, and confers no rights

    Thursday, February 23, 2012 11:30 PM
  • Thanks WIlson.
    Thursday, February 23, 2012 11:39 PM
  • Hi Wilson,

    Just thought to let you know, I had to change the category of this scheduled job to something other than "DPM" otherwise it gets deleted overnight somehow and it would never run.

    Monday, February 27, 2012 10:07 PM
  • Good catch... I thought about that once I created the script and forgot to check it back after DPM maintenance.....

    I'll update the script so we can select something else....


    Thanks, Wilson Souza - MSFT This posting is provided "AS IS" with no warranties, and confers no rights

    Monday, February 27, 2012 10:09 PM
  • Hi Wilson,

    Thanks for your help on this one. Here's my finaly solution: http://blog.tyang.org/2012/03/01/disabling-auto-discovery-in-scdpm-2010/

    Cheers

    Tao

    • Marked as answer by danovich_ Thursday, March 01, 2012 9:36 AM
    Thursday, March 01, 2012 9:32 AM