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

Similar Messages

  • Thread: Process exit code 1073741819

    I am using JDeveloper 10.1.3 and specifically JSF technology to build a web application. Lately some pages stopped working or displaying with the command line of JDeveloper displaying the following error: "Process exit code 1073741819". Where can I find a reference for such codes and their meanings? I also need to know the meaning of this error and how it can be solved.
    Thank you in advance for your help

    Hi,
    I have encountered a similar issue in one of my SSIS packages. The package performed the following tasks.
    Check for the PSV files in the source directory. These files are of two types *phone*.psv format and *lead*.psv
      Convert the new files into .xlsx files and then log the processed file names into another table
     The file processing for the two types of files was being done in two different For Each Containers, which processed the files parallel'y if both the type of files were found.
    The package ran fine when only one of the file types were found, but if both the types of files were found then the package failed with the same error. 
    "The return value was unknown.  The process exit code was -1073741819.  The step failed."
    On checking up the details provided on this thread i found the culprit was the parallel file processing causing a conflict in the cache usage, thereby causing this error. (Refer
    http://support.microsoft.com/kb/924016?wa=wsignin1.0 )
    I then changed the package execution process in a manner that the two for each containers executed one after other even if both the types (phone, lead) of files were found. I basically made the control flow sequential from parallel. 
    The issue didn't reoccur a single time after that.
    So the point here is to try and make the file processing tasks as serial (in CONTROL FLOW) as possible in the sequence of execution, thereby bypassing any instance where the two different operations doing similar job (thereby using the same cache) do not
    create a conflict in package execution.
    Hope this helps to clear the Air on this issue to some extent.
    Thanks
    Suvrat

  • Process exit code 1073741819

    I am using JDeveloper 10.1.3 and specifically JSF technology to build a web application. Lately some pages stopped working or displaying with the command line of JDeveloper displaying the following error: "Process exit code 1073741819". Where can I find a reference for such codes and their meanings? I also need to know the meaning of this error and how it can be solved.
    Thank you in advance for your help

    Hi,
    I have encountered a similar issue in one of my SSIS packages. The package performed the following tasks.
    Check for the PSV files in the source directory. These files are of two types *phone*.psv format and *lead*.psv
      Convert the new files into .xlsx files and then log the processed file names into another table
     The file processing for the two types of files was being done in two different For Each Containers, which processed the files parallel'y if both the type of files were found.
    The package ran fine when only one of the file types were found, but if both the types of files were found then the package failed with the same error. 
    "The return value was unknown.  The process exit code was -1073741819.  The step failed."
    On checking up the details provided on this thread i found the culprit was the parallel file processing causing a conflict in the cache usage, thereby causing this error. (Refer
    http://support.microsoft.com/kb/924016?wa=wsignin1.0 )
    I then changed the package execution process in a manner that the two for each containers executed one after other even if both the types (phone, lead) of files were found. I basically made the control flow sequential from parallel. 
    The issue didn't reoccur a single time after that.
    So the point here is to try and make the file processing tasks as serial (in CONTROL FLOW) as possible in the sequence of execution, thereby bypassing any instance where the two different operations doing similar job (thereby using the same cache) do not
    create a conflict in package execution.
    Hope this helps to clear the Air on this issue to some extent.
    Thanks
    Suvrat

  • Process exited with exit code -1073741819+jdeveloper 9.0.5.1

    Hi,
    I am using JDeveloper 9.0.5.1 version.When i am compiling the java file it is compiling fine. But when I am running it it is throwing the error
    Process exited with exit code -1073741819.
    What is that error code means........?

    Hello,
    It could mean that the cause is a StackOverflowError.
    It could be that you are not running against your JDeveloper 9.0.5.1
    embedded OC4J, but without noticing it, you are running your program
    against another OC4J which would be incompatible!
    May be you are running several JDevelopers on your machine, or
    having a standalone OC4J and deployed your application against
    such a different OC4J.
    Try shutting down all the OC4J listeners on your machine, restart JDev
    and run your java code again.
    Hope this can help you.
    Stephan

  • SSIS package fails in sql server agent wirh 'Process exit code "-532459699" runs fine when run independantly

    I have a SSIS package that fails when running via sql server agent.  I can successfully run it from BIDS.    I have created a proxy account that is in the local server administrators group and is sysadmin.  SQL Server Agent and SQL
    Server Integration Services  are running under the same account,
    following the the error message:
    Error: 2014-02-07 10:29:12.59
       Code: 0xC0029151
       Source: Execute De-linking Execute Process Task
       Description: In Executing "d:\cie\files\working\9426\PowerpointConsole.exe" " 60.ppt" at "d:\cie\files\working\9426", The process exit code was "-532459699" while the expected was "0".
    End Error
    This package ran successfully on a different server running windows 2003 and sql server 2008 r2.  The new environment is windows 7 with sql server 2008 r2.

    Hi Gaileg,
    As Abhinav said, to check whether it is a 32-bit/64-bit issue, please check whether the package runs in 32-bit runtime mode or 64-bit runtime mode in BIDS by checking the Run64bitRuntime property of the project. Then, make sure the package runs in the same
    runtime mode in the SQL Server Agent job by checking or unchecking the “Use 32 bit runtime” option for the Execution options of the job step.
    If it is not the issue, please create another job that uses a CmdExec type job step to call the executable “D:\cie\files\working\9426\PowerpointConsole.exe”. If this job also fails, the issue is actually occurs because of the issue between executable and
    SQL Server Agent rather than the SSIS package itself.
    Regards,
    Mike Yin
    TechNet Community Support

  • 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 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

  • Recommended database initialization parameters databases for OBIEE

    Hi ,
    We are implementing OBIEE. We created 11gR1 (11.1.0.7) databases - one for datawarehouse and second for ETL repository. Can anyone please suggest the recommended database initialization parameters for the same. I searched metalink and got for EBS (11i/R12) and not for OBIEE.
    Also, if you have any best practices documents for OBIEE, please provide the link.
    Thanks in advance for your help

    You need to look for OBIA (Apps) not OBIEE:
    [http://download.oracle.com/docs/cd/E14847_01/bia.796/e14843/anyinstadmpreinstall.htm#g1125320]
    - Section 3.1, "General Guidelines for Setting Up Oracle Business Analytics Warehouse"
    - Section 3.2, "IBM DB2 UDB-Specific Database Guidelines for Oracle Business Analytics Warehouse"
    - Section 3.3, "IBM DB2 UDB zOS and OS/390 and z/OS-Specific Database Guidelines for Oracle Business Analytics Warehouse"
    - Section 3.4, "SQL Server-Specific Database Guidelines for Oracle Business Analytics Warehouse"
    - Section 3.5, "Teradata-Specific Database Guidelines for Oracle Business Analytics Warehouse"
    - Section 3.6, "Oracle-Specific Database Guidelines for Oracle Business Analytics Warehouse"
    - Section 3.7, "Additional Suggestions for Optimizing Oracle Performance in Oracle Business Analytics Warehouse"
    - Section 3.8, "Partitioning Guidelines For Large Fact Tables"
    - Section 3.9, "Miscellaneous Information About Oracle BI Applications Deployments"
    Cheers,
    C.

  • SQL 2012 and later will fail to publish a database for any tables with a default constraint that references a user defined function.

    Script will create database, 3 database objects and publish. 
    The error is due to the generation script to create the conflict tables that is not stripping out default constraints that reference a UDF. 
    As you can see below, the failure is on the generation script for the conflict table.
    The conflict table should be a bucket table that shouldn’t enforce data integrity. 
    See how the default constraints for the columns someint and somestring were stripped out of the generation logic however the default constraint that utilizes a UDF persist and uses the same object name that was used on the production table (The
    bold line) , this occurs if I explicitly name the constraint or let the system generate the name for me like in the example posted. 
      The only way I could see getting around this right now is to drop all default constraints in the system that uses a UDF, publish then add the constraints back which is vulnerable to invalid data and a lot of moving
    steps.  This all worked with SQL 2000, 2005, 2008, 2008r2, it’s stopped working in SQL 2012 and continues to not work in SQL 2014. 
    Error messages:
    Message: There is already an object named 'DF__repTable__id__117F9D94' in the database.
    Could not create constraint. See previous errors.
    Command Text: CREATE TABLE [dbo].[MSmerge_conflict_MergeRepFailurePublication_repTable](
            [id] [varchar](8) NULL CONSTRAINT [DF__repTable__id__117F9D94]  DEFAULT ([dbo].[repUDF]()),
            [somedata] [varchar](64) NULL,
            [rowguid] [uniqueidentifier] ROWGUIDCOL  NULL,
            [someint] [int] NULL,
            [somestring] [varchar](64) NULL
    Parameters:
    Stack:    at Microsoft.SqlServer.Replication.AgentCore.ReMapSqlException(SqlException e, SqlCommand command)
       at Microsoft.SqlServer.Replication.AgentCore.AgentExecuteNonQuery(SqlCommand command, Int32 queryTimeout)
       at Microsoft.SqlServer.Replication.AgentCore.ExecuteDiscardResults(CommandSetupDelegate commandSetupDelegate, Int32 queryTimeout)
       at Microsoft.SqlServer.Replication.Snapshot.YukonMergeConflictTableScriptingManager.ApplyBaseConflictTableScriptToPublisherIfNeeded(String strConflictScriptPath)
       at Microsoft.SqlServer.Replication.Snapshot.BaseMergeConflictTableScriptingManager.DoConflictTableScriptingTransaction(SqlConnection connection)
       at Microsoft.SqlServer.Replication.RetryableSqlServerTransactionManager.ExecuteTransaction(Boolean bLeaveTransactionOpen)
       at Microsoft.SqlServer.Replication.Snapshot.BaseMergeConflictTableScriptingManager.DoConflictTableScripting()
       at Microsoft.SqlServer.Replication.Snapshot.MergeSmoScriptingManager.GenerateTableArticleCftScript(Scripter scripter, BaseArticleWrapper articleWrapper, Table smoTable)
       at Microsoft.SqlServer.Replication.Snapshot.MergeSmoScriptingManager.GenerateTableArticleScripts(ArticleScriptingBundle articleScriptingBundle)
       at Microsoft.SqlServer.Replication.Snapshot.MergeSmoScriptingManager.GenerateArticleScripts(ArticleScriptingBundle articleScriptingBundle)
       at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.GenerateObjectScripts(ArticleScriptingBundle articleScriptingBundle)
       at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.DoScripting()
       at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.DoScripting()
       at Microsoft.SqlServer.Replication.Snapshot.MergeSnapshotProvider.DoScripting()
       at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.GenerateSnapshot()
       at Microsoft.SqlServer.Replication.SnapshotGenerationAgent.InternalRun()
       at Microsoft.SqlServer.Replication.AgentCore.Run() (Source: MSSQLServer, Error number: 2714)
    Get help: http://help/2714
    Server COL-PCANINOW540\SQL2012, Level 16, State 0, Procedure , Line 1
    Could not create constraint. See previous errors. (Source: MSSQLServer, Error number: 1750)
    Get help: http://help/1750
    Server COL-PCANINOW540\SQL2012, Level 16, State 0, Procedure , Line 1
    Could not create constraint. See previous errors. (Source: MSSQLServer, Error number: 1750)
    Get help: http://help/1750
    Pauly C
    USE [master]
    GO
    CREATE DATABASE [MergeRepFailure]
    ALTER DATABASE [MergeRepFailure] SET COMPATIBILITY_LEVEL = 110
    GO
    USE [MergeRepFailure]
    GO
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    create view
    [dbo].[repView] as select right(newid(),8) as id
    GO
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE FUNCTION [dbo].[repUDF]()
    RETURNS varchar(8)
    BEGIN
    declare @val varchar(8)
    select top 1 @val = id from [repView]
    return @val
    END
    GO
    create table repTable
    id varchar(8) default([dbo].[repUDF]()),
    somedata varchar(64) null,
    rowguid uniqueidentifier ROWGUIDCOL default(newid()),
    someint int default(1),
    somestring varchar(64) default('somestringvalue')
    GO
    insert into reptable (somedata) values ('whatever1')
    insert into reptable (somedata) values ('whatever2')
    go
    /*test to make sure function is working*/
    select * from reptable
    GO
    /*Publish database*/
    use [MergeRepFailure]
    exec sp_replicationdboption @dbname = N'MergeRepFailure', @optname = N'merge publish', @value = N'true'
    GO
    declare @Descrip nvarchar(128)
    select @Descrip = 'Merge publication of database ''MergeRepFailure'' from Publisher ''' + @@servername +'''.'
    print @Descrip
    -- Adding the merge publication
    use [MergeRepFailure]
    exec sp_addmergepublication @publication = N'MergeRepFailurePublication', @description = N'@Descrip',
    @sync_mode = N'native', @retention = 14, @allow_push = N'true', @allow_pull = N'true', @allow_anonymous = N'true',
    @enabled_for_internet = N'false', @snapshot_in_defaultfolder = N'true', @compress_snapshot = N'false', @ftp_port = 21,
    @ftp_subdirectory = N'ftp', @ftp_login = N'anonymous', @allow_subscription_copy = N'false', @add_to_active_directory = N'false',
    @dynamic_filters = N'false', @conflict_retention = 14, @keep_partition_changes = N'false', @allow_synctoalternate = N'false',
    @max_concurrent_merge = 0, @max_concurrent_dynamic_snapshots = 0, @use_partition_groups = null, @publication_compatibility_level = N'100RTM',
    @replicate_ddl = 1, @allow_subscriber_initiated_snapshot = N'false', @allow_web_synchronization = N'false', @allow_partition_realignment = N'true',
    @retention_period_unit = N'days', @conflict_logging = N'both', @automatic_reinitialization_policy = 0
    GO
    exec sp_addpublication_snapshot @publication = N'MergeRepFailurePublication', @frequency_type = 4, @frequency_interval = 14, @frequency_relative_interval = 1,
    @frequency_recurrence_factor = 0, @frequency_subday = 1, @frequency_subday_interval = 5, @active_start_time_of_day = 500, @active_end_time_of_day = 235959,
    @active_start_date = 0, @active_end_date = 0, @job_login = null, @job_password = null, @publisher_security_mode = 1
    use [MergeRepFailure]
    exec sp_addmergearticle @publication = N'MergeRepFailurePublication', @article = N'repTable', @source_owner = N'dbo', @source_object = N'repTable', @type = N'table',
    @description = null, @creation_script = null, @pre_creation_cmd = N'drop', @schema_option = 0x000000010C034FD1, @identityrangemanagementoption = N'manual',
    @destination_owner = N'dbo', @force_reinit_subscription = 1, @column_tracking = N'false', @subset_filterclause = null, @vertical_partition = N'false',
    @verify_resolver_signature = 1, @allow_interactive_resolver = N'false', @fast_multicol_updateproc = N'true', @check_permissions = 0, @subscriber_upload_options = 0,
    @delete_tracking = N'true', @compensate_for_errors = N'false', @stream_blob_columns = N'false', @partition_options = 0
    GO
    use [MergeRepFailure]
    exec sp_addmergearticle @publication = N'MergeRepFailurePublication', @article = N'repView', @source_owner = N'dbo', @source_object = N'repView',
    @type = N'view schema only', @description = null, @creation_script = null, @pre_creation_cmd = N'drop', @schema_option = 0x0000000008000001,
    @destination_owner = N'dbo', @destination_object = N'repView', @force_reinit_subscription = 1
    GO
    use [MergeRepFailure]
    exec sp_addmergearticle @publication = N'MergeRepFailurePublication', @article = N'repUDF', @source_owner = N'dbo', @source_object = N'repUDF',
    @type = N'func schema only', @description = null, @creation_script = null, @pre_creation_cmd = N'drop', @schema_option = 0x0000000008000001,
    @destination_owner = N'dbo', @destination_object = N'repUDF', @force_reinit_subscription = 1
    GO

    More information, after running a profile trace the following 2 statements, the column with the default on a UDF returns a row while the other default does not.  This might be the cause of this bug.  Is the same logic to generate the object on
    the subscriber used to generate the conflict table?  
    exec sp_executesql N'
    select so.name, schema_name(so.schema_id)
    from sys.sql_dependencies d
    inner join sys.objects so
    on d.referenced_major_id = so.object_id
    where so.type in (''FN'', ''FS'', ''FT'', ''TF'', ''IF'')
    and d.class in (0,1)
    and d.referenced_major_id <> object_id(@base_table, ''U'')
    and d.object_id = object_id(@constraint, ''D'')',N'@base_table nvarchar(517),@constraint nvarchar(517)',@base_table=N'[dbo].[repTable]',@constraint=N'[dbo].[DF__repTable__id__117F9D94]'
    exec sp_executesql N'
    select so.name, schema_name(so.schema_id)
    from sys.sql_dependencies d
    inner join sys.objects so
    on d.referenced_major_id = so.object_id
    where so.type in (''FN'', ''FS'', ''FT'', ''TF'', ''IF'')
    and d.class in (0,1)
    and d.referenced_major_id <> object_id(@base_table, ''U'')
    and d.object_id = object_id(@constraint, ''D'')',N'@base_table nvarchar(517),@constraint nvarchar(517)',@base_table=N'[dbo].[repTable]',@constraint=N'[dbo].[DF__repTable__somein__1367E606]'
    Pauly C

  • Need for customer exit code to go to previous date

    In the ODS there is a date which is a user entry on my report. I need to write a customer exit which goes to previous date.
    In other words let's say user entered 07/07/07 at the user entry, and there is no activity for the entered date. The previous activity date in ODS data is 07/05/07. The report should run based on the previous date. ( Date is the key by the way )
    I will appreciate any help with points,
    Regards,
    Mike

    I just wrote this quickly and I limited to 10 loops because something is wrong if it is further back than that and I think another solution should be done.  This is also assuming the volume of data is not too large.  If so you may want to take the year off the date and add that to the select statement.
    Can the previous date be any date?  So lets say the user entered 07/07/07 and the last activity was 01/01/07?  Is date the only key? 
    If so you can do something like this.
    date_ 1 like <date_ field in ODS>
    date_ 2 like <date_ field in ODS>
    counter(2) type n
      DATA:    BEGIN OF data_all OCCURS 0,
                 Date_ 3 like date_ 1
               END OF data_all
    date_ 1 = user enter
    counter = 10
    Select <date_ field> from <ods backend table> into data_all
    Sort ascending
    While counter > 0
       Read data all where data_all-date_3 = date_1
    If sy-subrc <> 0
      Date_ 1 = date_ 1 – 1
    Counter = counter - 1
    Continue.
    Else
    date_2 = date_1
    Exit.
    Endif
    End loop
    Return date_2

  • Any suggestion for tuning following code of fetching prompts from report.

    Hi Experts,
    In my application I want to fetch all prompts details from SAP BO.  I am using following code and its working fine but taking to much time in fetching data.
    public static ReportEngine reportEngineWebi = null;
      public static ReportEngine reportEngineFullClient = null;
      public static Prompts prompts = null;
      public static DocumentInstance di = null;
      public static Prompt cdzPrompt = null;
      public static PromptType cdzPromptType = null;
      public static Lov lov = null;
      public static Values lovValues = null;
      public static String[] pvalues = null;
      public static IWebi webi = null;
      public static IFullClient fullclient = null;
      public static int prmt_report_si_id = 0;
      public static String prmt_si_id = "";
      public static String prmt_si_title = "";
      public static String prmt_si_kind = "";
      public static String prmt_si_lov_previous_values = "";
      public static String prmt_si_lov_values = "";
    IInfoObjects objsprompts = oInfoStore
      .query("Select top 20000 * From CI_INFOOBJECTS Where si_kind in ('Webi') and SI_INSTANCE=0 and SI_PROCESSINFO.SI_HAS_PROMPTS=1");
      int prmt_report_si_id = 0;
      prmt_si_id = "";
      prmt_si_title = "";
      prmt_si_kind = "";
      prmt_si_lov_previous_values = "";
      prmt_si_lov_values = "";
      reportEngineWebi=((ReportEngines) oEnterpriseSession
      .getService("ReportEngines"))
      .getService(ReportEngines.ReportEngineType.WI_REPORT_ENGINE);
      for (int j = 0; j < objsprompts.getResultSize(); j++) {
      prompts = null;
      di = null;
      try {
      webi = (IWebi) objsprompts.get(j);
      di = reportEngineWebi.openDocument(webi.getID());
      try {
      prmt_report_si_id = 0;
      prmt_report_si_id = webi.getID();
      } catch (Exception e) {
      prmt_report_si_id = 0;
      prompts = di.getPrompts();
      try {
      if (prompts.getCount() > 0) {
      for (int i = 0; i < prompts.getCount(); i++) {
      cdzPrompt = prompts.getItem(i);
      try {
      prmt_si_id = "";
      prmt_si_id = cdzPrompt.getID();
      } catch (Exception e) {
      prmt_si_id = "";
      try {
      prmt_si_title = "";
      prmt_si_title = cdzPrompt.getName();
      } catch (Exception e) {
      prmt_si_title = "";
      try {
      cdzPromptType = cdzPrompt.getType();
      prmt_si_kind = cdzPromptType.toString();
      } catch (Exception e) {
      prmt_si_kind = "";
      // System.out.println("going to fetch prompt lov");
      cdzPromptType = cdzPrompt.getType();
      // System.out.println("promt type-" + cdzPromptType);
      // System.out.println("Ended***********"+i);
      if (cdzPrompt.hasLOV()) {
      try {
      prmt_si_lov_values = null;
      // System.out.println("going to found pvalues");
      pvalues = cdzPrompt.getPreviousValues();
      // System.out.println("pvalues found");
      prmt_si_lov_previous_values = "";
      if (pvalues.length > 0) {
      // System.out.println("pvalues-");
      for (int c = 0; c < pvalues.length; c++) {
      if (c == 0) {
      prmt_si_lov_previous_values = pvalues[c];
      } else {
      prmt_si_lov_previous_values = prmt_si_lov_previous_values
      + "," + pvalues[c];
      } catch (Exception e) {
      System.out.println("handle Error lov values");
      e.printStackTrace();
      // System.out.println(" ");
      // here enters prompts into databse...
      // System.out.println(i+" prompt fetch");
      pstmt.setInt(1, prmt_report_si_id);
      pstmt.setString(2, prmt_si_id);
      pstmt.setString(3, prmt_si_title);
      pstmt.setString(4, prmt_si_kind);
      pstmt.setString(5, prmt_si_lov_previous_values);
      pstmt.setString(6, prmt_si_lov_values);
      pstmt.setString(7, "Utility");
      pstmt.executeUpdate();
      } else {
      // System.out.println("No promts found");
      } catch (Exception e) {
      // System.out.println("Handle Error in code-");
      // e.printStackTrace();
      } catch (Exception e) {
      // Nothing...
      try {
      if(di!=null){
      //System.out.println("going to close di");
      di.closeDocument();
      //System.out.println("di close");
      } catch (Exception e) {
      // nothing..
      //System.out.println("*****************************single prompt completed********************************");
      if(reportEngineWebi!=null){
      try{
      reportEngineWebi.close();
      }catch(Exception e){
      System.out.println("Handle error! while closing reportEngineWebi prompt");
      e.printStackTrace();
    This code is working fine but taking too much time in fetching prompts.
    di = reportEngineWebi.openDocument(webi.getID());
    this is DocumentInstance object, its taking time.
    Please suggest me if there is any other option available to fetch prompts from SAP BO.
    Thanks in advanced

    Hi Vijay...
    The selection screen should look like...
    cb1 -
    variant1 -
    icb1 -
    date1 -
    time1
    cb2 -
    variant2 -
    icb2 -
    date2 -
    time2
    where...
    cb1 - checkbox which indicates the first report(YRTEST) in the table...
    variant1 - textbox for variant which has a help,on clicking should display all the variants of YRTEST report...
    icb1 - checkbox which indicates the immediate background processing...
    date1 - date on which the job should be scheduled...
    time1 - time on which the job should be scheduled...
    If icb1 is clicked then date1 & time1 should not be allowed to enter & vice-versa...
    cb2 - checkbox which indicates the second report(YRTEST1) in the table...
    variant2 - textbox for variant which has a help,on clicking should display all the variants of YRTEST1 report...
    icb2 - checkbox which indicates the immediate background processing...
    date2 - date on which the job should be scheduled...
    time2 - time on which the job should be scheduled...
    If icb2 is clicked then date2 & time2 should not be allowed to enter & vice-versa...
    Its not like what u said...(Based on user entered data fetch the data of report(variant,date,time) and you can submit the data to background job as incase of single record by looping the data)
    Because we have only ReportName,ReportDescription as fields in the table & not variant,date,time...The variant,date,time are all entered in the selection-screen only from which the background job is scheduled...
    I hope the requirement is more clearer...

  • Failed to install photoshop cc 2014 with exit code 34

    I was told:
    1 fatal error(s), 0 error(s) FATAL: Payload 'Camera Profiles Installer 8.0.0.15 {3F023875-4A52-4605-9DB6-A88D4A813E8D}' information not found in Media_db.

    Thank you, Jeff,
    I downloaded the Adobe Creative Cloud Cleaner Tool and deleted all previous versions of PS on my iMac. I succeeded to install Photoshop CC 2014 on my MacBookAir and MacBookPro as well. Grateful for your help.
    Regards,
    Lee Man Kuen
    (my Adobe ID: (1) [email protected] and (2) [email protected] Can I combine them into one single Adobe ID?)

  • "Quicktime failed to initialize. Error # -2093" and Error  Code -3

    "Please make sure Quicktime is properly installed on this computer."
    Can someone please help me? My itunes and quicktime player wont work and i keep getting this message. When I try to open itunes it tells me to please reinstall itunes.
    I tried doing a system restore to a previous date but that didnt work. I tried to uninstall quicktime from the add/remove menu but it wouldnt uninstall. I tried using the itune setup to 'repair' itunes and quicktime but that didnt work because when it got to the end of installing quicktime, i got 'Error Code -3'.
    I tried downloading quicktime off of apples website but that didnt work. I tried updating quicktime but that didnt work.
    I cant uninstall quicktime to reinstall everything. I cant get quicktime or my itunes to work.
    Can someone please help me out? Im desperate! Thanks.

    I just searched back a couple pages and found
    Quicktime 7.0.4 Standalone Installer
    I downloaded that and it successfully removed Quicktime for me so i could reinstall everything. Thanks to whoever posted that!

  • Installation Failed Exit Code 20 0 fatal errors, 0 errors, 0 warnings

    I'm trying to Install Creative Suite 6 Design Standard on my pc. I've tried two or three times after re-starting the computer and closing all open applications as advised by the Installer.  I continue to get an "Installation Failed" window while the error summary reads:
    Exit Code 20 0 fatal errors, 0 errors, 0 warnings
    Anybody know how to handle this?
    Thanks in advance for your help

    uninstall anything cs6 currently installed, clean and reinstall per Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6

  • Failed to luanch .....exe. Exit code: 512

    Greetings. I have a bundle which requires hardware drivers. To install them I've copied the driver files to a folder on the local machine. I then have an install action to launch the executable. The installer .exe has a silent switch /S which I've put in the Command line parameters. When the bundle is run the Launch executable action throws a failed to launch Failed to launch path to exe. Exit code: 512.
    If I take the switch out of the Command line parameters the exe does launch but then I've lost my silent install.
    I've used this approach many times before without problem. I've tried about a million things, still no luck. Any help would be much appreciated.

    Does it run if you run it manually?
    Tried checking "Using OS shell to start.." ?
    Anders Gustafsson (NKP)
    The Aaland Islands (N60 E20)
    Have an idea for a product enhancement? Please visit:
    http://www.novell.com/rms

Maybe you are looking for

  • Crashes, graphics glitches, and more crashes when editing video clips

    Can't for the life of me figure out why PE keeps crashing on me, so I'm here for help. My system consists of a i7-970 hexacore, 6GB ram, 1x 500GB os drive, 3x500gb raid 0 drives (this is where my video clips are stored), 2x GeForce GTX460 video cards

  • How do I change the phone number associated with my Bonjour account?

    How do I change the phone number associated with my Bonjour account?

  • GWIA not listening on HTTP port

    I recently upgraded our GW8 to new hardware and eventually to 2012 sp1, now I'm seeing the following error in the GWIA log and the GWIA is not listening on its http port. There is nothing listening on 9850 (default http port for gwia). ****** 04-10-1

  • URGENT :  2LIS_11_VAITM , 2LIS_02_ITM ( Deleted orders)

    Hi all I have been trying to fix this problem that I am having. For these 2 datasources which feed into 0SD_O01 and 0PUR_O01 respectively , the 0ITEM_DEL flag does not populate any values. I created some purchase and sales orders and deleted them but

  • Wanted: Technical info on SP 4600

    I am desperatley seeking for extentional technical info/specs on my Toshiba Satellite Pro 4600 laptop. I searched all over the web and called Toshiba support but all there seems to be available are product sheets and manuals. So any document that giv