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

How to expect error msg when SSIS fails

$
0
0

I m new to SSIS 2012. I m using below method in SQL agent job step to run an SSIS pkg, but the same do not return error/failure when SSIS pkg errors and stops.  Basically, I want job step to fail and throw proper error msg of SSIS error.

Declare @execution_id bigint
EXEC [SSISDB].[catalog].[create_execution] @package_name=N'EmailPaystoreETL.dtsx', @execution_id=@execution_id OUTPUT, @folder_name=N'PayrollReportETL', @project_name=N'PayrollETL', @use32bitruntime=False, @reference_id=Null
Select @execution_id
EXEC [SSISDB].[catalog].[set_execution_parameter_value] @execution_id,  @object_type=50, @parameter_name=N'SYNCHRONIZED',  @parameter_value=1; -- true
EXEC [SSISDB].[catalog].[start_execution] @execution_id
GO

 Thanks


Mahesh



Rendering SSRS report in email body with indicators/images

$
0
0

I am running SSRS report using script component in SSIS using C#.net and sending the report as HTML email. In the email body, only text are displayed and indicators are displayed as a red cross mark inside small box.

Inside script component I have used mimeType ="mhtml/text";

Is there any method to display indicators in email body then help me with the details.

Thanks.

Data viewer not visible - SSIS 2017

$
0
0

Hi,

I'm creating a simple SSIS 2017 solution that reads from a SQL Server table to write on another SQL Server table. I'm using SQL Server 2017 and SSDT for Visual Studio 2017 vers. 15.8.6.

When I enable a data viewer for the data flow task to accomplish the above activity and run the task I cannot see any data viewers.

Any suggests to me to solve this issue? Thanks

SQL 2012 - Connection Manager not listed in Source Assistant

$
0
0

Hi,

Using SQL Srv 2012 - Started a new project, created an ADO.Net connection manager, created a Data Flow task,  in the Data Flow tab created a Source Assistant, when prompted to choose a Connect Manager my existing Connection Manager is not listed.  Why not? 

thanks!

Martin

Upgraded Visual Studio 2015 Community to Visual Studio 2017 Pro, Can’t Open Existing SSIS Packages

$
0
0

Hello, I am on Windows Server 2012 R2 SE, and SQL Server 2016 SP1, and I have developed several packages with Visual Studio 2015 Community, SSDT 14, using Attunity 4 and Teradata 15.1 Drivers and utilities.

Now I have upgraded the Teradata Drivers and Utilities to 16.2, kept Attunity 4, and installed Visual Studio 2017 Pro, with SSDT 15.

One note: I had all the tools and drivers on the C:\ of the server, and after all the uninstall to save space on C:\ as it was limited, I installed VS17 on D:\. Teradata and Attunity are installed on C:\.

Now any existing package I open, any package I create new, and import an existing package within the tool, as well create new by export out of production, I get a series of errors about the Connection Manager and Attunity/Teradata, etc which I expect, HOWEVER, I can’t open or display the contents/design of a package.

The first main error I get, and the following errors are:

“Microsoft Visual Studio is unable to load this document: Object reference not set to an instance of an object.”

Then followed by 15 errors all complaining about a missing component of Attunity and Teradata, etc…

I was able to try and create a Connection Manager, however MSTERA is not in the list, as it once was with VS15.

Please let me know what other additional details I can share to help resolve.

Thank you

[Package Configuration Wizard][SQL Server Connection Issue]

$
0
0

Hi,

In my SSIS package used XML file for my OLEDB connection and loaded the configurations with Package Configuration Wizard which works fine, the problem raises when likes to use this connection for further configurations from this database connection as it is not available in the connections drop down when SQL Sever selecting from Configuration Type.

Please share your thoughts if anyone face the similar problems.

Many Thanks,

Muhammad Yasir



EBCDIC file is getting loaded with all special characters in my table

$
0
0

Hi,

I have an EBCDIC file and I am trying to load it using SSIS.

