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

Importing text file with variable spaces

$
0
0

Hi all

I have a text file with a varying amount of spaces in it. Typical output from the file is attached.

How can I separate the values into separate columns please?

Thanks in advance.


Issue with retriving information from an XML column using SSIS

$
0
0

Hi,

I am trying to normalize a new version of the XML column.  For this I have an ETL that extracts from a table and then thru an OLE DB Command launches a store procedure that contains the new xpath to manipulate the XML and then insert it into 3 different tables.

I had a previous version of a XML and everything worked fine with this approach (different xpath) but with this new version apparently is not working.  If I test unitary the SP with a simple of the new XML it do the insertion without an issue, but when I take this to SSIS it loks like is doing something but the tables are empty.

If I check the preview on the ole db source it displays correctly, but if I check the viewer (placed after the ole db source output) a legend <long text> is displayed instead of the XML link. See attached picture.

Can you Help me to achieve my goal?

Kind Regards,

Adriana L.

SSIS error

$
0
0

Description: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E05.  An OLE DB record is available.  Source: "Microsoft OLE DB Provider for SQL Server 2012 Analysis Services."  Hresult: 0x00000001 Description: "Error Code = 0x80040E05, External Code = 0x00000000:.".

When I re-ran the package it worked fine. Any idea why it failed the first time?


Anonymous

SSIS Pkg Created in SSMS using Wizard Fails when running it in SSIS

$
0
0

First-time user of ISS in SQL 2008 DevEd,

Built package using (starting with) import export wizard to extract table data from Access 2003 MDB into SQl 2008 tables.

I was able to successfully run (in SSMS) the import export package created using the wizard.  The results were as expected

The package above was saved in the file system

I then went into SSIS and opened up that saved package (which had been created in/from the wizard).  I ran it and it failed at the first dataflow task.  Preceding that task were drops and creates in the destination DB; those drops and creates were all successful.

I can double click on the dataflow task and click on preview and see the source data.  However, the dataflow task is not getting the source data into the target tables (even though the very same package, unchanged, worked in SSMS).

execution Results messages around the failure:

