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

How merge multiple text files in SSIS

$
0
0

I am looking to merge multiple text files into one.

Here's how I receive the files :     BTR1-A-TRT-NAME

                                                  BTR2-A-TRT-NAME

                                                  TER1-A-FRT-TRY

                                                  TER2-A-FRT-TRY

                                                  TER3-A-FRT-TRY

I need to merge these files so that I have only 2 files instead of 5 , the merged files should be named as BTR-A-TRT-NAME and TER-A-FRT-TRY. Any pointers in this regard. Thanks in advance


component is missing, not registered, not upgradeable

$
0
0

Hi,

I got the error:

"Error: 0xC0048021 at Data Flow Task, OLE DB Source [1]: The component is missing, not registered, not upgradeable, or missing required interfaces. The contact information for this component is "OLE DB Source;Microsoft Corporation; Microsoft SqlServer v10; (C) Microsoft Corporation; All Rights Reserved; http://www.microsoft.com/sql/support;7"."

This apears in any destination or source connection

Reading files in a directory, sending content to stored procedure

$
0
0
I'm just starting out with SSIS, and I'm a bit overwhelmed getting started.  I've been developing .NET and SQL applications for ~15 years, so getting stumped by something seemingly easy is frustrating.  I've got a bunch of text files in a directory.  These are non-delimited and non-fixed width.  I would like to iterate through the files and execute a stored procedure per file using the content as an input parameter.  I will also want to grab details about the file (name, size, created, etc.) format the details into an xml document and send it into the same procedure.  The stored procedure will send an ID back through an output parameter that I will want to use further down the workflow.  Where do I get started?  I've created a connection to my database and that's about it. 

Issues in using GetIdentificationStringByID in SSIS2016

$
0
0

So basically the "GetIdentificationStringByID" is not working

I have SSIS2016 , SQL 2016

and I have a DFT and in it

  1. I have a Source object and a destination object
  2. from the destination object I have a red path that goes to a "Script Component"
  3. and from the "Script Component" a green path to a final error table

The issue is the "Script Component", so I followed Microsoft recommendation and used the mentioned code in the "Script Component"

   Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)
        '
        ' Add your code here
        '

        Dim component130 As IDTSComponentMetaData130 = TryCast(Me.ComponentMetaData, IDTSComponentMetaData130)

        If component130 IsNot Nothing Then
            'Row.ErrorColumnDescription = Me.ComponentMetaData.GetIdentificationStringByID(Row.ErrorColumn)
            Row.ErrorColumnName = component130.GetIdentificationStringByID(Row.ErrorColumn)
            Row.ErrorColumnDescription = component130.GetErrorDescription(Row.ErrorCode)
        End If

        'Row.ErrorColumnDescription = Me.ComponentMetaData.GetErrorDescription(Row.ErrorCode)
        'Row.ErrorColumnName = Me.ComponentMetaData.GetIdentificationStringByLineageID(Row.ErrorColumn).ToString
    End Sub

the Build is OK, but the code is not working and can't identify the "GetIdentificationStringByID" function and I know that because I don't see the function when using the intellisense

At this point I have to stop and investigate but I prefer to run the package and see more of the error , and I get the error

"

Error: 0xC0047072 at DFT---MyDestinationDFT, SSIS.Pipeline: No object exists with the ID -1.
Error: 0xC0047062 at DFT---MyDestinationDFT, Script Component [290]: System.Runtime.InteropServices.COMException (0xC0047072): Exception from HRESULT: 0xC0047072
   at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.HandleUserException(Exception e)
   at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.ProcessInput(Int32 inputID, PipelineBuffer buffer)
   at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostProcessInput(IDTSManagedComponentWrapper100 wrapper, Int32 inputID, IDTSBuffer100 pDTSBuffer, IntPtr bufferWirePacket)
Error: 0xC0047022 at DFT---MyDestinationDFT, SSIS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "Script Component" (290) failed with error code 0xC0047072 while processing input "Input 0" (301). 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.
Error: 0xC02020C4 at DFT---MyDestinationDFT, OLEDB_SRC----CRM CSL dh_ecert [245]: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020.
Error: 0xC0047038 at DFT---MyDestinationDFT, SSIS.Pipeline: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on OLEDB_SRC----CRM CSL dh_ecert returned error code 0xC02020C4.  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.

