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

SSIS Metadata can not be determined

$
0
0
Hello,I have upgraded ssis package from 2005 to 2014. I have this component inside package "Executes an SQL command for each row in a dataset." and I am using a SP called EXEC sp_exe_cmdshell_restore ?I am getting validation error for this component and it says,Error 1 Validation error. generate sql command 1: generate sql command 1: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "The metadata could not be determined because statement 'EXEC @Result = xp_cmdshell @sqlcmd ; -- parse list of dumps to get db name for load' in procedure 'sp_exe_cmdshell_restorel' invokes an extended stored procedure.". dr_load_database.dtsx 0 0 This is my SP[code="sql"]ALTER PROCEDURE [dbo].[sp_exe_cmdshell_restore] @sqlcmd nvarchar(1000) ASBEGINSET NOCOUNT ON;DECLARE @Result intEXEC @Result = xp_cmdshell @sqlcmd ;END[/code]I am trying to restore few databases automatically daily. So @SQLCMD is grabing various restore db commands from above processed text file. These statements looks such as "restore database @dbname from ''\\share\db_path\backup_today's date.bak" And then EXEC sp_exe_cmdshell_restore ? is processing each statement to restore all these databases.This is working in 2005 but in 2014 I am getting this validation error.Please let me know how to troubleshoot this.Thanks.

Viewing all articles
Browse latest Browse all 3145

Trending Articles