If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.
But when I deploy it to the SSRS server and execute, I get the below error message:When I go back into SP rpt_daily_load_factor and remove the ‘exec rpt_log_insert’ statement, the report works correctly.
USE [the_database] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROC [dbo].[sp_name] (@start_dt date = NULL, @end_dt date = NULL, @run_by varchar(25)) AS -- Logging variables Declare @dtStartSP datetime = GETDATE(), @row_count as int, @version_no numeric(3,1) = 1 -- A big honkin' pile of T-SQL that returns the report's data set is here. SET @row_count = @@ROWCOUNT -- Write a single row to the logging table Declare @dtEndSP as datetime, @diff time, @parameters varchar(1000) SET @dtEndSP = GETDATE() SET @diff = CAST(@dtEndSP - @dtStartSP as time) SET @parameters ='@start_dt=' + CAST(@start_dt as varchar(10)) + ', @end_dt=' + CAST(@end_dt as varchar(10)) exec rpt_log_insert 'sp_name', @run_by, @dtStartSP, @diff, @row_count, @parameters, @version_no