"

can some one help out?

Thanks


Sincerely Nik -- Please kindly mark the post(s) that answered your question and/or vote for the post(s). http://sqldataside.blogspot.ca/ (SQL Tabular + PowerShell)

SSIS Communication Link Provider exception

$
0
0

I am getting following error while running the package which extracts data from a table which has 150 Million records.

The other tables which has got similar count are running fine. Its only with this table i am getting the error. Can you please help me to figure out the reason ,

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: "Communication link failure".
An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 11.0"  Hresult: 0x80004005  Description: "TCP Provider: An existing connection was forcibly closed by the remote host.

Error handlers

$
0
0

I have created a sql task in control flow. Also, I have created one more sql task  in event handler as specified in below url...I'm looking for help. Please let me know how to handle...

http://www.techbrothersit.com/2014/08/ssis-how-to-email-error-messages-from.html

Issue - I have two cases

case1 - When I give "select 1/0" in sql task in control flow  - In this case am getting right.

case2 - When I give wrong SP name in sql task in control flow, am getting below error

"[Execute SQL Task] Error: Executing the query "EXEC msdb.dbo.sp_send_dbmail
 @profile_name = 'Test-..." failed with the following error: "Incorrect syntax near 'dbo'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly." Here is script that is added in sql task   

"EXEC msdb.dbo.sp_send_dbmail
 @profile_name = '"+ @[User::MailProfile] +"',
@recipients = '"+ @[User::Recipients] +"',"
+"
 @body = "+"'Hi All,"+"
Error Information is below
Error Code:" + (DT_STR,50,1252)@[System::ErrorCode] +"
Task Name:"+ @[System::SourceName] +"
Error Description:" + @[System::ErrorDescription] +
"Thank you
IT Team"
+"',
@subject = '"+  @[System::PackageName] + " failed in  "+ @[User::EnvironemntName]+"'"


Transfer Database Task BUG?

$
0
0

Hi, I am seeing a lot of nuances in the use of this task. However it works sometimes but in one case it's getting me some strange result that smell like a bug:

Visual Studio 2012

Task Transfer Database from A (SQL 2008r2) to B (SQL 2012)

Overwrite: false

I run the package (it has this only task) and it stops with the obscure message

Error: The Execute method on the task returned error code 0x80131500 (An error occurred while transferring data. See the inner exception for details.). The Execute method must succeed, and indicate the result using an "out" parameter.

Nothing to do, I must cacth the error all by myself, hence I run the Profiler and this is the situation in the B server:

Batch Started

CREATE DATABASE [FixTest] ON  PRIMARY 
( NAME = N'XXXX', FILENAME = N'H:\Databases\MSSQL11.DB3\MSSQL\Data\FixTest.mdf' , SIZE = 4096000KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1048576KB ), 
( NAME = N'XXXX_2', FILENAME = N'H:\Databases\MSSQL11.DB3\MSSQL\Data\FixTest_2.ndf' , SIZE = 16559936KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1048576KB )
 LOG ON 
( NAME = N'XXXX', FILENAME = N'H:\Logs\MSSQL11.DB3\MSSQL\Data\FixTest_1.ldf' , SIZE = 4194304KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1048576KB ), 
( NAME = N'XXXX', FILENAME = N'H:\Logs\MSSQL11.DB3\MSSQL\Data\FixTest_2.ldf' , SIZE = 4194304KB , MAXSIZE = 2048GB , FILEGROWTH = 1048576KB )
 COLLATE SQL_Latin1_General_CP1_CI_AS

Batch Completed 

CREATE DATABASE [FixTest] ON  PRIMARY 
( NAME = N'XXXX', FILENAME = N'H:\Databases\MSSQL11.DB3\MSSQL\Data\FixTest.mdf' , SIZE = 4096000KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1048576KB ), 
( NAME = N'XXXX_2', FILENAME = N'H:\Databases\MSSQL11.DB3\MSSQL\Data\FixTest_2.ndf' , SIZE = 16559936KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1048576KB )
 LOG ON 
