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

SSIS first row column count is less than the second row column count

$
0
0

HI

I have a flat file where my first record is having only values in 4 columns( basically it has only four columns) and rest of the records has many columns. So here my requirement is I would like to use this flat file and first record is not a header row and I need it later.

so based on the first row it is assuming the rest of the records are having only four columns how to get all columns in column list and I need first row as well cant skip it


Copy Excel from SharePoint to Local Machine using SSIS

$
0
0

I have an Excel file on SharePoint and I want to copy the excel file to my local Machine using SSIS.

I used OData Source Connection Manager to extract data from SharePoint.
No success.

I'm currently stuck with this issues and don't know how to proceed.

NOTE : I don't want to use third parties components like KingswaySoft (SharePoint) and so on.

Derived column based on SQL Query lookup

$
0
0

Hello Wisers,

I have an setup a "DERIVED Column" which reads data from excel and add additional columns that are required down stream.

One of the column is "LOCATION" where the input data is short codes say e.g "IN", "ENG", "JAP" for INDIA, ENGLAND and JAPAN.

The Output goes to a database column which expects the value to be of format "IN - INDIA", "ENG - ENGLAND" and so on.

I have a look up table which is setup to with the two columns as below,

Code| Value

IN| India

ENG|England

JAP| Japan

Kindly suggest a method that can read the input from excel at run-time to read the short codes and provide the result "Code - Value" if possible in the derived column transform.

Thanks in advance.

RJ


Package deployed is not visible in Catalog

$
0
0

Hi Experts,

I am using SQL Server 2017 and created a SSIS package. When I deploy the package, it deploys without any error, but deployed package is not visible in Catalog.

What could be the reason? any idea?

Thanks,


Naveen J V

could not retrieve the table information for the connection manager 'excel connection manager'

$
0
0

I am trying to Connect to a file as a data source and I have tried everything from changing my connection string, to downloading the 64 bit and the 32 bit drivers , and  setting the run the package as a 64 bit setting to true and false.  NONE of these work.  I am really frustrated.  Can someone please help?

 

Null error SSIS -Conditional Split

$
0
0

[Data Conversion 1.BRANCH_ID] == Branch && [Data Conversion 1.PRICE_GRP_ID] == DiscountGroup && [Data Conversion 1.PRICE_PROD_ID] == ItemNumber && [Data Conversion 1.PRICE_COLUMN] == PriceColumn

recieving error 

OnError

View Context

7/2/2019 12:23:24 PM

DFT Identify Missing Records:Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Conditional Split" (2) failed with error code 0xC0209029 while processing input "Conditional Split 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.

DFT Identify Missing Records

SSIS.Pipeline

\PPE_PriceMatrix\SEQ - Load Delta\DFT Identify Missing Records

OnError

View Context

7/2/2019 12:23:24 PM

DFT Identify Missing Records:Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "Conditional Split" failed because error code 0xC020902B occurred, and the error row disposition on "Conditional Split.Outputs[Is_Match]" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure.

DFT Identify Missing Records

Conditional Split [2]

\PPE_PriceMatrix\SEQ - Load Delta\DFT Identify Missing Records

OnError

View Context

7/2/2019 12:23:23 PM

DFT Identify Missing Records:Error: The expression "[Data Conversion 1.BRANCH_ID] == Branch&& [Data Conversion 1.PRICE_GRP_ID] == DiscountGroup && [Data Conversion 1.PRICE_PROD_ID] == ItemNumber && [Data Conversion 1.PRICE_COLUMN] == PriceColumn" on "Conditional Split.Outputs[Is_Match]" evaluated to NULL, but the "Conditional Split" requires a Boolean results. Modify the error row disposition on the output to treat this result as False (Ignore Failure) or to redirect this row to the error output (Redirect Row). The expression results must be Boolean for a Conditional Split. A NULL expression result is an error.

DFT Identify Missing Records

Conditional Split [2]

\PPE_PriceMatrix\SEQ - Load Delta\DFT Identify Missing Records

ssis package

$
0
0
SUBSTRING([Name ], FINDSTRING([Name ] + "," , "," , 1), LEN([Name] ))

Manny Musciano

Can someone help me find my error in this query please?

Thank you very much for your help

Char Data Type Value Automatic converting to ASCII in SSIS