I created a flat file connection manager, changed the Code page to 1140 (IBM EBCDIC - U.S/Canada (37 + Euro))

When I load the data all my data is loading with special characters. Any help on this, please?

FYI... Pics loaded below for reference:

FYI... I can provide the file if needed since it is a public file and no private data is there in it.

Some data looks good in the Preview mode but when I drag little far it looks weird again.



Equivalent of OBJECT_NAME() (works in SQL) in Oracle

$
0
0
I have been working on an Oracle stored procedure and I need to add the equivalent of OBJECT_NAME() (which works in SQL)  in Oracle. Is there any dynamic way to do this?

Call SSRS report from SSIS with different data sources

$
0
0

I have an SSIS solution that calls via a VB.NET Script Task a PDF SSRS Report, passes parameters and takes the data from report and stores it as a PDF. Is it possible to call the SSRS report and change the default Datasource? What I want is to use the SSIS Project parameters so if Dev env. is specified, the SSRS report is called and assigned the Dev. Database, if SSIS Project Parameters are set to Production, then SSRS is called with the Prod. Database.

SSIS can already do this for it's own Datasources, this is the 1st time I attempt to do this for SSRS via SSIS.


Adrian Hernandez

Joining a mapping table to a file connection without involving a database

$
0
0

Hi,

I have a flat file connection in my DFT and I would like to join a mapping table to it, with static values. What i the best way to do this?

Example;
from the flat file; 
C1   C2   C3
X     Y     Z
A     B     C

Mapping table;
C1   C4   C5
X      Q    E
A      K    L

And the output, clearly;

C1   C2   C3   C4   C5
X     Y     Z     Q     E
A     B     C     K     L

How do I create the mapping table without involving the database tempdb?

MS server connect to MySQL (ODBC)

$
0
0

I just installed SQL Server 2008 R2.  I added mysql-connector-odbc-5.1.6-win32.msi to connect to MySQLl database. It is not working properly . Please help – what driver can be used?

- (VStudio 2008) when  try to add/remove tables for DATA Source Views , I am getting an error

ERROR [42000] [MySQL][ODBC 5.1 Driver][mysqld-5.1.32-community-log]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[ fchclient]' at line 2 (myodbc5.dll)


 -  (VStudio 2008) when try to add ADO.NET with data access mode: table or view, I  am getting an error :

TITLE: Microsoft Visual Studio
------------------------------

Error at Data Flow Task [ADO NET Source [1]]: The component "ADO NET Source" (1) was unable to retrieve column information for the SQL command. The following error occurred: ERROR [42000] [MySQL][ODBC 5.1 Driver][mysqld-5.1.32-community-log]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"art"' at line 1

 

------------------------------
ADDITIONAL INFORMATION:

Pipeline component has returned HRESULT error code 0xC02020FF from a method call. (Microsoft.SqlServer.DTSPipelineWrap)

------------------------------
BUTTONS:

OK
------------------------------

 -  (VStudio 2008) when try to add ADO.NET with data access mode: SQL command - is working.

 

SSIS Package - Excel data source - SQL command - retrieve single cell value then include in Select statement for table on same sheet

$
0
0

Hi all

I have Excel files to process, all in consistent format. Each file has 12 sheets. Each sheet has 'Header' info on rows 1 to 13 then a table of data below (around 160 rows, columns A14:M173)

I'm writing a SSIS package to put all data in the 'tables' from each of the 12 sheets of into a staging table. This I can do using an Excel Data Source >> SQL Command...

SELECT * FROM [Table 1a$A14:M500] WHERE [Region Code] LIKE 'Y%'

UNION

SELECT * FROM [Table 1b$A14:M500] WHERE [Region Code] LIKE 'Y%'   ....etc.

What I need to do is for each Excel table, to retrieve single values from two of the header cells and include them in each row returned in the SELECT statements show above. The cells are 'Period' (C5) and 'Status' (C10) - happy to read as varchars