( NAME = N'XXXX', FILENAME = N'H:\Logs\MSSQL11.DB3\MSSQL\Data\FixTest_1.ldf' , SIZE = 4194304KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1048576KB ), 
( NAME = N'XXXX', FILENAME = N'H:\Logs\MSSQL11.DB3\MSSQL\Data\FixTest_2.ldf' , SIZE = 4194304KB , MAXSIZE = 2048GB , FILEGROWTH = 1048576KB )
 COLLATE SQL_Latin1_General_CP1_CI_AS

Audit Logout

Null

Audit Login

-- network protocol: TCP/IP
set quoted_identifier on
set arithabort off
set numeric_roundabort off
set ansi_warnings on
set ansi_padding on
set ansi_nulls on
set concat_null_yields_null on
set cursor_close_on_commit off
set implicit_transactions off
set language us_english
set dateformat mdy
set datefirst 7
set transaction isolation level read committed

Batch Starting

USE [master]

Batch Completed

USE [master]

Batch Starting 

IF  EXISTS (SELECT name FROM sys.databases WHERE name = N'FixTest')
DROP DATABASE [FixTest]

Batch Completed

IF  EXISTS (SELECT name FROM sys.databases WHERE name = N'FixTest')
DROP DATABASE [FixTest]

So, as I was able to see in the two folders (data and log), the database is created but suddenly is dropped. And I repeat, the overwrite is set on false. 

Bug??

 

ODATA Connection to SharePoint list not working

$
0
0

Hi there
I am trying to connect to a SharePoint list through SSIS using an ODATA connection.
I am using SSIS with SSDT Microsoft Visual Studio 2015 Shell (Integrated) version 14.0.23107.0 D14REL
I can see the _vti_bin/listdata.svc from a browser on my server.

When I attempt to set up the ODATA connection I get the following error:

The remote server returned an error: (403) Forbidden. (System)

I have read the article that you refer to.
whitepages.unlimitedviz.com/2014/03/using-the-odata-source-connector-with-sharepoint-online-authentication/

I followed the advice to click on All and change Microsoft Online Services Authentication to True but this option does not appear on my version which under Security has only:

  • Authentication Type
  • Domain
  • Password
  • User ID

I'd appreciate any assistance that you can provide.

Regards

Rob



SSIS Package -> File System Task throws Error: Access to the path "\\SERVER_A\.....\FILE_ABC.BAK" is denied

$
0
0

would anybody please help?

I developed a ssis package with a file system task in it, which copies a cetrain file from Server_A to to Server_B. If I run this package directly in Visual Studio, every thing work fine and the file is copied accordingly.

But wenn I deploy this package in an SSISDB to a SQL Server and run it form SSMS I get the error "Access to the path \\SERVER_A\......\ is denied.

I use an account which is a member of domain admin group and has the full access to the server A and server B both on server level and SQL-Server level

Additional Information: I use

- Visual Studio Professional 2015

- SQL Server Management Studio v17.7 (14.0.17254.0)

- Windows 10 as Client

Your support is highly appreciated.

HDFS File Source and Quote Identifiers

$
0
0

Hi all, I'm trying to load a file .csv that has a column with a text containing commas. The text is between double quotes, but on the HDFS File Source there are no properties about quote identifiers, it is possible to set only the column delimiter.

This is weird.

I know that I can copy the file locally and use a flat file connection, but I would rather not do it...

If a key match is found, create a new unique key and insert that with the record

$
0
0

Hi All,

we are having source Database where a source DB DBA inserts the data and we have our production where we insert the data.

Yesterday we inserted Data manually in our production data, and source DB DBA inserted the data in his Database.

Now ran in to situation where in both database's ID’s are same and have different data.

But we want that data also to be present in our production DB.

We don't want to perform update operation, we want to perform insert/append operation by generating new unique key in production DB.

Thanks for your help!


Thanks, Naga

How to load row by row in sql database

$
0
0

Hi,

I have one large database, i need to load data from main database to staging database with row by row. Also i need record insert information in different table.

1. I have 30 tables with one reference column

2. When am loading data  from main database to staging database, it's update all 30 tables one by one means 1st record insert into all 30 tables after 2nd record needs to insert into same tables. Like

1st record insert into 30 tables

2nd record insert into 30 tables

.....

Nth record insert into 30 tables

3. Also need insert records log in separate table.


Thanks Bala Narasimha

Need to Update SSIS to match on Items by priority