$
0
0

Hi Experts,

Please help,

I will appreciate your feedback. I am facing a issue in ssis package. I made a ssis variable Var1 with data type CHAR and assigned the value B in this variable but when i assigning this variable to other variable Var2 string type, Then Var2 getting the ACCII value of B that is 66 rather than B. And if i am showing the value of Var1 in Message Box using the script task however it is showing 66 rather than B. And Database table getting blank when inserting the value from Var1 using Execute SQL Task. But i want to insert B as it is with CHAR data type of Var1. I Used this expression : @[User::Var2]= (DT_WSTR,5)(DT_STR, 5,65001) @[User::Var1] 

to assign the value in Var2 . I Tried using code page : 65000, 1252 but getting same issue

          And one more question : How to convert the ACCII value to Character in SSIS.

With Warm Regards,

Raghvendra Rajak


Excel->SSIS: Named tables

$
0
0

Hello community,

I have an Excel file with several worksheets and more than one table per worksheet.

These tables are formatted as tables and named via Formula->Name Manager.

I now want to import some of these tables using the Excel source in SSIS (2016), but I don't see them in the dropdown menu in the Excel Source Editor ('Name of the Excel sheet').

If I do not format a table as 'Table' (select in Excel an press Ctrl+T) and do a selection->rightclick->Define Name, then I can see this table in the SSIS dropdown.

So what's the difference between these named tables?

As soon as I format a selection as table (Strg+T), the entry 'Define Name' vanishes from the right-click-context menu and I have to use the Name Manager in the tab 'Formula'.

Unformatted:

Not formatted as table

Formatted as table:

Formatted as table

An explanation would be, that tables are named automatically in Excel. But why are those named tables not visible in SSIS? It doesn't matter if I leave them at their original names (table1, table2, ...) or give them more descriptive names. They just aren't visible in SSIS.

XML Extract Failure from SSIS

$
0
0

We recently upgraded our SQL Server from 2008 to 2016. After the upgrade, most of the batch jobs that rely on SQL server went thru fine except one major failure. We have a daily extract job that extracts the data from SQL server in the form of XML and this job is failing with the below error message.

Foreach Loop Container,,,7/3/2019 6:17:00 AM,7/3/2019 6:17:00 AM,-1,0x,System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
   at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
   at System.Xml.XmlDocument.Load(XmlReader reader)
   at System.Xml.XmlDocument.LoadXml(String xml)
   at ST_c5c91743715e4a8fb7ffc01b09f1b1f8.vbproj.ScriptMain.CreateXMLOutputExtract(DataSet dsExtract, String strExtractFilePath, String strArchiveFilePath, String strFileName)
   at ST_c5c91743715e4a8fb7ffc01b09f1b1f8.vbproj.ScriptMain.Main()

The method that generates the XML output extract file is below.

Private Sub CreateXMLOutputExtract(ByVal dsExtract As DataSet, _
                                       ByVal strExtractFilePath As String, _
                                       ByVal strArchiveFilePath As String, _
                                       ByVal strFileName As String)

        Dim strRootName = Dts.Variables.Item("strXMLRootElementNm").Value().ToString()
        Dim strXMLFileName = strFileName & "_" & strRootName
        Dim strXMLFile As String = strExtractFilePath & strXMLFileName & ".XML"
        Dim xmlDoc As New XmlDocument
        Dim strVar As String = ""

        Dim dt As DataTable = dsExtract.Tables(0)
        Dim iColCount As Integer = dt.Columns.Count
        For Each dr As DataRow In dt.Rows
            For i = 0 To iColCount - 1

                If Not Convert.IsDBNull(dr(i)) Then
                    strVar = strVar & dr(i).ToString
                End If

            Next
        Next

        'If no results are returned the Root Name from the xMLRoot column in Subscription
        'will be used as the tags.  This change was made to meet a SAM business need.
        If strVar = "" Then
            strVar = "<" & strRootName & "></" & strRootName & ">"
        End If

        xmlDoc.LoadXml(strVar)

        ' Solves problem of empty nodes having CR/LF between start and end tags
        Dim Settings As New XmlWriterSettings()
        Settings.Indent = True
        Settings.OmitXmlDeclaration = True  ' Suppress the xml header <?xml version="1.0" encoding="utf-8"?>
        Settings.Encoding = New System.Text.UTF8Encoding(False) ' Suppress hidden identifier


        Dim Writer As XmlWriter = XmlWriter.Create(strXMLFile, Settings)

        xmlDoc.Save(Writer)

        'Create ArchiveFile if not blank
        If strArchiveFilePath <> "" Then
            CreateArchiveFile(strXMLFile, strArchiveFilePath, strXMLFileName, "XML")
        End If

    End Sub
