Quantcast
Channel: SQL Server Integration Services forum
Viewing all 24688 articles
Browse latest View live

Do I need a server?

$
0
0

Hi:

      Here are the scenario:

10 workstations (with customized C# wpf apps :

                         upload video from Main PC(Server ??) Display video and may be some live data from Main PC within a intranet.

There may be a SQL Server (Standard) in Main PC, performing some data activities with customized C# WPF Applications. 

So do I need a Server ? (Window Server Standard ?)

Thanks


OLEDB source error???

$
0
0

Why am I getting this error?  

Import Column Transformation Error!!!!

$
0
0

I keep getting this Error:

[Import Column [2]] Error: The file name "C:\Users\BILL\Desktop\New folder\output\ImportColumnTransformation\C:\Users\BILL\Desktop\New folder\output\ImportColumnTransformation\DSC08163.JPG" is not valid. The file name is a device or contains invalid characters.


[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "Import Column" (2) failed with error code 0xC0209029 while processing input "Import Column Input" (3). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.  There may be error messages posted before this with more information about the failure.

"The package failed to load due to error 0xC0011008"

$
0
0
I am attempting to run SSIS packages from a windows form.  The user selects packages from a  CheckedLIstBox and, when finished, clicks a button to run the selected packages. The error occurs when assigning package values to a "new" package as follows: "pkgIn = app.LoadPackage(pkgLocation, null);" The entire button click code is listed below. This is running on a local server using local installations of visual studio 2008 and SQL Server 2005 with the ".dtsx" files on the local machine. It does not process any files.

I have read many similar instances of the same error which has pointed to authentication or MaxConurrentExecutables. I increased the "MaxConurrentExecutables" from -1 to 10 for each package and moved the "*.dtsx" files and SQL Server database to the local server (my workstation) to deal with authentication.

Thanks



private

 

void button1_Click(object sender, EventArgs e)

{

 

string @fileName;

 

 

foreach (string str in fileList)

{

@fileName = str;

 

string pkgLocation;

Microsoft.SqlServer.Dts.Runtime.

Application app;

 

DTSExecResult pkgResults_Sql;

pkgLocation =

@"C:\" + @fileName + ".dtsx";

app =

new Microsoft.SqlServer.Dts.Runtime.Application();

 

Package pkgIn = newPackage();

pkgIn = app.LoadPackage(pkgLocation,

null);

pkgIn.Execute();

}

}

How do i get Oracle Query data in MS Server Table..?

$
0
0

I am accessing Oracle server database and it is mirror database. So i have only read only access to this database.

For my application, i am using MS SQL Server database. I want to fetch data from Oracle database for internal processing.

How do i get all the Oracle Query data into my SQL server table without creating linked server.?

Is it possible to create Oracle Mirror dB data to my MS SQL Server table.?

My oracle query like below : 

select DISTINCT 
name,nvl(NUMBER,' ') AS NUMBER,
nvl(STATE,' ') AS STATE,nvl(FROM,' ') AS FROM,nvl(TO,' ') AS TN_TO,
from table1
    /* more joins here    */
UNION
select DISTINCT 
name,nvl(NUMBER,' ') AS NUMBER,
nvl(STATE,' ') AS STATE,nvl(FROM,' ') AS FROM,nvl(TO,' ') AS TN_TO,
from table2
    /* more joins here    */
UNION
select DISTINCT 
name,nvl(NUMBER,' ') AS NUMBER,
nvl(STATE,' ') AS STATE,nvl(FROM,' ') AS FROM,nvl(TO,' ') AS TN_TO,
from table3
    /* more joins here    */
UNION
select DISTINCT 
name,nvl(NUMBER,' ') AS NUMBER,
nvl(STATE,' ') AS STATE,nvl(FROM,' ') AS FROM,nvl(TO,' ') AS TN_TO,
from table4

So the same result i want to get it to my MS SQL Server table.

How do i do this....?

ORA-12899: value too large for column

$
0
0

Hi All,

We have created a SSIS package where our source and destination in Oracle. We are using 'OLE DB command' to update the records. My datatypes of source and target tables are the same (CHAR(1 BYTE)). When the package in executed, the insert looks fine but when there is an update, we get an error :

'ORA-12899: value too large for column "column_name" (actual: 2, maximum: 1)".

Is there any solution to this ?

Note: The same package when executed against SQL Server DB it executes well.

Regards,

Kailash

SSISDB (2017 CU8) running in Always on Group - Maintenance procedure bug (cleanup_server_retention_window)?

$
0
0

Hi,

Since upgrading to SQL 2017 (from 2017), the SSIS maintenance job keeps failing.  The job step is the following..

  DECLARE @role int
SET @role =(SELECT [role] FROM [sys].[dm_hadr_availability_replica_states] hars
             INNER JOIN [sys].[availability_databases_cluster] adc
                    ON hars.[group_id] = adc.[group_id]
                    WHERE hars.[is_local] = 1 AND adc.[database_name] ='SSISDB')
IF DB_ID('SSISDB') IS NOT NULL AND(@role IS NULL OR @role = 1)
       EXEC [SSISDB].[internal].[cleanup_server_retention_window]

However it fails with the error message"A cursor with the name 'execution_cursor' does not exist."

After looking through the proc, it de-allocated the cursor then tries to access it again within the while loop.  So we are deleting 1000 records from the SSIS history at a time, but then hit the error.  Whilst I could modify the procedure, I thought i'd see if anyone else encounted this.

SET QUOTED_IDENTIFIER ON
SET ANSI_NULLS ON
GO


CREATE PROCEDURE [internal].[cleanup_server_retention_window]
WITH EXECUTE AS 'AllSchemaOwner'
AS
    SET NOCOUNT ON
    
    DECLARE @enable_clean_operation bit
    DECLARE @retention_window_length int
    DECLARE @server_operation_encryption_level int
    
    DECLARE @caller_name nvarchar(256)
    DECLARE @caller_sid  varbinary(85)
    DECLARE @operation_id bigint
    
    EXECUTE AS CALLER
        SET @caller_name =  SUSER_NAME()
        SET @caller_sid =   SUSER_SID()
    REVERT
         
    
    BEGIN TRY
        SELECT @enable_clean_operation = CONVERT(bit, property_value) 
            FROM [catalog].[catalog_properties]
            WHERE property_name = 'OPERATION_CLEANUP_ENABLED'
        
        IF @enable_clean_operation = 1
        BEGIN
            SELECT @retention_window_length = CONVERT(int,property_value)  
                FROM [catalog].[catalog_properties]
                WHERE property_name = 'RETENTION_WINDOW'
                

            IF @retention_window_length <= 0 
            BEGIN
                RAISERROR(27163    ,16,1,'RETENTION_WINDOW')
            END
            SELECT @server_operation_encryption_level = CONVERT(int,property_value)  
                FROM [catalog].[catalog_properties]
                WHERE property_name = 'SERVER_OPERATION_ENCRYPTION_LEVEL'

            IF @server_operation_encryption_level NOT in (1, 2)       
            BEGIN
                RAISERROR(27163    ,16,1,'SERVER_OPERATION_ENCRYPTION_LEVEL')
            END
            INSERT INTO [internal].[operations] (
                [operation_type],  
                [created_time], 
                [object_type],
                [object_id],
                [object_name],
                [status], 
                [start_time],
                [caller_sid], 
                [caller_name]
                )
            VALUES (
                2,
                SYSDATETIMEOFFSET(),
                NULL,                     
                NULL,                     
                NULL,                     
                1,      
                SYSDATETIMEOFFSET(),
                @caller_sid,            
                @caller_name            
                ) 
            SET @operation_id = SCOPE_IDENTITY() 
            
            DECLARE @temp_date datetimeoffset
            DECLARE @rows_affected bigint
            DECLARE @delete_batch_size int

            
            SET @delete_batch_size = 1000  
            SET @rows_affected = @delete_batch_size
            
            SET @temp_date = DATEADD(day, -@retention_window_length, SYSDATETIMEOFFSET())
            
            CREATE TABLE #deleted_ops (operation_id bigint, operation_type smallint)
            DECLARE execution_cursor CURSOR GLOBAL FOR SELECT operation_id FROM #deleted_ops  WHERE operation_type = 200

			DECLARE @sqlString_operation_messages_scaleout   nvarchar(1024)
            DECLARE @sqlString_event_messages_scaleout       nvarchar(1024)
            DECLARE @sqlString_event_message_context_scaleout        nvarchar(1024)

            IF @server_operation_encryption_level = 1
            BEGIN
                DECLARE @execution_id bigint
                DECLARE @sqlString              nvarchar(1024)
                DECLARE @sqlString_cert         nvarchar(1024)
                DECLARE @key_name               [internal].[adt_name]
                DECLARE @certificate_name       [internal].[adt_name]

            WHILE (@rows_affected = @delete_batch_size)
            BEGIN
                DELETE TOP (@delete_batch_size)
                    FROM [internal].[operations] 
                        OUTPUT DELETED.operation_id, DELETED.operation_type INTO #deleted_ops
                    WHERE ( [end_time] <= @temp_date
                    OR ([end_time] IS NULL AND [status] = 1 AND [created_time] <= @temp_date ))
                SET @rows_affected = @@ROWCOUNT
            OPEN execution_cursor
            FETCH NEXT FROM execution_cursor INTO @execution_id
            WHILE @@FETCH_STATUS = 0
            BEGIN
                SET @key_name = 'MS_Enckey_Exec_'+CONVERT(varchar,@execution_id)
                SET @certificate_name = 'MS_Cert_Exec_'+CONVERT(varchar,@execution_id)
                SET @sqlString_operation_messages_scaleout = 'delete from [internal].[operation_messages_scaleout] where operation_id = '+CONVERT(varchar,@execution_id)
                SET @sqlString_event_messages_scaleout = 'delete from [internal].[event_messages_scaleout] where operation_id = '+CONVERT(varchar,@execution_id)
                SET @sqlString_event_message_context_scaleout  = 'delete from [internal].[event_message_context_scaleout] where operation_id = '+CONVERT(varchar,@execution_id)
                        SET @sqlString = 'DROP SYMMETRIC KEY '+ @key_name
                        SET @sqlString_cert = 'DROP CERTIFICATE '+ @certificate_name
                        BEGIN TRY
                    EXECUTE sp_executesql @sqlString
                            EXECUTE sp_executesql @sqlString_cert
                            EXECUTE sp_executesql @sqlString_operation_messages_scaleout
                            EXECUTE sp_executesql @sqlString_event_messages_scaleout
                            EXECUTE sp_executesql @sqlString_event_message_context_scaleout
                        END TRY

                        BEGIN CATCH
                            
                        END CATCH

                FETCH NEXT FROM execution_cursor INTO @execution_id
            END
            CLOSE execution_cursor
                    TRUNCATE TABLE #deleted_ops
                END
                DROP TABLE #deleted_ops

            DEALLOCATE execution_cursor
            END
            ELSE BEGIN
                WHILE (@rows_affected = @delete_batch_size)
                BEGIN
                    DELETE TOP (@delete_batch_size)
                        FROM [internal].[operations] 
                         OUTPUT DELETED.operation_id, DELETED.operation_type INTO #deleted_ops
                        WHERE ( [end_time] <= @temp_date
                        OR ([end_time] IS NULL AND [status] = 1 AND [created_time] <= @temp_date ))
                    SET @rows_affected = @@ROWCOUNT

                      OPEN execution_cursor
            FETCH NEXT FROM execution_cursor INTO @execution_id
             WHILE @@FETCH_STATUS = 0
            BEGIN
                SET @sqlString_operation_messages_scaleout = 'delete from [internal].[operation_messages_scaleout] where operation_id = '+CONVERT(varchar,@execution_id)
                SET @sqlString_event_messages_scaleout = 'delete from [internal].[event_messages_scaleout] where operation_id = '+CONVERT(varchar,@execution_id)
                SET @sqlString_event_message_context_scaleout  = 'delete from [internal].[event_message_context_scaleout] where operation_id = '+CONVERT(varchar,@execution_id)
                BEGIN TRY
                    EXECUTE sp_executesql @sqlString_operation_messages_scaleout
                    EXECUTE sp_executesql @sqlString_event_messages_scaleout
                    EXECUTE sp_executesql @sqlString_event_message_context_scaleout
                END TRY
                BEGIN CATCH 
                END CATCH
                FETCH NEXT FROM execution_cursor INTO @execution_id
            END
            CLOSE execution_cursor
                    TRUNCATE TABLE #deleted_ops
            DEALLOCATE execution_cursor
               END
                DROP TABLE #deleted_ops
            END
            UPDATE [internal].[operations]
                SET [status] = 7,
                [end_time] = SYSDATETIMEOFFSET()
                WHERE [operation_id] = @operation_id                                  
        END
    END TRY
    BEGIN CATCH
        IF @server_operation_encryption_level = 1
        BEGIN
        IF (CURSOR_STATUS('local', 'execution_cursor') = 1 
            OR CURSOR_STATUS('local', 'execution_cursor') = 0)
        BEGIN
            CLOSE execution_cursor
            DEALLOCATE execution_cursor            
        END
        END
        UPDATE [internal].[operations]
            SET [status] = 4,
            [end_time] = SYSDATETIMEOFFSET()
            WHERE [operation_id] = @operation_id;       
        THROW
    END CATCH
    RETURN 0

GO

Execute Package in Azure error

$
0
0

Hi

I installed the new SSDT and wanted to try the new Execute in Azure functions.  Previously i created packages which are already running in Azure, so i figured i just use those to test the new functionality.

However, i keep getting the following error:

Object reference not set to an instance of an object. (Microsoft.DataTransformationServices.VsIntegration)

Anyone know how to fix this? I tried creating a simple package (just a simple move between two tables) and that worked. 

I tried both VS2017 and VS2019. I have rebuild the solution and also changed the target version to 2017 as explained here: 

https://techcommunity.microsoft.com/t5/SQL-Server-Integration-Services/Run-SSIS-Package-in-Azure-via-SSDT/ba-p/796527

Kind regards,

Dennis


SSIS PROJECT DEPLOYMENT FRM STEP 1 to schedule

$
0
0

Hello,

I am new to SSIS, learnt SSIS through online tutorials for each and every menus, But I need help on how to make it as a scheduled project, example maintain all package name in one sql table and maintain running log for each package in sql table, what is the concept of deployment. I am not sure in these areas. Can you please suggest me a link for these works.

Thanks..

The data type could not be assigned to the column "Geography" in "SQL Server Native Client 11.0".

$
0
0

I'm trying to move some tables from a local network database (13.0.4001.0) to an Azure database (12.0.2000.8) using SQL Server 2017 Import and Export Data (64-bit).

I'm using the "SQL Server Native Client 11.0" provider for both the source and destination.

I'm running the app as Administrator.

The tables in question both have a column called Geography, and which have a data type of geography.

(The data in both columns has an SRID of 4326, but I don't think that's relevant.)

I get to the "Select Source Tables and Views" step, and when hitting next I get the error:

Column information for the source and the destination data could not be retrieved, or the data types of source columns were not mapped correctly to those available on the destination provider.

[dbo].[YYYY] -> [dbo].[YYYY]:
	      - The data type could not be assigned to the column "Geography" in "SQL Server Native Client 11.0".

[dbo].[XXXX] -> [dbo].[XXXX]:
	      - The data type could not be assigned to the column "Geography" in "SQL Server Native Client 11.0".

If I click "Edit Mappings" and scroll down to the column it has a Type of "<unknown type>".

If I click in the mapping table Type column then the list of types doesn't include Geography or Geometry.

After clicking on the row in the mapping table at the bottom it says "Source column: Geography geography". 

That indicates to me that it can read the type in okay, but it doesn't know about/support the spatial types.

I did find this SO post which suggests that the mapping files are missing the section about the geography type.

But having a look at various files in various folders it seemed that the geography (and geometry) types are defined there.

DTS_E_PRIMEOUTPUTFAILED

$
0
0

I am loading data from Maria DB to Db2.

I have used Ado .net source transformation and MY SQL driver to connect to source.Its simple select statment. I can preview data correctly. 

The source column in maria DB is  defined text and target column defined in db2 is CLOB.

in SSIS is source column as DT_NTEXT and same for target.

The package runs and loads few rows but fails after few mins with below error.


[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on ADO NET Source returned error code 0xC02090F5.  The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.

I tried 2 things but it is not helping:

I added error out when reading the source and redirect failure to flat file.

uninstall and re install my sql 8.0 driver.

Can you any suggest what could be issue ?

Importing Multiple Excel Files With Changing File and Sheet Names

$
0
0

Using SSIS VS 2017 to import data from Excel to SQL.  I have set up a For Each Loop container with a user variable that will import multiple Excel files where the file names are changing.  I can get this far in the process and it works but the next hurdle is that each excel file has a changing sheet name. 

Example:  'Sheet1.xls'  tab name 'Sheet1'

                'Sheet2.xls' tab name 'Sheet2'

The For Each Loop container will execute and process Sheet1.xls but error on Sheet2.xls because the sheet or tab name in Sheet2.xls is different from Sheet1.xls.  

Can anyone walk through getting it to work such that SSIS recognizes the change in the sheet name and continues the loop.

Any questions or additional details let me know and thank you in advance

WEB SERVICE IN SSIS

$
0
0
I have a web service that I need to get data from. This web service returns a json format data. I have tried using the web service task but I discovered it works only with web service that returns an XML file, which in my case doesn't. I need a recommendation of the task I an use to get my work done. Preferably an open source task. Thanks

WEB SERVICE TASK

$
0
0

Hi everyone,

I am working with a SOAP API. I was able to connect with it successfully. In the input, i selected the service that I want and the method of choice. The method requires a parameter but the API developer said it doesn't require one, so I should just use an empty string by typing in a space, which I did. 

Anytime I run the package it brought the error

"

[Web Service Task] Error: An error occurred with the following error message: "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: The Web Service threw an error during method execution. The error is: The request failed with the error message:
--
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://fetspay.fetswallet.com/IBEDCDW/DWService">here</a>.</p>
<hr>
<address>Apache/2.4.29 (Ubuntu) Server at fetspay.fetswallet.com Port 80</address>
</body></html>

--..
   at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebMethodInvokerProxy.InvokeMethod(DTSWebMethodInfo methodInfo, String serviceName, Object connection)
   at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTaskUtil.Invoke(DTSWebMethodInfo methodInfo, String serviceName, Object connection, VariableDispenser taskVariableDispenser)
   at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()".

"

I can't understand the error. Kindly help look into it. Thanks


Ibrahim

Visual Studio 2017 SSIS Package - Excel Source Generating Error at Data Flow Task 1 - No column information returned by SQL command

$
0
0

I'm using an SSIS package (MS Visual Studio 2017) to import an Excel spreadsheet (97-2003 Workbook) into a table (SQL Server Management Studio 2017). The import needs to skip over the first four rows because the column headings start on row 4. Here is an example:

I use a SQL script to skip the first four rows in the spreadsheet: 

SELECT F1,F2,F3,F4,F5,DATE() AS InsertDate
FROM [Jobs$]
WHERE 
F5 IS NOT NULL 
AND F5 <> "Service Address"
This code works in the SQL Server Import and Export Wizard but when I try to use it to create an Excel Source in a Visual Studio SSIS package, I get the following error message: 


Is there a fix for this?


OLEDB source error???

$
0
0

Why am I getting this error?  

Spreadsheet Full Error

$
0
0

Hello All,

I am new to SSIS. I am getting spreadsheet full error when I run a package. In one of the posts I saw that if we use flat file component and import excel this error is handled. However I am not able to accomplish that. Is there a way to import excel from flat file component? or any other solution to this error. Responses are appreciated!

Thanks!

How to troubleshoot failing job using SQL Server Integration Services Package?

$
0
0

I have setup a full backup with SQL SQL Server Integration Services Package type and run as SQL Server Agent Service Account. Log on to the server using Windows Authentication. I kept getting this error when failed.

Execution of job 'ti-schedule - MaintenancePlan.Full Backup (Daily - Noon)' failed.  See the history log for details.

Looking at the View History log I see this:

Date,Source,Severity,Step ID,Server,Job Name,Step Name,Notifications,Message,Duration,Sql Severity,Sql Message ID,Operator Emailed,Operator Net sent,Operator Paged,Retries Attempted
08/14/2019 06:42:27,ti_schedule - MaintenancePlan.Full Backup (Daily - Noon),Error,,MSDB\ti,ti_schedule - MaintenancePlan.Full Backup (Daily - Noon),,,The job failed.  The Job was invoked by User myDomain\myUser.  The last step to run was step 1 (Full Backup (Daily - Noon)).,00:00:03,0,0,My-Comp Web Team,,,0

08/14/2019 06:42:27,ti_schedule - MaintenancePlan.Full Backup (Daily - Noon),Error,1,MSDB\ti,ti_schedule - MaintenancePlan.Full Backup (Daily - Noon),Full Backup (Daily - Noon),,Executed as user: myDomain\MSDB$. Microsoft (R) SQL Server Execute Package Utility  Version 14.0.3223.3 for 64-bit  Copyright (C) 2017 Microsoft. All rights reserved.    Started:  6:42:27 AM  Error: 2019-08-14 06:42:28.45     Code: 0xC002F210     Source: {36B626B3-A88D-4AF3-8B63-14B1D89E24FE} Execute SQL Task     Description: Executing the query "DECLARE @Guid UNIQUEIDENTIFIER      EXECUTE msdb..sp..." failed with the following error: "The INSERT statement conflicted with the FOREIGN KEY constraint "FK_sysmaintplan_log_subplan_id". The conflict occurred in database "msdb"<c/> table "dbo.sysmaintplan_subplans"<c/> column 'subplan_id'.  The statement has been terminated.". Possible failure reasons: Problems with the query<c/> "ResultSet" property not set correctly<c/> parameters not set correctly<c/> or connection not established correctly.  End Error  Warning: 2019-08-14 06:42:28.45     Code: 0x80019002     Source: OnPreExecute     Description: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED.  The Execution method succeeded<c/> but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.  End Warning  Error: 2019-08-14 06:42:28.55     Code: 0xC0024104     Source: {F0D2A16A-319D-4C6E-9AEC-21270919782F}     Description: The Execute method on the task returned error code 0x80131501 (An exception occurred while executing a Transact-SQL statement or batch.). The Execute method must succeed<c/> and indicate the result using an "out" parameter.  End Error  Warning: 2019-08-14 06:42:28.55     Code: 0x80019002     Source: OnPostExecute      Description: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED.  The Execution method succeeded<c/> but the number of errors raised (2) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.  End Warning  Warning: 2019-08-14 06:42:28.55     Code: 0x80019002     Source: ti_schedule - MaintenancePlan      Description: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED.  The Execution method succeeded<c/> but the number of errors raised (3) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.  End Warning  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  6:42:27 AM  Finished: 6:42:28 AM  Elapsed:  0.766 seconds.  The package execution failed.  The step failed.,00:00:03,0,0,,,,0

08/13/2019 11:40:00,ti_schedule - MaintenancePlan.Full Backup (Daily - Noon),Error,,MSDB\ti,ti_schedule - MaintenancePlan.Full Backup (Daily - Noon),,,The job failed.  The Job was invoked by Schedule 12 (ti_schedule - MaintenancePlan.Full Backup (Daily - Noon)).  The last step to run was step 1 (Full Backup (Daily - Noon)).,00:00:01,0,0,My-Comp Web Team,,,0
08/13/2019 11:40:00,ti_schedule - MaintenancePlan.Full Backup (Daily - Noon),Error,1,MSDB\ti,ti_schedule - MaintenancePlan.Full Backup (Daily - Noon),Full Backup (Daily - Noon),,Executed as user: myDomain\MSDB$. Microsoft (R) SQL Server Execute Package Utility  Version 14.0.3223.3 for 64-bit  Copyright (C) 2017 Microsoft. All rights reserved.    Started:  11:40:00 AM  Error: 2019-08-13 11:40:00.96     Code: 0xC002F210     Source: {36B626B3-A88D-4AF3-8B63-14B1D89E24FE} Execute SQL Task     Description: Executing the query "DECLARE @Guid UNIQUEIDENTIFIER      EXECUTE msdb..sp..." failed with the following error: "The INSERT statement conflicted with the FOREIGN KEY constraint "FK_sysmaintplan_log_subplan_id". The conflict occurred in database "msdb"<c/> table "dbo.sysmaintplan_subplans"<c/> column 'subplan_id'.  The statement has been terminated.". Possible failure reasons: Problems with the query<c/> "ResultSet" property not set correctly<c/> parameters not set correctly<c/> or connection not established correctly.  End Error  Warning: 2019-08-13 11:40:00.96     Code: 0x80019002     Source: OnPreExecute     Description: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED.  The Execution method succeeded<c/> but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.  End Warning  Error: 2019-08-13 11:40:01.06     Code: 0xC0024104     Source: {F0D2A16A-319D-4C6E-9AEC-21270919782F}     Description: The Execute method on the task returned error code 0x80131501 (An exception occurred while executing a Transact-SQL statement or batch.). The Execute method must succeed<c/> and indicate the result using an "out" parameter.  End Error  Warning: 2019-08-13 11:40:01.06     Code: 0x80019002     Source: OnPostExecute      Description: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED.  The Execution method succeeded<c/> but the number of errors raised (2) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.  End Warning  Warning: 2019-08-13 11:40:01.06     Code: 0x80019002     Source: ti_schedule - MaintenancePlan      Description: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED.  The Execution method succeeded<c/> but the number of errors raised (3) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.  End Warning  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  11:40:00 AM  Finished: 11:40:01 AM  Elapsed:  0.828 seconds.  The package execution failed.  The step failed.,00:00:01,0,0,,,,0

how to load specific column with multiple files in ssis

$
0
0

Hi I have one doubt in ssis 

how to load only id and name columns with multipul files  into sql server using ssis package.

here each files different structure but required columns are available in all files
and columns order are different between each files.

Source Files Folder is : D:\SourceFolder
Files are like below :
File1 Name : Emp_20190102
Emp_20190102 File data :
id,sal,deptno,name
1,100,10,h

File2 Name : Emp_20190102_1
Emp_20190102_1 File data :
id,name,sal
11,ac,101

File3 Name : Emp_20190102_2
Emp_20190102_2 FIle Data 
id,sal,name,deptno,loc
3,200,y,30,che
File4 Name : Emp20190102
Emp20190102 FIle Data:
id,sal,deptno,dname,flag,name
10,400,40,hr,1,un

Here I want load only id and name column information in the sql server table 
and sql table structure :

CREATE TABLE [dbo].[Emp](
[id] [int] NULL,
[name] [varchar](50) NULL
)

based on above 4 files I want load data in emp table 
id |Name
1  |h
11 |ac
3  |y
10 |un


I tried like below 

tep1 : created 2 variable for foldername and filename
filelocation : D:\SourceFolder
FileName     : Emp_20190102_1.txt

then drag and drop foreachloop container and select typeofenumerator : foreach fileenumerator
and  vaiable mapping : filename varibale
and inside drag and drop flat file source and configure source file 
after that crated dynamic connection for flatfile connection
then drag and drop oledb destination and congigure it

after execute the package resutl getting incorrect

here we should use only one dataflow task to load all files 

can you please tell me how to implete package to achive this task in ssis 


Searching error in Script Component SSIS

$
0
0

Hi,

I'm using a script Component to generate a new column in my table. I want to check if the "contactID" is in the "contact" table and generate a "statut" column that is boolean. The problem is the "statut" column is always FALSE. I think it's because the execution of the query is not working in the ProcessInputRow() method, i tried to execute it in the PreExecute() method withe a default parameter "contactID=3" and it's working fine. My problem is i don't know how debug a script component, I can't even use MessageBox in the ProcessInputRow() only in the PreExecute(). I need help please. Thanks

#My Code

public override void PreExecute()
{
        base.PreExecute();
       cmd = new System.Data.SqlClient.SqlCommand("SELECT ContactID FROM  Contact as ot WHERE ContactID =@mi", cn);
param = new System.Data.SqlClient.SqlParameter("@mi", SqlDbType.Int);
cmd.Parameters.Add(param);
}

public override void AcquireConnections(object Transaction)
{
base.AcquireConnections(Transaction);
cnManager = base.Connections.ConnexionADO;
cn = (SqlConnection)cnManager.AcquireConnection(null);
}

public override void Entrée0_ProcessInputRow(Entrée0Buffer Row)
    {
System.Data.SqlClient.SqlDataReader dtr;
cmd.Parameters["@mi"].Value = Row.ContactID;
dtr = cmd.ExecuteReader();


if (dtr.Read())
{
Row.statut = true;
}
else
{
Row.statut= false;
}


dtr.Close();
}

Viewing all 24688 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>