...so that each row would read in the resulting output as:

Period, Status, [Region Code], [Col2], [Col3] etc.

I've played around with declaring variables but am struggling to incorporate into my SQL statements as the have a Where clause.

I know it'll be something simple but obviously not as simple as me. 

Thanks 

SSIS 2017 - Programmatically create script component as transformation

$
0
0

I am trying to create a script component as transform programmatically (not manually going inside script component) but i am unable to update main.cs file, i am getting below error.

Am i missing something, Any help would be appreciated.

FYI if i set second parameter in CreateNewProject to true i.e. "host.CreateNewProject(Guid.NewGuid().ToString("N"), true, true)", i am able to generate script component correctly but my changes done using PutSourceCode is not working.

Code:

IDTSComponentMetaData100 _ScriptComponent = pipeline.ComponentMetaDataCollection.New();
                _ScriptComponent.ComponentClassID = typeof(Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost).AssemblyQualifiedName;

                // Get the design time instance of the derived column
                var DesignScriptComponent = _ScriptComponent.Instantiate();
                DesignScriptComponent.ProvideComponentProperties();        //design time

                //VSTAScriptingEngine
                // Create a Precedence Constraint between derived column and OLEDB Destination Components
                var path = pipeline.PathCollection.New();
                path.AttachPathAndPropagateNotifications(pipeline.ComponentMetaDataCollection[Prev_Transform.Transformation_Name].OutputCollection[Prev_Transform.Output_Number],
                        _ScriptComponent.InputCollection[0]);

                // Get the list of available columns
                var ScriptComponentInput = _ScriptComponent.InputCollection[0];
                var ScriptComponentvInput = ScriptComponentInput.GetVirtualInput();
                var ScriptComponentVirtualInputColumns = ScriptComponentvInput.VirtualInputColumnCollection;

                string scriptValue = @"using System;
                                        using System.Data;
                                        using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
                                        using Microsoft.SqlServer.Dts.Runtime.Wrapper;
                                        [Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute]
                                        public class ScriptMain : UserComponent
                                        {
                                          public override void PreExecute()
                                            {
                                                base.PreExecute();
                                            }
                                         public override void PostExecute()
                                            {
                                                base.PostExecute();
                                            }
                                         public override void Input0_ProcessInputRow(Input0Buffer Row)
                                            {
                                                //sam generated this
                                            }
                                        }";
                //
                //DesignScriptComponent.SetComponentProperty("ScriptLanguage","Microsoft Visual C# 2017" );
                //DesignScriptComponent.SetComponentProperty("VSTAProjectName","CustomTransform1.csproj");

                ScriptComponentHost host = (DesignScriptComponent as IDTSManagedComponent100).InnerObject as ScriptComponentHost;
                host.CreateNewProject(Guid.NewGuid().ToString("N"), false, true);
                host.PutSourceCode("main.cs", "UTF8", scriptValue);
                host.SaveScriptProject();
                //string[] sourcecode_array= _ScriptComponent.CustomPropertyCollection["SourceCode"].Value;
                //// when counted manually array 9 had main.cs
                //sourcecode_array[9] = scriptValue;
                //DesignScriptComponent.SetComponentProperty("SourceCode", sourcecode_array);


Error

Validation error. Data Flow Task: Data Flow Task: Microsoft.SqlServer.Dts.Pipeline.CannotCreateUserComponentException: Cannot create user component class. Make sure there is one class marked with SSISScriptComponentEntryPointAttribute in your script.
   at Microsoft.SqlServer.Dts.Pipeline.VSTAComponentScriptingEngine.CreateScriptObjectHelper(Assembly scriptAssembly)
   at Microsoft.SqlServer.Dts.Pipeline.VSTAComponentScriptingEngine.GetScriptEntryPoint(String versionGuid)
   at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.CreateUserScriptInstance()


Sam