Can someone help? FYI, the above method is used in a script task from a SSIS package.

I am a Salesforce developer and not a SQL/SSIS developer which makes me hard to troubleshoot.


/C Problem

$
0
0

Hello!

We have little problem with simple SSIS package

We read rows from flat file source (.csv) format

string[DT_STR] OutputColumnWidth 80

and then make derived column

(DT_STR,40,1252)[Column 21]

and write rows to OLE DB Destination

In Csv we have rows like

....XXX/XXC/Сxxx Sxx;XXX/XXC/Cxx Sxxx Dxxxxx;XXX/XXC/Сxxxxx Sxxxx Dxxxxxxx

For some reason we get truncation error from derived column for this particular row but length definitions are ok.

I have found out that for some reason /C or C/ is the source of problems. If I for example replace

/C => /B everything works fine.

for example

....XXX/XXB/Bxxx Sxx;XXX/XXB/Bxx Sxxx Dxxxxx;XXX/XXB/Bxxxxx Sxxxx Dxxxxxxx

Any Ideas what might be special meaning of /C or C/ in string column?

Regards

Cazzy



Installed SSDT but cannot find SSIS builder

$
0
0

We are upgrading one of our systems to use SQL Server 2017 and we use Integration Services to build SSIS packages and schedule them as jobs in Production.  In the past, when I installed SQL Server 2008r2, everything was there after a long but simple install.  It appears that everything needs to be installed separately with SQL 2017.  

Let me preface this with the fact that before installing SQL Server 2017, I already had Visual Studio 2017 installed on this machine.  I am hoping that this is not causing the issue.  I installed SQL Server 2017, then SSMS, followed by SSDT, the Data tools.  Everything installed successfully but the problem is I cannot find the Data Tools or even any mention of Integration Services on my Windows menu, here is what is listed:

Microsoft SQL Server 2017

Deployment Wizard

Reporting Services Configuration Manager

SQL Server 2017 Configuration Manager

SQL Server 2017 Data Feed Publishing Wizard

SQL Server 2017 Data Profile Viewer

SQL Server 2017 Data Quality Client

SQL Server 2017 Data Quality Server Installer

SQL Server 2017 Database Engine Tuning Advisor

SQL Server 2017 Deployment Wizard

SQL Server 2017 Error and Usage Reporting

SQL Server 2017 Execute Package Utility

SQL Server 2017 Import and Export Data (32-bit)

SQL Server 2017 Import and Export Data (64-bit)

SQL Server 2017 Installation Center (64-bit)

SQL Server 2017 Master Data Services Configuration Manager

SQL Server 2017 Project Conversion Wizard

Microsoft SQL Server Tools 17

               Microsoft SQL Server Management Studio 17

SQL Server Profiler 17


Can someone tell me what I am doing wrong and where the SSIS package builder is located?

Thank you,

Al

SSIS package error- [Excel Source [2]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009. There may be erro

$
0
0

Hey-

I' m getting this error 

[Excel Source [2]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009.  There may be error messages posted before this with more information on why the AcquireConnection method call failed.

while exporting from xl document. This is a data flow task with excel connection manager and the database or oledb destination. 

Here are some of the things I tried. 

1) Excel connection manager -alter the connection to fetch an xls document (97-2003 version)

2) have the project properties set to run in 32 bit format.

3)have the delayed validation set.

Nothing worked so far. Can anyone solve this issue?

Thanks

Mythili

Issue during create a new Catalog in Microsoft SQL Server Management Studio 18

$
0
0

Hi,


Is there any ways to create a new Catalog in Microsoft SQL Server Management Studio 18 without using Azure account.


Since in SQL Server Management Studio 2014, i can create a new Catalog without Azure account.

No data read from XML source with inline schema by SSIS

$
0
0

