SCCM report for specific exit code

Can SCCM 2007 report on a specific exit code that is passed to a log file? I'm trying to make the report look for any installs that end in exit code 4 which occurs when a specific logic occurs. 

No, there's nothing built in to skim log files or report on their contents. You could easily write a script to do this though and populate a custom WMI class instance that ConfigMgr can pick up.
Jason | http://blog.configmgrftw.com

Similar Messages

  • How to schedule one report for multiple company code?

    How you can schedule reports in BW 3.5? Suppose I need to schedule one report for multiple company code, how can you do that and notify the users? I do not want to send multiple emails to the same user if the report runs for 20 times (for 20 different companies).
    points are given for ASAP replies.
    Thanks in advance
    Peter

    Dear Peter,
    Try to restrict the Company Code with  those 20 values and schedule.
    Regards,
    Ramkumar.

  • Failed to initialize MSDB database for tuning (exit code: -1073741819). (DTAClient)

    Hello,
    This is the first time I am using this forum. I am stuck and need some help. I received this error message both on SQL 2005 and 2008. I am currently using SQL 2008 DEV for testing purposes and I am experiencing this error message when trying to connect to Database Engine Tuning Advisor. I am using the SA account so I should not have any security issues. Also this is a fresh install of SQL 2008 DEV on a fresh install of Windows XP Pro with all SP. Can some please help.
    Error:
    "Failed to initialize MSDB database for tuning (exit code: -1073741819). (DTAClient)"
    ===================================
    Failed to open a new connection.
    ===================================
    Failed to initialize MSDB database for tuning (exit code: -1073741819). (DTAClient)
    Program Location:
       at Microsoft.SqlServer.Management.DTA.Client.TuningServer.InitializeTuningParametersDatabase()
       at Microsoft.SqlServer.Management.DTA.Client.TuningServer.InitializeConnection()
       at Microsoft.SqlServer.Management.DTA.Client.TuningServer.Connect()
       at Microsoft.SqlServer.Management.DTA.Shell.SessionMonitor.AddServerInternal(SqlConnectionInfo connectionInfo, SqlConnection connection)
       at Microsoft.SqlServer.Management.DTA.Shell.SessionMonitor.AddServer(SqlConnectionInfo connectionInfo, SqlConnection connection)
       at Microsoft.SqlServer.Management.DTA.Shell.SessionMonitor.OnConnect(Object sender, EventArgs e)

    I created the below MSDB SP and Tables. Now the issue is resolved.
    http://www.devnewsgroups.net/sqlservertools/t67379-database-engine-tuning-advisor.aspx 
    USE [msdb]
    GO
    /****** Object:  StoredProcedure [dbo].[sp_DTA_start_xmlprefix]    Script
    Date: 12/31/2008 10:56:11 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    create procedure [dbo].[sp_DTA_start_xmlprefix]
    as
    begin
        declare @startTags nvarchar(128)
        set @startTags = N'<DTAXML><DTAOutput><AnalysisReport>'
        select @startTags
    end
    GO
    /****** Object:  Table [dbo].[DTA_input]    Script Date: 12/31/2008 10:56:59
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[DTA_input](
        [SessionName] [sysname] NOT NULL,
        [SessionID] [int] IDENTITY(1,1) NOT NULL,
        [TuningOptions] [ntext] NOT NULL,
        [CreationTime] [datetime] NOT NULL DEFAULT (getdate()),
        [ScheduledStartTime] [datetime] NOT NULL DEFAULT (getdate()),
        [ScheduledJobName] [sysname] NOT NULL DEFAULT (''),
        [InteractiveStatus] [tinyint] NOT NULL DEFAULT ((0)),
        [LogTableName] [nvarchar](1280) NOT NULL DEFAULT (''),
        [GlobalSessionID] [uniqueidentifier] NULL DEFAULT (newid()),
    PRIMARY KEY CLUSTERED
        [SessionID] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY =
    OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    GO
    /****** Object:  Table [dbo].[DTA_progress]    Script Date: 12/31/2008
    10:57:29 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[DTA_progress](
        [ProgressEventID] [int] IDENTITY(1,1) NOT NULL,
        [SessionID] [int] NULL,
        [TuningStage] [tinyint] NOT NULL DEFAULT ((0)),
        [WorkloadConsumption] [tinyint] NOT NULL,
        [EstImprovement] [int] NOT NULL DEFAULT ((0)),
        [ProgressEventTime] [datetime] NOT NULL DEFAULT (getdate()),
        [ConsumingWorkLoadMessage] [nvarchar](256) NULL,
        [PerformingAnalysisMessage] [nvarchar](256) NULL,
        [GeneratingReportsMessage] [nvarchar](256) NULL
    ) ON [PRIMARY]
    GO
    /****** Object:  Table [dbo].[DTA_output]    Script Date: 12/31/2008
    10:57:10 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[DTA_output](
        [SessionID] [int] NOT NULL,
        [TuningResults] [ntext] NOT NULL,
        [StopTime] [datetime] NOT NULL DEFAULT (getdate()),
        [FinishStatus] [tinyint] NOT NULL DEFAULT ((0)),
    PRIMARY KEY CLUSTERED
        [SessionID] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY =
    OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    GO
    /****** Object:  Table [dbo].[DTA_tuninglog]    Script Date: 12/31/2008
    11:01:21 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[DTA_tuninglog](
        [SessionID] [int] NOT NULL,
        [RowID] [int] NOT NULL,
        [CategoryID] [nvarchar](4) NOT NULL,
        [Event] [ntext] NULL,
        [Statement] [ntext] NULL,
        [Frequency] [int] NOT NULL,
        [Reason] [ntext] NULL
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    GO
    /****** Object:  Table [dbo].[DTA_reports_database]    Script Date:
    12/31/2008 10:57:56 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[DTA_reports_database](
        [DatabaseID] [int] IDENTITY(1,1) NOT NULL,
        [SessionID] [int] NOT NULL,
        [DatabaseName] [sysname] NOT NULL,
        [IsDatabaseSelectedToTune] [int] NULL,
    PRIMARY KEY CLUSTERED
        [DatabaseID] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY =
    OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    /****** Object:  Table [dbo].[DTA_reports_query]    Script Date: 12/31/2008
    10:59:42 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[DTA_reports_query](
        [QueryID] [int] NOT NULL,
        [SessionID] [int] NOT NULL,
        [StatementType] [smallint] NOT NULL,
        [StatementString] [ntext] NOT NULL,
        [CurrentCost] [float] NOT NULL,
        [RecommendedCost] [float] NOT NULL,
        [Weight] [float] NOT NULL,
        [EventString] [ntext] NULL,
        [EventWeight] [float] NOT NULL,
    CONSTRAINT [DTA_reports_query_pk] PRIMARY KEY CLUSTERED
        [SessionID] ASC,
        [QueryID] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY =
    OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    GO
    /****** Object:  Table [dbo].[DTA_reports_querydatabase]    Script Date:
    12/31/2008 11:00:04 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[DTA_reports_querydatabase](
        [QueryID] [int] NOT NULL,
        [SessionID] [int] NOT NULL,
        [DatabaseID] [int] NOT NULL
    ) ON [PRIMARY]
    GO
    /****** Object:  Table [dbo].[DTA_reports_table]    Script Date: 12/31/2008
    11:00:52 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[DTA_reports_table](
        [TableID] [int] IDENTITY(1,1) NOT NULL,
        [DatabaseID] [int] NOT NULL,
        [SchemaName] [sysname] NOT NULL,
        [TableName] [sysname] NOT NULL,
        [IsView] [bit] NOT NULL DEFAULT ((0)),
    PRIMARY KEY CLUSTERED
        [TableID] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY =
    OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    /****** Object:  Table [dbo].[DTA_reports_partitionfunction]    Script Date:
    12/31/2008 10:58:57 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[DTA_reports_partitionfunction](
        [PartitionFunctionID] [int] IDENTITY(1,1) NOT NULL,
        [DatabaseID] [int] NOT NULL,
        [PartitionFunctionName] [sysname] NOT NULL,
        [PartitionFunctionDefinition] [ntext] NOT NULL,
    PRIMARY KEY CLUSTERED
        [PartitionFunctionID] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY =
    OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    GO
    /****** Object:  Table [dbo].[DTA_reports_partitionscheme]    Script Date:
    12/31/2008 10:59:19 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[DTA_reports_partitionscheme](
        [PartitionSchemeID] [int] IDENTITY(1,1) NOT NULL,
        [PartitionFunctionID] [int] NOT NULL,
        [PartitionSchemeName] [sysname] NOT NULL,
        [PartitionSchemeDefinition] [ntext] NOT NULL,
    PRIMARY KEY CLUSTERED
        [PartitionSchemeID] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY =
    OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    GO
    /****** Object:  Table [dbo].[DTA_reports_tableview]    Script Date:
    12/31/2008 11:01:02 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[DTA_reports_tableview](
        [TableID] [int] NOT NULL,
        [ViewID] [int] NOT NULL
    ) ON [PRIMARY]
    GO
    /****** Object:  Table [dbo].[DTA_reports_querytable]    Script Date:
    12/31/2008 11:00:33 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[DTA_reports_querytable](
        [QueryID] [int] NOT NULL,
        [SessionID] [int] NOT NULL,
        [TableID] [int] NOT NULL
    ) ON [PRIMARY]
    GO
    /****** Object:  Table [dbo].[DTA_reports_index]    Script Date: 12/31/2008
    10:58:24 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[DTA_reports_index](
        [IndexID] [int] IDENTITY(1,1) NOT NULL,
        [TableID] [int] NOT NULL,
        [IndexName] [sysname] NOT NULL,
        [IsClustered] [bit] NOT NULL DEFAULT ((0)),
        [IsUnique] [bit] NOT NULL DEFAULT ((0)),
        [IsHeap] [bit] NOT NULL DEFAULT ((1)),
        [IsExisting] [bit] NOT NULL DEFAULT ((1)),
        [Storage] [float] NOT NULL,
        [NumRows] [int] NOT NULL,
        [IsRecommended] [bit] NOT NULL DEFAULT ((0)),
        [RecommendedStorage] [float] NOT NULL,
        [PartitionSchemeID] [int] NULL,
        [SessionUniquefier] [int] NULL,
    PRIMARY KEY CLUSTERED
        [IndexID] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY =
    OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    /****** Object:  Table [dbo].[DTA_reports_column]    Script Date: 12/31/2008
    10:57:42 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[DTA_reports_column](
        [ColumnID] [int] IDENTITY(1,1) NOT NULL,
        [TableID] [int] NOT NULL,
        [ColumnName] [sysname] NOT NULL,
    PRIMARY KEY CLUSTERED
        [ColumnID] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY =
    OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    /****** Object:  Table [dbo].[DTA_reports_queryindex]    Script Date:
    12/31/2008 11:00:19 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[DTA_reports_queryindex](
        [QueryID] [int] NOT NULL,
        [SessionID] [int] NOT NULL,
        [IndexID] [int] NOT NULL,
        [IsRecommendedConfiguration] [bit] NOT NULL
    ) ON [PRIMARY]
    GO
    /****** Object:  Table [dbo].[DTA_reports_querycolumn]    Script Date:
    12/31/2008 10:59:50 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[DTA_reports_querycolumn](
        [QueryID] [int] NOT NULL,
        [SessionID] [int] NOT NULL,
        [ColumnID] [int] NOT NULL
    ) ON [PRIMARY]
    GO
    /****** Object:  Table [dbo].[DTA_reports_indexcolumn]    Script Date:
    12/31/2008 10:58:39 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[DTA_reports_indexcolumn](
        [IndexID] [int] NOT NULL,
        [ColumnID] [int] NOT NULL,
        [ColumnOrder] [int] NULL,
        [PartitionColumnOrder] [int] NOT NULL DEFAULT ((0)),
        [IsKeyColumn] [bit] NOT NULL DEFAULT ((1)),
        [IsDescendingColumn] [bit] NOT NULL DEFAULT ((1))
    ) ON [PRIMARY]
    GO
    /****** Object:  StoredProcedure [dbo].[sp_DTA_check_permission]    Script
    Date: 12/31/2008 10:53:21 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    create procedure [dbo].[sp_DTA_check_permission]
                    @SessionID int
    as
    begin
        declare @retcode  int
        declare @dbname nvarchar(128)
        declare @sql nvarchar(256)
        declare @dbid int
        set nocount on
        -- Check if SA
        if (isnull(IS_SRVROLEMEMBER(N'sysadmin'), 0) = 1)
        begin
            return(0)
        end
        -- if not yukon return
        if (patindex('%9.00.%',@@version) = 0)
        begin
            return (1)
        end
        -- declare and open a cursor and get all the databases specified in the input
        declare db_cursor cursor for
        select DatabaseName from DTA_reports_database
        where SessionID = @SessionID and IsDatabaseSelectedToTune  = 1
        -- open
        open db_cursor
        -- fetch first db name
        fetch next from db_cursor
        into @dbname
        -- loop and get all the databases selected to tune
        while @@fetch_status = 0
        begin
            -- build use db string
            select  @dbid = DB_ID(@dbname)
            -- In Yukon this masks the error messages
            set @sql = N'begin try
                dbcc autopilot(5,@dbid) WITH NO_INFOMSGS
            end try
            begin catch
                set @retcode = 1
            end catch'
            execute sp_executesql @sql
                , N'@dbid int output, @retcode int OUTPUT'
                , @dbid output
                , @retcode output
            -- if caller is not member of dbo
            if (@retcode = 1)
            begin
                -- close and reset cursor,switch context to current
                -- database and return 1
                close db_cursor
                deallocate db_cursor
                return(1)
            end
            fetch from db_cursor into @dbname
        end
        -- close and reset cursor,switch context to current
        -- database and return 1
        close db_cursor
        deallocate db_cursor
        return(0)
    end
    GO
    /****** Object:  StoredProcedure [dbo].[sp_DTA_index_usage_helper_xml]   
    Script Date: 12/31/2008 10:54:29 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    create procedure [dbo].[sp_DTA_index_usage_helper_xml]
        @SessionID        int,
        @IsRecommended    int
    as   
    begin
    select 1            as Tag,
            NULL          as Parent,
            '' as [IndexUsageReport!1!!ELEMENT],
            case when @IsRecommended = 1 then 'false'
            else 'true' end as [IndexUsageReport!1!Current],
            NULL as [Database!2!DatabaseID!hide],
            NULL  as [Database!2!Name!ELEMENT] ,
            NULL  as [Schema!3!Name!ELEMENT] ,
            NULL as [Table!4!TableID!hide],
            NULL as [Table!4!Name!ELEMENT],
            NULL as [Index!5!IndexID!hide],
            NULL as [Index!5!Name!ELEMENT],
            NULL as [Index!5!NumberOfReferences!ELEMENT],
            NULL as [Index!5!PercentUsage!ELEMENT]
        union all
    select 2            as Tag,
            1          as Parent,
            NULL as [IndexUsageReport!1!!ELEMENT],
            NULL as [IndexUsageReport!1!Current],
            D.DatabaseID as [Database!2!DatabaseID!hide],
            D.DatabaseName  as [Database!2!Name!ELEMENT] ,
            NULL  as [Schema!3!Name!ELEMENT] ,
            NULL as [Table!4!TableID!hide],
            NULL as [Table!4!Name!ELEMENT],
            NULL as [Index!5!IndexID!hide],
            NULL as [Index!5!Name!ELEMENT],
            NULL as [Index!5!NumberOfReferences!ELEMENT],
            NULL as [Index!5!PercentUsage!ELEMENT]
        from [msdb].[dbo].[DTA_reports_database] as D
        where
        D.SessionID = @SessionID and
        D.DatabaseID in
        (select D.DatabaseID from
                [msdb].[dbo].[DTA_reports_queryindex] as QI,
                [msdb].[dbo].[DTA_reports_index] as I,
                [msdb].[dbo].[DTA_reports_table] as T,
                [msdb].[dbo].[DTA_reports_database] as D
                where
                QI.IndexID = I.IndexID  and
                I.TableID = T.TableID and
                T.DatabaseID = D.DatabaseID and
                D.SessionID = @SessionID and
                QI.IsRecommendedConfiguration = @IsRecommended
                GROUP BY D.DatabaseID)
        union all
    select 3            as Tag,
            2          as Parent,
            NULL as [IndexUsageReport!1!!ELEMENT],
            NULL as [IndexUsageReport!1!Current],
            D.DatabaseID as [Database!2!DatabaseID!hide],
            D.DatabaseName  as [Database!2!Name!ELEMENT] ,
            R.SchemaName  as [Schema!3!Name!ELEMENT] ,
            NULL as [Table!4!TableID!hide],
            NULL as [Table!4!Name!ELEMENT],
            NULL as [Index!5!IndexID!hide],
            NULL as [Index!5!Name!ELEMENT],
            NULL as [Index!5!NumberOfReferences!ELEMENT],
            NULL as [Index!5!PercentUsage!ELEMENT]
        from [msdb].[dbo].[DTA_reports_database] as D,
            select D.DatabaseID,T.SchemaName from
            [msdb].[dbo].[DTA_reports_queryindex] as QI,
            [msdb].[dbo].[DTA_reports_index] as I,
            [msdb].[dbo].[DTA_reports_table] as T,
            [msdb].[dbo].[DTA_reports_database] as D
            where
            QI.IndexID = I.IndexID  and
            I.TableID = T.TableID and
            T.DatabaseID = D.DatabaseID and
            QI.IsRecommendedConfiguration = @IsRecommended and
            D.SessionID = @SessionID
            GROUP BY D.DatabaseID,T.SchemaName
        ) R
        where
        D.SessionID = @SessionID and
        D.DatabaseID = R.DatabaseID
    union all
    select 4            as Tag,
            3          as Parent,
            NULL as [IndexUsageReport!1!!ELEMENT],
            NULL as [IndexUsageReport!1!Current],
            D.DatabaseID as [Database!2!DatabaseID!hide],
            D.DatabaseName as [Database!2!Name!ELEMENT] ,
            R.SchemaName  as [Schema!3!Name!ELEMENT] ,
            R.TableID as [Table!4!TableID!hide],
            T.TableName as [Table!4!Name!ELEMENT],
            NULL as [Index!5!IndexID!hide],
            NULL as [Index!5!Name!ELEMENT],
            NULL as [Index!5!NumberOfReferences!ELEMENT],
            NULL as [Index!5!PercentUsage!ELEMENT]
        from    [msdb].[dbo].[DTA_reports_database] as D,
                [msdb].[dbo].[DTA_reports_table] as T,
            select D.DatabaseID,T.SchemaName,T.TableID from
            [msdb].[dbo].[DTA_reports_queryindex] as QI,
            [msdb].[dbo].[DTA_reports_index] as I,
            [msdb].[dbo].[DTA_reports_table] as T,
            [msdb].[dbo].[DTA_reports_database] as D
            where
            QI.IndexID = I.IndexID  and
            I.TableID = T.TableID and
            T.DatabaseID = D.DatabaseID and
            D.SessionID = @SessionID and
            QI.IsRecommendedConfiguration = @IsRecommended
            GROUP BY D.DatabaseID,T.SchemaName, T.TableID
        ) R
        where
        D.SessionID = @SessionID and
        D.DatabaseID = R.DatabaseID and
        R.TableID = T.TableID and
        T.DatabaseID = D.DatabaseID
    union all
    select 5            as Tag,
            4          as Parent,
            NULL as [IndexUsageReport!1!!ELEMENT],
            NULL as [IndexUsageReport!1!Current],
            D1.DatabaseID as [Database!2!DatabaseID!hide],
            D1.DatabaseName as [Database!2!Name!ELEMENT] ,
            T1.SchemaName  as [Schema!3!Name!ELEMENT] ,
            T1.TableID as [Table!4!TableID!hide],
            T1.TableName as [Table!4!Name!ELEMENT],
            I1.IndexID as [Index!5!IndexID!hide],
            I1.IndexName as [Index!5!Name!ELEMENT],
            R.Count as [Index!5!NumberOfReferences!ELEMENT],
            CAST(R.Usage as decimal(38,2))  as [Index!5!PercentUsage!ELEMENT]
            from
                [msdb].[dbo].[DTA_reports_database] as D1 ,
                [msdb].[dbo].[DTA_reports_index] as I1,
                [msdb].[dbo].[DTA_reports_table] as T1,
                    select D.DatabaseID,T.TableID ,
                            I.IndexID  ,SUM(Q.Weight) as Count,
                            100.0 *  SUM(Q.Weight) /
                            ( 1.0 * (    select    CASE WHEN SUM(Q.Weight) > 0 THEN  SUM(Q.Weight)
                                                else 1
                                                end   
                                        from [msdb].[dbo].[DTA_reports_query] as Q
                                        where Q.SessionID = @SessionID ))
                as Usage
            from
                [msdb].[dbo].[DTA_reports_index] as I   
                LEFT OUTER JOIN
                [msdb].[dbo].[DTA_reports_queryindex] as QI ON QI.IndexID = I.IndexID
                LEFT OUTER JOIN
                [msdb].[dbo].[DTA_reports_query] as Q ON QI.QueryID = Q.QueryID
                JOIN
                [msdb].[dbo].[DTA_reports_table] as T ON I.TableID = T.TableID
                JOIN
                [msdb].[dbo].[DTA_reports_database] as D ON T.DatabaseID = D.DatabaseID
                and Q.SessionID = QI.SessionID and
                QI.IsRecommendedConfiguration = @IsRecommended and
                Q.SessionID = @SessionID
                GROUP BY I.IndexID,T.TableID,D.DatabaseID) as R
                where R.DatabaseID = D1.DatabaseID and
                R.TableID = T1.TableID and
                R.IndexID = I1.IndexID and
                D1.SessionID = @SessionID  and
                R.Count > 0
        order by
    [Database!2!DatabaseID!hide],[Schema!3!Name!ELEMENT],[Table!4!TableID!hide],
                [Index!5!NumberOfReferences!ELEMENT] , [Index!5!IndexID!hide]
        FOR XML EXPLICIT
    end
    GO
    /****** Object:  StoredProcedure
    [dbo].[sp_DTA_index_usage_helper_relational]    Script Date: 12/31/2008
    10:54:26 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    create procedure [dbo].[sp_DTA_index_usage_helper_relational]
        @SessionID        int,
        @IsRecommended    int
        as begin select D1.DatabaseName as 'Database Name' ,T1.SchemaName as
    'Schema Name' ,T1.TableName as 'Table/View Name' ,I1.IndexName as 'Index
    Name' ,R.Count as 'Number of references' ,CAST(R.Usage as decimal(38,2)) as
    'Percent Usage' from
                    DTA_reports_database as D1 ,
                    DTA_reports_index as I1,
                    DTA_reports_table as T1,
                        select D.DatabaseID,T.TableID ,
                                I.IndexID  ,SUM(Q.Weight) as Count,
                                100.0 *  SUM(Q.Weight) /
                                ( 1.0 * (    select    CASE WHEN SUM(Q.Weight) > 0 THEN  SUM(Q.Weight)
                                                    else 1
                                                    end   
                                            from [msdb].[dbo].[DTA_reports_query] as Q
                                            where Q.SessionID = @SessionID ))
                    as Usage
            from
                    [msdb].[dbo].[DTA_reports_index] as I   
                    LEFT OUTER JOIN
                    [msdb].[dbo].[DTA_reports_queryindex] as QI ON QI.IndexID = I.IndexID
                    LEFT OUTER JOIN
                    [msdb].[dbo].[DTA_reports_query] as Q ON QI.QueryID = Q.QueryID
                    JOIN
                    [msdb].[dbo].[DTA_reports_table] as T ON I.TableID = T.TableID
                    JOIN
                    [msdb].[dbo].[DTA_reports_database] as D ON T.DatabaseID = D.DatabaseID
                    and Q.SessionID = QI.SessionID and
                    QI.IsRecommendedConfiguration = @IsRecommended and
                    Q.SessionID = @SessionID
                    GROUP BY I.IndexID,T.TableID,D.DatabaseID) as R
                    where R.DatabaseID = D1.DatabaseID and
                    R.TableID = T1.TableID and
                    R.IndexID = I1.IndexID and
                    D1.SessionID = @SessionID  and
                    R.Count > 0
                    order by R.Count desc end
    GO
    /****** Object:  StoredProcedure [dbo].[sp_DTA_database_access_helper_xml]  
    Script Date: 12/31/2008 10:53:31 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    create procedure [dbo].[sp_DTA_database_access_helper_xml]
                @SessionID        int
    as
    begin
        select 1            as Tag,
                NULL          as Parent,
                '' as [DatabaseAccessReport!1!!ELEMENT],
                NULL  as [Database!2!Name!ELEMENT] ,
                NULL as [Database!2!NumberOfReferences!ELEMENT],
                NULL as [Database!2!PercentUsage!ELEMENT]
            union all
        select 2 as Tag, 1 as Parent,NULL,D1.DatabaseName  ,
        R.Count  ,
        CAST(R.Usage as decimal(38,2))  from
                        [msdb].[dbo].[DTA_reports_database] as D1 ,
                            select D.DatabaseID,SUM(Q.Weight) as Count,
                                    100.0 *  SUM(Q.Weight) /
                                    ( 1.0 * (    select    CASE WHEN SUM(Q.Weight) > 0 THEN  SUM(Q.Weight)
                                                        else 1
                                                        end   
                                                from [msdb].[dbo].[DTA_reports_query] as Q
                                                where Q.SessionID = @SessionID ))
                        as Usage
                from
                            [msdb].[dbo].[DTA_reports_database] as D
                            LEFT OUTER JOIN
                            [msdb].[dbo].[DTA_reports_querydatabase] as QD ON QD.DatabaseID =
    D.DatabaseID
                            LEFT OUTER JOIN
                            [msdb].[dbo].[DTA_reports_query] as Q ON QD.QueryID = Q.QueryID
                            and Q.SessionID = QD.SessionID and
                            Q.SessionID = @SessionID       
                            GROUP BY D.DatabaseID
                        ) as R
                        where R.DatabaseID = D1.DatabaseID  and
                        D1.SessionID = @SessionID and
                        R.Count > 0
        order by Tag,[Database!2!NumberOfReferences!ELEMENT] desc
        FOR XML EXPLICIT
    end
    GO

  • How to get Reports for specific User that how many password has been reset using FIM SSPR in FIM 2010 R2 SSPR

    Hi,
    How to get Reports for specific User that how many password has been reset using FIM SSPR in FIM 2010 R2 SSPR
    Regards
    Anil Kumar

    Hello there Anil,
    A simple way to quickly get a overview is to look at the request history within the portal environment (note that this will expire in a few day based on your environment, after that you would need to FIM Reporting Module - but you could increase this to
    maybe 60 days to so, watch the DB size).
    To do this you could create some custom search scopes of do some custom queries. The creator of the SSPR activities always has the same GUID so you can use that so search.
    In your search scope you can use the following XPath to play with.
    - All Password Reset Requests - /Request[Creator='b0b36673-d43b-4cfa-a7a2-aff14fd90522' and Operation='Put']
    - All Completed Password Reset Requests - /Request[Creator='b0b36673-d43b-4cfa-a7a2-aff14fd90522' and RequestStatus=‘Completed']
    You can play with the "RequestStatus".
    Hope this helps.
    Almero Steyn (http://www.puttyq.com) [If a post helps to resolve your issue, please click the "Mark as Answer" of that post or "Helpful" button of that post. By marking a post as Answered or Helpful, you help others find the answer
    faster.]

  • SMW00 separate action for specific error-code

    Hello,
    I know transaction SMW00 to send emails for bdoc-errors. Can I take seperate action for specific error-codes from specific organisational units?
    Thanks for helping,
    Bart

    Hi Bart,
    Using standard action handler it is not possible but one other option is to take a copy of RSMW0_CONFIG_ERRORHANDLER and enhance it to send actions based on organisational units.
    Rregards,
    Surendar

  • SCCM Report for Applicable and Installed Updates Collection Wise

    Hi All, I was looking for a report on Applicable and Installed Updates Collection Wise and got this below query on the Internet and want to create a SCCM report with this below query. How to make this query working in SCCM report?
    Do I need to add prompts, if yes please guide me on adding prompts.
    SELECT
    DISTINCT
    SYS.Name0
    AS [Server Name], SIS.SMS_Installed_Sites0 AS [Site Code], UCS.Status AS [Patch Status Code],
    CASE WHEN UCS.Status = '2' THEN 'Applicable' WHEN UCS.Status = '3' THEN 'Installed' ELSE '' END AS 'Patch Status', UI.BulletinID AS [Bulletin ID],
    UI
    .ArticleID AS [Article ID], UI.
    Title
    FROM
    v_R_System AS SYS LEFT OUTER
    JOIN
    v_Update_ComplianceStatusAll
    AS UCS ON SYS.ResourceID = UCS.ResourceID INNER
    JOIN
    v_UpdateInfo
    AS UI ON UCS.CI_ID = UI.CI_ID INNER
    JOIN
    v_RA_System_SMSInstalledSites
    AS SIS ON SYS.ResourceID = SIS.
    ResourceID
    WHERE
    (UCS.Status IN ('2', '3')) AND (UI.ArticleID IN ('972270', '974392', '973904', '969947')) AND (SYS.Name0
    IN
    (SELECT DISTINCT v_FullCollectionMembership.
    Name
    FROM v_FullCollectionMembership INNER
    JOIN
    v_R_System
    ON v_R_System.ResourceID = v_FullCollectionMembership.ResourceID AND v_R_System.Active0 = 1 AND
    v_FullCollectionMembership
    .CollectionID IN ('Collection ID'
    ORDER
    BY
    [Patch Status Code]

    Yes it can be done and please run the query which i have shared in the thread
    I again pasted the query for you below..
    SELECT DISTINCT
    SYS.Name0 AS [Server Name], CASE WHEN UCS.Status = '2' THEN 'Applicable' WHEN UCS.Status = '3' THEN 'Installed' ELSE '' END AS 'Patch Status',
    UI.BulletinID AS [Bulletin ID], UI.ArticleID AS [Article ID], UI.Title
    FROM         v_R_System AS SYS LEFT OUTER JOIN
                          v_Update_ComplianceStatusAll
    AS UCS ON SYS.ResourceID = UCS.ResourceID INNER JOIN
                          v_UpdateInfo AS UI ON UCS.CI_ID
    = UI.CI_ID
    WHERE     (UCS.Status IN ('2', '3')) AND (SYS.Name0 IN (SELECT DISTINCT v_FullCollectionMembership.Name
    FROM v_FullCollectionMembership INNER JOIN
         v_R_System ON v_R_System.ResourceID = v_FullCollectionMembership.ResourceID AND v_R_System.Active0 = 1 AND
                                                       v_FullCollectionMembership.CollectionID
    IN ('XXX00000')))
    Kamala kannan.c| Please remember to click “Mark as Answer” or Vote as Helpful if its helpful for you. |Disclaimer: This posting is provided with no warranties and confers no rights

  • Designing the consolidated and line item report for specific material

    Hi
    i have a R/3-report and it run only for 7-materials.That means we need to only those 7-materials in the selection screen of report.
    Then we will get each material corresponding line item details(material no, profit center, variable cost, quanity, price, financial loss(this is calculated based on quantity) , Utility Consumption(calculated based on price, variablecost)  ) in one report.
    Another report will give same for consolidated values of financial loss, utiliy consumption.
    <b>so how can i design the consolidated and lineitem details report for each material.</b> pls let me know
    kumar

    0VENDOR_ATTR - Vendor Master Data Attributes
    0FI_AP_51 - Check Register Line Items
    0FI_AP_4 - Accounts Payable Line Items
    It should be noted, however, that this won't get you everything that you need, so you may have to create enhance one or more of these DataSources and create User Exit ABAP code to get the required data. Also, the 0FI_AP_51 DataSource isn't available if your source system isn't ECC6 EHP3 or higher. If your source system is less than that, you're going to have to create a generic DataSource for the data from the PAYR table.

  • FBL3N to BW report for specific GL's

    Dear BW Experts,
    I want to create report in BW for FBL3N for specific GL's, for open items.
    I am done with development.
    Report on standard DSO 0FIGL_O02 (0FI_GL_4)...
    Simply GL in rows, with filter for open status.
    Issue: Balance is not matching from ECC for one GL, because of one document,
    which is closed in ECC but in DSO its still open (data is upto date in BW).
    Thanks
    Arun Purohit

    I did re-load but without luck.....
    that docment is there in BSAS(closed docs table) table not in BSIS (open docs table)...still ds 0FI_GL_4 shows that item still open....

  • SCCM Report for Laptop Battery Condition

    Good morning,
    We are in a situation where we're needing to monitor conditions of laptop batteries in the school district I manage.   I have added the laptop batteries class(Win32_Battery) and have all required/requested information checked under this class.  This
    has been set for a week, so all devices should be inventoried by now.
    How do you recommend my getting a report together that shows battery condition/etc?  The fields I would like to see are ones such as:
    Win32_Battery
    battery status
    design capacity
    design voltage
    Expected Life
    Error Description
    Full Charge Capacity
    Really anything that will help us in knowing which laptops batteries need replacing. 
    I am not that knowledgeable about SQL reporting/SCCM reporting, so any help in getting this is greatly appreciated.  Any resources that you can point me in for getting more familiar with creating my own reports would be greatly appreciated.  I
    don't even know where to begin.
    Thank you!

    Good you have added the class. Please use the following link for the detailed information about Win32_Battery:
    https://msdn.microsoft.com/en-us/library/aa394074(v=vs.85).aspx
    Last Full Charge should guide your decision on replacement.
    Following link will help you as well:
    http://www.helpwithwindows.com/Windows7/Check-your-laptop-battery-health-in-Windows-7.html
    -RG

  • T-codes to get payment run report for different company codes?

    Hello sap gurus,
    I have a scenario like -
    > use of IDocs to process vendor and employee payments. Both bank transfers and checks will be processed through interface.
    Now, What is the t-code to get report for payments for different customer, comp codes and vendor?
    I am new to SAP in testing.
    Appreciate ur help......
    Regards,
    Shamsher
    Edited by: shamsher123 on Jun 4, 2010 11:52 AM

    Hello,
    See the List below hope this will help.
    MIR5 - Display List of Invoice Documents
    S_ALR_87012105 - List of Down Payments Open On Key Date - Vendors
    S_ALR_87012085 - Vendor Payment History with OI Sorted List
    S_P99_41000099 - Payment List
    Prashant Rathore.

  • Agewise Reports for Vendors - Transaction Code?

    Agewise reports for Vendors are needed.
    What would be the best way and the Transaction code?

    Hi Bhatia,
    Transaction code F.42 via Information systems > Accounting > Financial accounting > Vendor accounts > Account balances ; you may find the balances and movements for different periods by varying the reporting periods and years.
    Hope this helps.
    Please assign points as way to say thanks

  • Delete authorization for specific Company Code

    All,
    For a specific transactions, our users may only run the transaction for a specific company code. Transaction is TPM55A
    What authorization object do I need to add to my role, so the users have only authorization for let's say Company code range 1000 - 1050.
    Many thanx for help
    kr,
    Stef

    Hi Stef,
    Please try to add this authorisation object manually F_BKPF_BUK- Authorisation object for company code.
    In the filed BUKRS you can maintain the company code as you required for the users.
    I hope this may help you in resolving the issue.
    Thanks
    Karthick

  • Can't install Photoshop Elements 10 for Mac: Exit Code 7

    I recently purchased and downloaded Photoshop Elements 10 for Mac (my OS is 10.6.8); when I try to install, I receive the  error pasted below. I have tried the fixes posted on the following pages and none have worked. Any ideas?
    http://kb2.adobe.com/cps/925/cpsid_92579.html
    http://kb2.adobe.com/cps/925/cpsid_84332.html
    Thanks in advance for your help!
    ERROR MESSAGE:
    Exit Code: 7
    -------------------------------------- Summary --------------------------------------
    - 0 fatal error(s), 17 error(s), 3 warning(s)
    WARNING: DW031: Payload:{3F023875-4A52-4605-9DB6-A88D4A813E8D} Camera Profiles Installer 6.0.0.0 has been updated and has been selected for repair. The patch {FEA75AFB-4905-43BB-B1D5-5B44D681BFE7} Camera Profiles Installer_6.4_AdobeCameraRawProfile6.0All 6.4.0.0 will be uninstalled now.
    WARNING: DW031: Payload:{3F023875-4A52-4605-9DB6-A88D4A813E8D} Camera Profiles Installer 6.0.0.0 has been updated and has been selected for repair. The patch {FEA75AFB-4905-43BB-B1D5-5B44D681BFE7} Camera Profiles Installer_6.4_AdobeCameraRawProfile6.0All 6.4.0.0 will be uninstalled now.
    ----------- Payload: {60CB5C6D-5B99-45D3-BAB5-E7728182101E} Adobe Photoshop Elements 10 10.0.0.0 -----------
    ERROR: DF024: Unable to preserve original file at "/Library/Fonts/NuevaStd-Bold.otf" Error 0(Seq 1586)
    ERROR: DW063: Command ARKDeleteFileCommand failed.(Seq 1586)
    ERROR: DF023: Unable to delete file "/Applications/Adobe Photoshop Elements 10/Support Files/Adobe Photoshop Elements Editor.app/Contents/Info.plist". Error 0(Seq 2)
    ERROR: DW063: Error rolling back command ARKCopyFileCommand(Seq 2)
    ERROR: DF001: Unable to get permissions of "/Applications/Adobe Photoshop Elements 10/Support Files/Adobe Photoshop Elements Editor.app/Contents"(Seq 2)
    ERROR: DW063: Error rolling back command ARKCreateDirectoryCommand(Seq 2)
    ERROR: DF001: Unable to get permissions of "/Applications/Adobe Photoshop Elements 10/Support Files/Adobe Photoshop Elements Editor.app"(Seq 2)
    ERROR: DW063: Error rolling back command ARKCreateDirectoryCommand(Seq 2)
    ERROR: DF001: Unable to get permissions of "/Applications/Adobe Photoshop Elements 10/Support Files"(Seq 2)
    ERROR: DW063: Error rolling back command ARKCreateDirectoryCommand(Seq 2)
    ERROR: DF015: Unable to delete symlink "/Applications/Adobe Photoshop Elements 10/Adobe Photoshop Elements 10"(Seq 1)
    ERROR: DW063: Error rolling back command ARKCopySymlinkCommand(Seq 1)
    ERROR: DF001: Unable to get permissions of "/Applications/Adobe Photoshop Elements 10"(Seq 1)
    ERROR: DW063: Error rolling back command ARKCreateDirectoryCommand(Seq 1)
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    ERROR: DW050: The following payload errors were found during install:
    ERROR: DW050:  - Adobe Photoshop Elements 10: Failed due to Language Pack installation failure
    ERROR: DW050:  - Adobe Photoshop Elements 10_AdobePhotoshopElements10_en_US: Install failed

    *ERROR: DF024: Unable to preserve original file at "/Library/Fonts/NuevaStd-Bold.otf" Error 0(Seq 1586) - navigate to /Library/Fonts/ and check if NuevaStd-Bold.otf is a folder. if it is move that folder to your desktop
    *ERROR: DF023: Unable to delete file "/Applications/Adobe Photoshop Elements 10/Support Files/Adobe Photoshop Elements Editor.app/Contents/Info.plist" - delete Adobe Photoshop Elements 10(folder) from the applications folder.
    try reinstalling PSE 10.
    Good luck!

  • SCCM Report for Pending DP status

    Due to the issue in our sccm  hierarchy , there is problem in DP copying
    We want to pull the report for past one week packages we deployed, that how many of them DP status is Install pending.

    Yes, I know this is an old post, I’m trying to clean them up.
    What wrong with reviewing the built-in called All active package distributions?
    http://www.enhansoft.com/

  • SCCM reports for SCEP malware short history

    Hello,
    SCCM reports show only history for the last two month of the malware that was found on the computers. Is there any way to configure how long to keep history of malware records on SCCM?

    After a bit more digging around, I believe I found the answer for this.
    In SCCM, navigate to Administration>Site Configuration>Sites>. Right click on your primary site and select Site Maintenance. Find the entry for
    Delete Aged Threat Data and change the value to what you require.
    In my case, I changed the value from 30 to 365. This task cleans out the EP_Malware and EP_MalwarePath SQL tables, which hold the records of detected malware activity for the SCCM clients.

Maybe you are looking for

  • Unable to open multiple images in preview from finder

    I open a folder that contains a lot of .jpg photo files and select all and then open from the finder menu. In Leopard all the images are opened in one instance of preview. But after upgrade to Snow Leopard, only one or two of the selected images are

  • Control Tab order?

    How can i control(customize) the Tab order? By default Tab order is from left to right on the Form, I need to change this order. Do i have to use focusLost/Gained ? Thx Ali

  • Preloading Java classes

    Hi everybody, I am trying to preload some Xerces XML Parser class files in order to speed up the (first) parsing procedure of a document. Therefore, I tried the following: String cwd = System.getProperty("user.dir");           String[] jars = new Str

  • Execute the SSIS packages (2008 version) using SQL job 2008

    We need to execute the SSIS packages (2008 version) using SQL job Please help with details information how to execute it. 1.Protection level of the SSIS packages. 2.Configuration File (Curently using XML file) 3.Please provide details how to create C

  • Obiee 10g cannot start presentation services

    hi i cannot start the presentation services while configuring the scheduler Path not found: E:\OracleBIData\web\bin\config\credentialstore.xml The system cannot find the path specified. Type: Error Severity: 20 Time: Tue Feb 07 00:14:03 2012 File: pr