Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Hresult: 0x80004005 Description: "The metadata could not be determined because the statements not compatible with the statement

$
0
0
Dear Experts,I am running below TSQL from SSIS package and its failing but runs successfully when ran from SSMS.Can anyone please help me to figure out the problem.IF(select count(*) from msdb..backupset) > 0BEGINselect @@servername as Instance,b.database_name as Database_name, ma:@b.backup_finish_date) as Backup_Datefrom msdb..backupset as b with (nolock)join master.[sys].[databases] as d with (nolock) on (b.database_name = d.name)group by b.database_name, b.[type], d.recovery_model_desc order by b.database_nameENDELSEBEGINselect @@servername as Instance, 'ALL' as Database_name, '2000-01-01' as Backup_DateENDHresult: 0x80004005 Description: "The metadata could not be determined because the statement 'select @@servername as Instance, 'ALL' as Database_name, '2000-01-01' as Backup_Date' is not compatible with the statement 'select @@servername as Instance,b.database_name as Database_name, ma:@b.backup_finish_date) as Bac'.".

Viewing all articles
Browse latest Browse all 3145

Trending Articles