I have an SSIS project that calls a web service and returns the data in the form of an xml document. Next, I need to parse that xml in a data flow task and load it into a sql server database.

The xml file has an inline schema. In my XML Source in the data flow, I select "inline schema" and all of the columns are listed correctly. Everything seems fine up to this point.

However, when I execute the package, no data is being loaded from the xml source and no errors are thrown. The output message says "'OLE DB Destination wrote 0 rows'". My data viewer does not show any data being piped out of the xml source, (same problem, no data is written and no errors are thrown).

Below is an excerpt from my xml source with an inline schema, which is created by my web service task. 

Please suggest how can I load xml data into sql server using ssis.

Here is a sample of the xml file:

<?xml version="1.0" encoding="utf-16"?>
<DataSet>
  <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
      <xs:complexType>
        <xs:choice minOccurs="0" maxOccurs="unbounded">
          <xs:element name="Table">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="title" type="xs:string" />
        <xs:element name="author" type="xs:string" />
              </xs:sequence>
            </xs:complexType>
          </xs:element>
        </xs:choice>
      </xs:complexType>
    </xs:element>
  </xs:schema>
  <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
    <NewDataSet>
     <Table diffgr:id="Table1" msdata:rowOrder="0">
         <title>The Lord of the Rings</title>
    <author>J.R.R. Tolkien</author>
      </Table>
    <Table diffgr:id="Table2" msdata:rowOrder="0">
         <title>The One You Cannot Have</title>
    <author>Preeti Shenoy</author>
      </Table>
       </NewDataSet>
  </diffgr:diffgram>
</DataSet>


Who will be announced as the next SQL Server Integration Services Guru? Read more about July 2019 competition!!

$
0
0


What is TechNet Guru Competition?

Each month Microsoft TechNet Wiki council organizes a contest of the best articles posted that month. This is your chance to be announced as MICROSOFT TECHNOLOGY GURU OF THE MONTH!

One winner in each category will be selected each month for glory and adoration by the MSDN/TechNet Ninjas and community as a whole. Winners will be announced in dedicated blog post that will be published inMicrosoft Wiki Ninjas blog, a tweet fromMicrosoft Wiki Ninjas Twitter account, links will be published atMicrosoft TNWiki group on Facebook, and other acknowledgement from the community will follow.

Some of our biggest community voices and many MVPs have passed through these halls on their way to fame and fortune.

If you have already made a contribution in the forums or gallery or you published a nice blog, then you can simply convert it into a shared wiki article, reference the original post, and register the article for the TechNet Guru Competition. The articles must be written in July 2019 and must be in English. However, the original blog or forum content can be from beforeJuly 2019.

Come and see who is making waves in all your favorite technologies. Maybe it will be you!


Who can join the Competition?

Anyone who has basic knowledge and the desire to share the knowledge is welcome. Articles can appeal to beginners or discusse advanced topics. All you have to do is to add your article to TechNet Wiki from your own specialty category.