Deploying SSIS Package to Linux Server and Correct Folder Path Syntax- The file name "/home/..." specified in the connection was not valid

$
0
0

Hello

I have set up an SSIS package on Windows to download a CSV file from an FTP run some transforms and download images from a list of URLs which works fine.

I then want to deploy this onto an Ubuntu server running SQL Server 2017 with SSIS installed.

As the SSISDB Catalog is not supported on Linux it seems the only way to run this is as a cron job as per the instructions here:

https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-schedule-ssis-packages?view=sql-server-2017

However as I must develop the package on Windows I cannot enter Linux compatible paths as this raises an error and I cannot save the connection in Visual Studio. As a workaround I open the .dtsx package with VS Code and edit the paths in the XML to /home/...

I then execute the package using:

/opt/ssis/bin/dtexec /Decrypt PASSWORD /F /home/WEBSITE/stocklist/RefreshAutoTraderStocklist.dtsx

But whatever I do this always fails and says the paths are not valid. I have tried running as SU and also chmodding the files and folders being accessed to 777 yet it makes no difference. I cannot find any documentation on this specifically relating to Linux so am not sure how I can get this working.

Errors are:

Error: 2018-10-20 14:00:24.28
   Code: 0xC001401E
   Source: RefreshAutoTraderStocklist Connection manager "FILE.csv"
   Description: The file name "/home/WEBSITE/stocklist/FILE.csv" specified in the connection was not valid.
End Error
Error: 2018-10-20 14:00:24.29
   Code: 0xC001401D
   Source: RefreshAutoTraderStocklist
   Description: Connection "FILE.csv" failed validation.
End Error
Error: 2018-10-20 14:00:24.29
   Code: 0xC001401E
   Source: RefreshAutoTraderStocklist Connection manager "FILE.csv (from FTP)"
   Description: The file name "/home/WEBSITE/stocklist/" specified in the connection was not valid.
End Error
Error: 2018-10-20 14:00:24.29
   Code: 0xC001401D
   Source: RefreshAutoTraderStocklist
   Description: Connection "FILE.csv (from FTP)" failed validation.
End Error
Progress: 2018-10-20 14:00:24.40
   Source: Save Data to Database
   Validating: 0% complete
End Progress
Error: 2018-10-20 14:00:24.40
   Code: 0xC001401E
   Source: RefreshAutoTraderStocklist Connection manager "FILE.csv"
   Description: The file name "/home/WEBSITE/stocklist/FILE.csv" specified in the connection was not valid.
End Error
Error: 2018-10-20 14:00:24.40
   Code: 0xC0202070
   Source: RefreshAutoTraderStocklist Connection manager "FILE.csv"
   Description: The file name property is not valid. The file name is a device or contains invalid characters.
End Error

The files and folders do exist in the locations mentioned but all I can guess is that when the SSIS package is trying to validate itself it is seeing these paths as invalid as they would not be valid on Windows but I am not sure how I can bypass this.

Thanks

Robin


Robin Wilson

ارقام تليفون اصلاح ثلاجات كريازي & 01014723434 && 0235695244 &الدقهلية


SSIS - Remove left zero using CSV Flat source file

$
0
0
Hello,
I have a csv file that I want to process in SSIS, The file contains a column type string Unicode string [DT_WSTR] example: ColumnA -> ("000001234").

I want to delete the zero that are on the left of 1234 and also delete the quotes and have a result following 1234.

for quotation marks I find the following solution via Derived Column: REPLACE (ColumnA, "\" "," ") which gives me the following result: 000001234.

How to remove the zero which is on the left?

after deleting the quotation marks, I tried to convert my string to integer [DT_I4], but that does not remove the zero.

Do you have the answer to my case?thanks in advance.

SSIS package migrated from 2008 to 2016 failed execution through SQLCMD utility but working fine in vs 2017 SSDT on same server

$
0
0

Hi All,

I have successfully migrated SSIS packages from 2008 to 2016 through VS 2017 SSDT wizard and is running fine while executing through VS 2017 SSDT. 