$
0
0

Hi All,

I need to update records based on Items by priority.

1.column5
2.column6
3.column7

Items are ranked by priority. If 1 is missing then move to 2 then to 3.

I have already an SSIS which runs sucessfully to bring latest data from source to destination for few columns.

SSIS Package is

ole DB source - > lookup transformation  -> ole DB command.

Using below condition in lookup transformation

WITH cte_latest AS (SELECT [column1_id], [column2_id], [column3_id], [column4_id], [column5_id], [column6_id], [column7],row_number() OVER (partition BY column7 ORDER BY column6 DESC) Rn 
FROM [dbo].[source] WITH (nolock) 
WHERE column7 IS NOT NULL AND column7 != '0' ) SELECT *
 FROM cte_latest
 WHERE rn = 1

Now I need to bring the data into destination based on Items priority but it should avoid duplicates.

Thanks for your help in advance


Thanks, Naga

Conditional split in control flow based on a value from object variable

$
0
0

Hi All

I have a scenario where I store connection string values in a table and call in an execute sql task in to an object variable. I use for each loop ado enumerator to call this object variable and process each load one after another. This was running fine. 

Now I want to run some of the these jobs parallelly in for each loop based on a column value from object variable. Can you please help how I can I achieve, 

Thanks

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.




Pulling the same data from different databases

$
0
0

Hi everyone,

I need idea on how best to achieve this:

I want to pulling data from 10 different tables which has the same structure across 20 database servers: that is we have each of the 10 different tables with the same structure in each of the 20 servers. Is there a way to use a variable (or any other approach) to load these tables to one destination (10 destination tables with the same table structure as the each of the source tables with additional column showing the database server name).

Thanks


me

What's the right way to deploy SSIS 2012 projects and database object updates?

$
0
0

Hello,

I work in a SQL 2012 shop where we use SSIS project deployment model.  Whenever I complete a new [or fix an existing] SSIS project, the DBA re-deploys the entire SSIS project and executes all the necessary alter table and alter procedure scripts that I provided...at least, that's always the plan but it rarely goes according to plan.  For various reasons, I sometimes fail to include necessary .sql scripts to perform the necessary database changes.  Is there some way of compiling all my development database changes for deployment?  

I haven't done SSIS deployments since SQL 2008 R2, and those all used the package deployment model.  I'm not familiar with ispac or bacpac or any kind of "pac" files that I should've learned years ago.

Thanks,
Eric B.

Reading files in a directory, sending content to stored procedure

$
0
0
I'm just starting out with SSIS, and I'm a bit overwhelmed getting started.  I've been developing .NET and SQL applications for ~15 years, so getting stumped by something seemingly easy is frustrating.  I've got a bunch of text files in a directory.  These are non-delimited and non-fixed width.  I would like to iterate through the files and execute a stored procedure per file using the content as an input parameter.  I will also want to grab details about the file (name, size, created, etc.) format the details into an xml document and send it into the same procedure.  The stored procedure will send an ID back through an output parameter that I will want to use further down the workflow.  Where do I get started?  I've created a connection to my database and that's about it. 

How to transfer data from all table in database to azure data lake destination?

$
0
0

Suppose I have two tables tbl1 and tbl2, then I want to create a package which will read the data from tbl1 and tbl2 and transfer the data to Azure data lake as two files tbl1.txt and tbl2.txt.

What I have done is created Execute SQL task with query select name from sys.tables which will return table names and loop through that result and store into store variable. But Oledb Source doesn't accept query like "select * from @[user::tablName] (a variable which has a table name)".

Please suggest me a solution. Thanks 

Getting Error at the time of Package Deployment

$
0
0

Hi Guys,

We are using SQL Server 2016 EE (SP1-CU8). We also developed some SSIS package in Visual Studio 2015. At the time of package deployment, we are getting below error. 

Error 1 : Connection Timeout Expired.  The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement.  This could be because the pre-login handshake failed or the server was unable to respond back in time.  The duration spent while attempting to connect to this server was - [Pre-Login] initialization=18380; handshake=14498;  (Microsoft SQL Server, Error: -2)

Error 2: Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached. (System.Data)

If you have any idea, please suggest.

Thanks

Dhanush


Viewing all 24688 articles
Browse latest View live


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