Task Data Flow Task 1
Validation has started
[Source 1 - Band [49]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "SourceConnectionOLEDB" failed with error code 0xC0209303.  There may be error messages posted before this with more information on why the AcquireConnection method call failed.
[SSIS.Pipeline] Error: One or more component failed validation.
Error: There were errors during task validation.
Validation is completed
Finished, 11:49:38 AM, Elapsed time: 00:00:00.032
[Connection manager "SourceConnectionOLEDB"] Error: SSIS Error Code DTS_E_OLEDB_NOPROVIDER_64BIT_ERROR.  The requested OLE DB provider Microsoft.Jet.OLEDB.4.0 is not registered -- perhaps no 64-bit provider is available.  Error code: 0x00000000.
An OLE DB record is available.  Source: "Microsoft OLE DB Service Components"  Hresult: 0x80040154  Description: "Class not registered".
Finished, 11:49:38 AM, Elapsed time: 00:00:00.296

Only help I can find in this forum was a message with respect to something cryptically called "SNAC". 

 

I am very much a neophyte in this SQL Server stuff, so be tender!

How do I make this package run without this error cropping up?

 

 


RRR

Import SSIS packages from SQL server

$
0
0
How do you import the SSIS packages from MSDB into a visual studio solution?

Anonymous

How to select special character from OLE DB source in SSIS?- Truncation error.

$
0
0

Hi,

I have to pull data from one Oracle table and for that I am using OLE DB source in SSIS. In OLE DB source I write query like, 

SELECT     DESCRIPTION
FROM         INV.ITEMS_LOCATION

and packages failed with truncation error. When I redirect this column for truncation I see below result in data viewer,

ErrorCodeErrorColumnDESCRIPTIONErrorCode - Description
-10716076938884HC Afd Set__ZDV?N07-03075The data was truncated.  
-10716076938884HC Afd Set__Ventiel 4DO1-?The data was truncated.  
-10716076938884HC Afd Set__Ventiel 3DO3-?The data was truncated.  
-10716076938884HC Afd Set__Ventiel 4DP01-?The data was truncated.  
-10716076938884HC Afd Set__Ventiel DBDS-10-?The data was truncated.  
-10716076938884HC Afd Set__Filter TXW?The data was truncated.  
-10716076938884HC Afd Set__ZDV?N07-03075The data was truncated.  
-10716076938884HC Afd Set__Ventiel 4DO1-?The data was truncated.  
-10716076938884HC Afd Set__Ventiel 3DO3-?The data was truncated.  
-10716076938884HC Afd Set__Ventiel 4DP01-?The data was truncated.  
-10716076938884HC Afd Set__Ventiel DBDS-10-?The data was truncated.  

I don't how to put this value in table. I use code page 65001(UTF-8) and 1252, but it is not working, and giving error like 

[OLE DB Source [16]] Error: Column "DESCRIPTION" cannot convert between unicode and non-unicode string data types.

Data Type of 'DESCRIPTION' source(External) column is varchar(240) and same- varchar(240) I used for output column and in my table's data type. I also tried with varchar(1000) for output column in OLE DB Source but same truncation error.

I also tried to convert DESCRIPTION into navachar using below cast function but got error.

SELECT   -- TO_NVARCHAR(DESCRIPTION) AS DESCRIPTION,

--CAST(DESCRIPTION AS NVARCHAR(240)) DESCRIPTION, 

Please let me know how to load this value in table. Thank you in advance.


Vicky


SSIS Web Service

$
0
0

Hi ALL ,

We have a web service that creates an incident ticket or Work Order. Now the requirement is i need to call that Web Service

from SSIS and open an incident on Failure of a Sql Agent task . So the Operations Team who works on the Incident Tickets

are made aware about  Job Failure .

Idea to Implement emails for notifying on the Job Failure has been rejected. The management wants the SSIS calls the web service and opens an incident when the SQL Agent task fails. Am open to other solutions as my end goal is opening an incident from the web service when the sql agent task fails.

Please Advice.

Thanks

Priya

Raise Error from SSIS pkg

$
0
0

Can I raise an error form SSIS package component execute sql task and have the control re-direct to some other say mailing component and to send an email on certain condition 

e.g.

I have a below code in expression of Execute SQL Task which on status<>0 sets the variable @exit_pkg = 'True' and RaiseError as below and control is passed to a alternate component defined with precedence logic as onFAILURE and @exit_pkg = 'True' 


IF @STATUS = 0 
BEGIN
	SELECT 'FALSE' AS Exit_Pkg
	UPDATE  [Config1] SET [IN_USE] = 1
END
ELSE 
BEGIN
	SELECT 'TRUE' AS Exit_Pkg
	--RAISERROR (15600,-1,-1,N' attempt was made to run the pkg in use');
END 

Neil



Is there a wat to set "IncomingRowChangeType" Property of Slowly Changing Dimesnion Dynamically

$
0
0

I am trying to load a huge dimension table (300k records) by passing it through SCD transformation. The processing takes a very long time during the first load when the destination table is empty (i.e. while doing a Day 1 load). When the destination table loads for the first time, all the records are new. During the subsequesnt runs of the package I am expecting only the updated/changed records to flow in through the SCD transformation.

I can use the "IncomingRowChangeType" propoerty and set it to "All New" to boost the performance during the first load (day 1) load. However, during subsequent loads I want to detect the changes and hence I want the property "IncomingRowChangeType" set to "Detect". Is there a way to set this property dynamically?

Or is there any alternative to achive the same using some other properties of SCD transformation?

Excel Destination not showing all the available source columns automatically.

$
0
0
I have an excel source, i am using some transformation and conditional split and then loading the final data into few excel destination. i checked in the data pipe line, still it loads the data into excel destination it's having all the columns of the source but while editing the excel destination for mapping it showing only 1 column F1. My question is it compulsory to have the column names in excel destination before we load data to it ? because i have to load my data into multiple excel files and i find it little difficult to manually copy and paste column names in all excel destination. Is there some work around for it ?

Failed to retrieve long data for column

$
0
0

Hi,

I am using SSDT 2010 to load Excel 2010 spreadsheets to a 2012 SQL DB. In my package I have a foreach loop and loading a couple of thousand spreadsheets. Issue I'm facing, is that about 30 or so of these spreadsheets are failing with message above.

My connection string is set as follows: Provider=Microsoft.ACE.OLEDB.12.0;Data Source=<filepath>.xlsx;Extended Properties="EXCEL 12.0 XML;HDR=YES;IMEX=1";

I tried changing TypeGuessRows registry setting to 1 and to 0, but with no success.

BLOBTempStoragePath and BufferTempStoragPath have more than enough space.

The Excel spreadsheets (contain about 1000 rows) are being created through an XML process. What we've also tried,  is force the first 11 rows through the XML process to contain at least 256 characters to ensure it converts to DT_NTEXT.

Does anyone have any idea what might cause this?

SSIS script task email attachments

$
0
0

Hi,

I am trying to send an email using SSIS script task and I am trying to send 4 files from a shared location to 3 people. And here is my code I found online:

I have added the last 2 lines

myHtmlMessage.Attachments.Add(Attachment(Dts.Variables ["User::File1"].Value.ToString()));

mySmtpClient.Send(htmlMessage);

to attach a file but it does not work. If I remove the last 2 lines it send out the email witrhout attachments., Please help me how do I send attachments?

public void Main()

{

string htmlMessageTo = Dts.Variables["HtmlEmailTo"].Value.ToString();

string htmlMessageFrom = Dts.Variables["HtmlEmailFrom"].Value.ToString();

string htmlMessageSubject = Dts.Variables["HtmlEmailSubject"].Value.ToString();

string htmlMessageBody = Dts.Variables["HtmlEmailBody"].Value.ToString();

string smtpServer = Dts.Variables["HtmlEmailServer"].Value.ToString();

SendMailMessage(htmlMessageTo,htmlMessageFrom, htmlMessageSubject, htmlMessageBody, true, smtpServer);

Dts.TaskResult = (int)ScriptResults.Success;

}

private void SendMailMessage(string SendTo, string From, string Subject, string Body, bool IsBodyHtml, string Server)

{

MailMessage htmlMessage;

SmtpClient mySmtpClient;

htmlMessage = new MailMessage(SendTo,From, Subject, Body);

htmlMessage.IsBodyHtml = IsBodyHtml;

mySmtpClient = new SmtpClient(Server);

mySmtpClient.Credentials = CredentialCache.DefaultNetworkCredentials;

myHtmlMessage.Attachments.Add(Attachment(Dts.Variables ["User::File1"].Value.ToString()));

mySmtpClient.Send(htmlMessage);

}

SSIS Yammer group

Randomly lost mapping for input column at Destination Task

$
0
0

I have SSIS packages which contain multiple data flows.

When there are changes at the source tables, I have updated existing data flows by adding new columns for each task and ODBC destination task. Every tasks works fine except the Destination Task. Somehow, at the Destination Task, a mapping for new columns becomes empty after I save it. It is not happened for all columns or data flows but randomly happened for some columns. May I know the cause of this issue and how I can avoid this issue?

Thank you in advance.   


Alan Hosang Yun


Send mail task plus its working in visual studio, but unable to send mail to the recipient.

$
0
0

Hi,

I am trying to send test mail to my company mail id through the Send mail task plus (Visual Studio). I did execute the send mail task plus task, it turns to green but i am not receiving the email. I provided the required user name, host and password to the SMTP connection manager. But still i am receiving the email. Please help !!

Thanks


DTEXEC fails when running in 32bit mode but works in DTEXECUI in 32bit mode

$
0
0

I have a SSIS package that goes out to a sql database reads a table, creates an excel spreadsheet and emails the spreadsheet out. Pretty straight forward nothing fancy. My problem is that it works fine in when running in visual studio debug, it also works fine if I run it in 32bit from the dtexecui utility, however it fails when running in dtexec. Note, I do have Run64BitRuntime set to False from the miscellaneous properties pages screen and I have EncryptSensitiveWithUserKey set for the protection level in the properties window.

This is how I am running the package from a bat file - "C:Program Files (x86)Microsoft SQL Server100DTSBinndtexec.exe" /f "\servernamefolder pathpackage name.dtsx" > "C:Scheduler_JobsLogsSSIS_log_TODAY%.txt"

When I look at the log it shows it running in 32bit mode however the job fails

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

Started: 11:22:32 AM Error: 2014-09-05 11:22:39.08 Code: 0xC0016016 Source:
Description: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available. End Error

Any ideas on how to get this to run from my .bat file? I need to execute this bat file from the native Windows scheduler.

Thanks in advance.

SSIS Package Not working

$
0
0

Hi

We have SSIS Package in which all the tasks in control flow are connected with "Completion Precedence".

Ideally it should execute all the tasks irrespective of failed or successful execution of any of the task. And this works as expected from BIDS.

But when package is scheduled from SQL Server Agent job (Single step), it doesn't execute next task (Execute SQL Task) if there is failure with any of the task before that (Execute SQL task) even though they are connected with Completion precedence.

We have several Execute Package tasks which call child packages to load the data and all are executed in parallel.  There is one Execute Sql task at the end of one of the Execute Package task (Connected using completion precedence) which calls stored procedure to do some cleansing activities.

Error while adding ODBC Destination D.F. Component in C# - HRESULT: 0xC0048021

$
0
0

Hello, 

I'm trying to create an SSIS ODBC Destination Data Flow Component programmatically (C# and SQL Server 2008 R2).

The code I use is 

IDTSComponentMetaData100 ODBCDestination = dataFlow.ComponentMetaDataCollection.New();
ODBCDestination.Name = String.Format("ODBC_DST {0}", _Dimension.Name);
ODBCDestination.Description = String.Format("ODBC Destination for {0}", _Dimension.Name);
ODBCDestination.ComponentClassID = "{074B8736-CD73-40A5-822E-888215AF57DA}";

CManagedComponentWrapper instance;
instance = ODBCDestination.Instantiate();
instance.ProvideComponentProperties(); //<--After this I have the error HRESULT 0xC0048021

Is there any dll that i sould reference to my project in order to play? I have referenced the 

Microsoft.SqlServer.DTSPipelineWrap (version 10)

Microsoft.SqlServer.DTSPipelineWrap (version 10).

Thanks in advance for your help.



SSIS package fails when Configuration value has value saved into the package

$
0
0

when a package is migrated from dev to QA and to PROD sometimes it fails since the variables have values in them saved into the package.

what we do is clear these values manually and restart the job.

Is there a way we can clear the variables when saving the package or at least programmatically?


eddy.a

How to use Substring in Derived column in SSIS

$
0
0

I want to export data from SharePoint list to SQL using SSIS. In SharePoint list, i have a column as multi select, So i am getting below value in my column

1;#control 1;#3;#control 3

I want to use substring in derived column in such a way that i should get below result

1,3

I want only ID from the given column.

I have tried below code

SUBSTRING(ColumnName,1,FINDSTRING(ColumnName,";#",1) - 1)

But it only gives me answer as

1

Can anyone please help me out.?

Viewing all 24688 articles
Browse latest View live


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