How can you win?

  1. Please copy/Write over your Microsoft technical solutions and revelations to TechNetWiki.
  2. Add a link to your new article on THIS WIKI COMPETITION PAGE (so we know you've contributed)
  3. (Optional but Recommended) Add a link to your article at the TechNetWiki group on Facebook to get feedback and tips from the council members and from the community. The group is very active and people love to help. You can even get direct improvements to your article before the contest starts.

Do you have any question or want more information?

Feel free to ask any questions below, or Join us at the official MicrosoftTechNet Wiki groups on facebook. Read More about TechNet Guru Awards.

If you win, people will sing your praises online and your name will be raised as Guru of the Month.

PS: Above top banner came from James van den Berg.


Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
----------------------------
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page

Microsoft SSIS Package running successfully manually from Visual Studio and SSMS Integration Services Catalog, but not via SQL Server Agent !

$
0
0

I have a complex SSIS package, which detects the file extension from a folder, and loads the file into a 
SQL Server table. I have a For Each Loop Container to load a number of files in this manner, from this folder  location and load each file into a SQL Server table.

After the loading of each file into the SQL Server table, the SSIS has a File System Task in the Control Flow; this File System Task  first creates an archive folder and then moves each file into this archive folder.

I am using Environment Variables in the SSMS Integration Services Catalog, to map to the parameters in the SSIS package/project.

The entire process is successful when I run the SSIS package in the SSMS Integration Services Catalog manually, but when I try to run via a SQL Server Agent, the data loading and the (File System Task's) folder creation are successful, but not the File System Task's file moving process. (The Agent is Run as SQL Server Agent Service Account.)

I get the following error when I see the execution report in the Integration Services Catalog in the SSMS:

File System Task - Move Files:Error: An error occurred with the following error message: "Access to the path is denied.".

While the SQL Server Agent is able to create a folder using a File System Task successfully, it is not able to
move the file into this new folder location.

Inside the SQL Server Agent History, I see this in the job step:

Execute as user: NT Service\SQLSERVERAGENT. Microsoft(R) SQL Server Execute Package Utility Version 14.0.2002. 14 for 64-bit.
.....Package execution on IS Server failed. Execution ID: 30449, Execution Status : 4.
....

I am not good with this permission issue in SQL Server Agent. I read about some proxy setting etc. but am not able to comprehend.

Is there a step-by-step solution you can provide me to fix this issue ?

Visual SSIS load vs. Excel Ole DB

$
0
0

I have an ODBC source.  And if i do a simple query from Excel.   Get data - other sources - from ODBC.  Advanced editor  and use the script   select * from Filemaker_Fields  I get all 111.000 rows, without anyproblems at all.  

If I on the other hand tries to do the same in Visual studio. i'm not as succesfull. I have tried both Ado .NET & Ole DB.  I can see excel uses OleDB, so I reverted back to that, since i can see it can work.

I have created a table in SSMS based on all tables from the ODBC source(i used the visual function new table to create it).   I use the same SQL command in the ODBC source.  Im mapping all columns, not removing anything at all.    Basicly the "same" as in excel.

I tells me there are LOB columns(but there aren't in the one table, there are in some of the others.)  So it will force Row by Row. I can then just change the fetchmetode to 0, this removes the warning.  I then come to the 2nd issue, if i run it. It will cause an error about not being able to validate metadata.  So i have set that option to false.  Then come the last problem

I will now run until is has loaded 29.748 rows.  I looked through the output in excel. There are no special caracters or anyhing which should affect it. All rows contain same type of info. But since it's failing 1/3 unto the load, it has to be some kind og data validation right`?

I create an on Error redirect. It will load all 111.000 lines, but 40k. will be pushed over to the error list. 


Which options should i look at?  I'm assuming there are some defualt setting which aren't the same as in Excel?  I really don't understand how it will just fly with no problems at all.  But not in VS. I'm assuming it's the advanced settings options, which then has an default setting not set in excel?


SSDT 2015 Script task error when deployed to sql server

$
0
0

Getting following error :

Executed as user: ----- Microsoft (R) SQL Server Execute Package Utility  Version 13.0.1601.5 for 64-bit Microsoft.   Started:  3:19:41 PM  Error: 2019-06-17 15:19:42.01     Code: 0x00000003     Source: CRM2SQLScript CRM2SQLScript     Description: There was an exception while loading Script Task from XML: System.Exception: The Script Task "abc" uses version 15.0 script that is not supported in this release of Integration Services. To run the package, use the Script Task to create a new VSTA script. In most cases, scripts are converted automatically to use a supported version, when you open a SQL Server Integration Services package in %SQL_PRODUCT_SHORT_NAME% Integration Services.    at Microsoft.SqlServer.Dts.Tasks.ScriptTask.ScriptTask.LoadFromXML(XmlElement elemProj, IDTSInfoEvents events)  End Error  Error: 2019-06-17 15:19:42.02     Code: 0x00000003     Source: CRM2SQLScript     Description: The Script Task is corrupted.  

install and update SSDT tool

$
0
0

I have a little older version of microsoft sql server integration service than other developer, so I want to upgrade it.

We all use  visual studio 2017 for data tools.

So I first go to check for updates in vS 2017, it updates my data tools, but the ssis is still at some version behind.

Then I go to extension and updates, I tried to click unistall then want to reinstall it, but then the ssis project disappeared.

In the process I also clicked stop roaming, not sure what that mean, maybe anyway I cannot see ssis project any more.

Then I  tried to unintall and reinstall, but still not see ssis shows up in the extension and update.

What should I do now.

Thanks


SQLFriend

Viewing all 24688 articles
Browse latest View live


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