But gives error when executed through SQLCMD utility through script in the bat file on the same server
Below is the error.

-----------------SQLCMD LINE --------------------------------------------------------------------------------------

sqlcmd -S E75DBST\Cust_ST -d CUST_sys -E -h-1 -i \\E75ABC07\SSIS\Jobb\Bat\StartaPaket.txt -v BATCHSHARE=E75ABC07\SSIS -v DBINSTANS=E75DBST\Cust_ST -v PAKETNAMN=dtsx_IMP_BANK_01.dtsx -v DTEXECVERSION=64 -v VALFRI1=NOVALUE -v VALFRI2=NOVALUE -v VALFRI3=NOVALUE -v VALFRI4=NOVALUE -v VALFRI5=NOVALUE -b

-------------------------------ERROR MESSAGE---------------------------------------------------------------------

Microsoft (R) SQL Server Execute Package Utility
Version 10.50.1600.1 for 32-bit
Copyright (C) Microsoft Corporation 2010. All rights reserved.

Started:  20:21:18
Error: 2018-10-21 20:21:18.67
   Code: 0xC001700A
   Source:  
   Description: The version number in the package is not valid. The version number cannot be greater than current version number.
End Error
Error: 2018-10-21 20:21:18.67
   Code: 0xC0016020
   Source:  
   Description: Package migration from version 8 to version 3 failed with error 0xC001700A "The version number in the package is not valid. The version number cannot be greater than current version number.".
End Error
Error: 2018-10-21 20:21:18.67
   Code: 0xC0010018
   Source:  
   Description: Error loading value "<DTS:Property xmlns:DTS="www.microsoft.com/SqlServer/Dts" DTS:Name="PackageFormatVersion">8</DTS:Property>" from node "DTS:Property".
End Error
Could not load package "\\E75ABC07\SSIS\Jobb\Paket\Import\dtsx_IMP_BANK_01.dtsx" because of error 0xC0010014.
Description: The package failed to load due to error 0xC0010014 "One or more error occurred. There should be more specific errors preceding this one that explains the details of the errors. This message is used as a return value from functions that encounter errors.". This occurs when CPackage::LoadFromXML fails.
Source: 
Started:  20:21:18
Finished: 20:21:18
Elapsed:  0.125 seconds


Package to Project Deployment in 2017 conversion issue

$
0
0

Hi all,

My name is srinvas. I am new to this Conversion the packages. I have one scenario. 

My client given 9 packages ( which are in package deployment mode) and they want me to convert in project deployment in 2017. But these packages have Configurations ( XML, Sql server) Added in each package. I  am followed project conversion wizarard on right click on project and select project conversion. 

1. After completing conversion to project deploymnet and see configuration they are not added. Do we need to add manually these configuration on each package after convertion to project deployment ? I am able to see Project Parameters added.

2. XML Configuration file is mapped to server location. i have unchecked this while conversion else it is showing error. can i get the XML  configuratio file from server and create same folder structure and add manually these configuration ? 

3. Do we need to converst any other manually after converstion to project deployment ? 

Please provide any suggession and references to me . Thanks for the help on advance.

Regards,

Srinivas


SSIS in SQL server Express Edition 2017

$
0
0
Is it possible to use SSIS in SQL server 2017 Express Edition?. Does it comes preinstalled while downloading SQL server 2017 express edition?

SQL Server Timeformat

$
0
0

I have ran the command I got below data. This column is in Hour format:

Select [TimeColumn] from [bad_rows]

Time Column

17:20
14:25

25/10/12
07:05PM
18:00-19:00pm
late morning
09:00am

13:00


 I would like clean bad data from this column including blank columns. As you can see some of the data is in text format such Late morning, date etc which shouldn't be there .. Output format is hh:mm. Could please advise what command I have to use tio filter this bad data.

Viewing all 24688 articles
Browse latest View live


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