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

How to copy a column value in to a variable in Dataflow task?

$
0
0

Hi All,

I want to copy a column value to a variable inside the data flow task. Which is the best way to achieve it in SSIS?

Thanks,

Sri


SISS AND SSDT when i try to open the package i am getting the error? can you please send the solution ASAP.

$
0
0
Micro Visual Studio is unable to load this document
failed to load XML due to error 0*C00CE564 "A CDATA section was not closed,Line 10622,Column 38",
This file occurs when loading a package and a file cannot be opened or loaded correctly into the XML document.
This can be result of specifying an incorrect file name to the loadPackage method or specified XML is an incorrect format.

Change Charset of SSIS package from Unicode to Latin 1

$
0
0
I created an SSIS package which makes queries my DB and exports the Result to a CSV File, in order to import the data into the DB of another system B (which I don't have access to). According to the administration of system B the CSV file structure is correct but for some reason the import fails. He also told me, that they use ISO-8859-1 (latin 1) as charset, while Flat File Connection at the SSIS package is set to Unicode. When I try to change the Code page Attribute to 1252 (ANSI - Latin 1) it fails, since some of my columns are of data type Unicode text stream [DT_NTEXT]. How can I convert those values to DT_TEXT so I can change the charset to Latin 1?

I appreciate it very much if you vote my Replies as Helpful or Mark as Answer if I could help you out. Thanks!

Clean solution to use Database Links in OLEDB source

$
0
0

Hi,

I have a connection to server A and from there, I have access to a set of views that are behind a database link.

All the queries I can do follow have the following semantic:

SELECT CODE, DESCRIPTRION

FROM STUDENT@DBLINK_DEV

but then in production it will be

SELECT CODE, DESCRIPTRION

FROM STUDENT@DBLINK_PRD

Is there any clean solution to have the dblink in a parameter without having to use a SQL statement inside package variable?

Thank you

 

"Root element is missing." - While using Sharepoint List Source in SSIS.

$
0
0

Hi Team,

We are trying to import data from sharepoint list using sharepointlist source in SSIS. But the following error pops-up.

[SP_SRC_SharePointList [67]] Error: System.Xml.XmlException: Root element is missing.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.XmlReader.MoveToContent()
   at System.Xml.Linq.XElement.Load(XmlReader reader, LoadOptions options)
   at System.Xml.Linq.XElement.Parse(String text, LoadOptions options)
   at System.Xml.Linq.XElement.Parse(String text)
   at Microsoft.Samples.SqlServer.SSIS.SharePointListAdapters.SharePointListSource.PrimeOutput(Int32 outputs, Int32[] outputIDs, PipelineBuffer[] buffers)
   at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPrimeOutput(IDTSManagedComponentWrapper100 wrapper, Int32 outputs, Int32[] outputIDs, IDTSBuffer100[] buffers, IntPtr ppBufferWirePacket)

We are unable to debug / move any further. Request your help.

Thank you.

Best Regards,

Gayathri

Scope of Breakpoints in SSIS project using Project Deployment model

$
0
0

Hi

Relatively new to SSIS and Visual Studio (so please forgive if I'm wrong with this), I was surprised to learn when using Breakpoints to help troubleshoot a dtsx package that the scope is limited only to the tier the execution (in"designer mode") is occurring on. 

What I mean by that is, I am using a Project Deployment model, and have a Master/parent package setup that I execute which in turn simply runs through a series of child packages (via Execute Package Tasks) passing binded parameters to the child variables as it goes. It's the more complicated control/data flow within the child packages I want to troubleshoot. However, any Breakpoint I try setting on the child packages do not fire when executing from the parent package.

Am I doing something wrong here? Or is this a limitation I have to workaround?

I'm using VS 2014 (v4.5.51641) with SSDT on a Windows 8.1 64-bit client.

Kind regards

Error Column Name SSIS

$
0
0

Hi there,

I would like to find out the Error Column name I know we can get ErrorCode and ErrorColumn but I can't able to get the Error Column Name

Is there any easy .Net Code to find out the Error Column Name ? Please let me know

Note: I know we can get through Codeplex software but needs to configure a lot in the backend to vaoid this I was trying to find .Net Code

Please let me know if you have any code.

Manual execution Vs Scheduled Job execution

$
0
0

Hi All,

I have a query and would appreciate your response / guidance.

I have a CDC package which when I execute manually takes around 1 sec to finish but when I execute the same package via a SQL job it takes around 24 seconds.

Can you please suggest what might be the issue?

Please let me know if you need any information.

Regards,

Nikhil


Using Script Task to rename an excel sheet.

$
0
0

I'm trying to use an SSIS Script Task to rename an excel sheet.

I've found several code samples on the net but most don't compile correctly and my knowledge of VB.net or C# isin't strong enough to fix the issues. I suspect they work but not for SSIS 2012 possibly.

Found the sample below which shows no errors at design time, but fails with an Invocation error so I'm unable to even trap what the error is to help in resolving the issue.

Does anyone have any sample code that they KNOW WORKS in SSIS 2012 or can see what the problem is ?

Dim oMissing As Object = System.Reflection.Missing.Value
        Dim xl As New Microsoft.Office.Interop.Excel.ApplicationClass()
        Dim xlBook As Microsoft.Office.Interop.Excel.Workbook
        Dim xlSheet As Microsoft.Office.Interop.Excel.Worksheet
        Dim laPath As String = "C:\Test.xlsx"

        Try
            xlBook = DirectCast(xl.Workbooks.Open(laPath, oMissing, oMissing, oMissing, oMissing, oMissing, _
            oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, _
            oMissing, oMissing, oMissing), Workbook)

            xlSheet = DirectCast(xlBook.Worksheets.Item(1), Worksheet)
            xlSheet.Name = "Sheet1"
            xlBook.Save()
            xl.Application.Workbooks.Close()

            Dts.TaskResult = ScriptResults.Success

        Catch ex As Exception

            MessageBox.Show(ex.Message.ToString(), "Error", MessageBoxButtons.OK)
            Dts.Events.FireError(1, ex.TargetSite.ToString(), ex.Message.ToString(), "", 0)
            Dts.TaskResult = ScriptResults.Failure

        End Try

Thanks.

Named sets...do you use them?

$
0
0

Hi guys. Named Set, I just builded up one but I am wondering how I can show it? I mean, the named sets it useful for what? Do you use it?

Thanks

Script Task order by FileName

$
0
0

I have following code in my script task to get all the files in directory.

 

String[] sourceFiles =Directory.GetFiles(Dts.Variables["User::FilePath"].Value.ToString(),"*.TIF");

I have files in directory as 1.TIF, 10. TIF, 3.TIF.

I would like to process my files in following order 1.TIF, 3.TIF, 10.TIF.

How do i sort it by FileName ascending.

any help much appreciated.

VS 2012 doesn't recognize SSDT installed

$
0
0

When I try to open/edit SSIS packages in VS 2012 shell, I am getting the following message:

However SSDT is installed and shows up as an installed product:

I have uninstalled and reinstalled SSDT and SSDT-BI on this machine, but that doesn't seem to help. Any suggestions would be appreciated.

Thanks.

Tim Harding

Convert SSIS DateTime to a String

$
0
0

Being a newbie to SSIS I'm not sure of the most efficient method of converting a DateTime object to a String.

 

I'm from a C# background where this would be easy using DateTime.ToString("YYYYMMdd"). I want to use the date in a file name so don't require most of the parts.

 

I'm sure I could do this using a script task to produce a file name for each row of data in my table and add that filename to the dataset but it seem like overkill to do something that should be simple. Also as I'm supposed to be getting to grips with SSIS I shouldn't keep running back to what I know.

 

My current approach is to derive a column and build up an expression to convert the date into a string. The only problem being that it doesn't work.

The expression I'm working with is:

(DT_WSTR, 50)([OrgName] ) + "_" + (DT_WSTR, 50)( [PayrollName] ) + (DT_WSTR, 4)(YEAR( [ProcessedDate] )) + (DT_WSTR, 2)(MONTH( [ProcessedDate] )) + (DT_WSTR, 2)(DAY( [ProcessedDate] )) ".txt"

 

Can anyone see where I'm going wrong?

 

All comments greatly received.

 

Cheers

Ben

BIDS 2008 DataFlow viewer not showing even though the sql statement returns data

$
0
0

Have a dataflow and trying to see why no rows are being written to the destination.  I popped a viewer on the connection, but it doesnt show up when I run.  What can I check?

The DataFlow source runs a sql statement and it runs fine and returns a result.


SSIS package not working on 2012 Integration Service Catalog deployment

$
0
0

I've set up a package that imports data from an excel spreadsheet(my only possible data source).  I deployed it and it worked for a while and then broke.  I had to switch to a generated connection string for excel with IMEX=1 to make things work.  Now it works fine on from Visual Studio on my local machine, but when I run it from Integration Services I get:

"The external column "<COLUMN NAME>" needs to be updated, for every column in the spreadsheet.   I am using the same excel file on my local machine as on the other machine.

Why can't I get it to work when it's deployed to the SSIS Server?


formatting flat file in SSIS

$
0
0

I have an output table with 

CREATE TABLE [dbo].[Extract_wt_693_Truven_Intel_PharmacyClaims_Output](
	[RowId] [int] IDENTITY(1,1) NOT NULL,
	[OutputRow] [nvarchar](420) NULL,
	[Modified] [datetime] NULL,
PRIMARY KEY CLUSTERED
(
	[RowId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

This output row is populated with several columns concatenated together.

When I try to dump to my text file which is a fixed length the 2nd row downwards has a space between the margin and the beginning of the output ,I have tried all I can but it remains the same any suggestions.

P0000000400N0000006399154010425271 D P0000005043N0000006099154012118651 D P0000001621N0000003999154012151211

A-000000000000000000000000000000000000000 D

iF i reduced it more than the row width above it ab normsif I increase it pushes both the first and other rows further awat from the right margin

Ask about an Error in SQL 2014

$
0
0

Hi all,

I got an error in SSIS package when I upgraded from Sql server 2008 to 2014 as below

I have a format file with "Text qualifier" is "||" and "Column dilimiter" is "|" as below data example and it run well in SSIS 2008. But I got an error after I upgraded to Sql server to 2014 because SSIS 2014 did not know this kind of format. Is this a bug for new Sql 2014?

As I know, some first releases of Sql server 2008 also had this error and then it's fixed after that. Now, it happen again in new release of Sql server 2014. Is there any fix for that?

Error: "[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on MediaType returned error code 0xC0202091.  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."

Example data:

-----------------------------------------

||MediaTypeID|||||MediaTypeCode||

||xxx|||||yyy||

||ccc|||||zzz||

------------------------------------------

Thanks all.


DontSaveSensitive; Key not valid for use in specified state error

$
0
0

I initially had my packages set to 'EncryptSensitivewithPassword' and usedthe config files.  My job executes fine.  But I noticed I was getting THE error "......Key not valid for use in specified state.....".  So, I change the protection level to 'DontSaveSensitive' , saved packaged ,build and re-imported it.  And I still get the same result.

What am I doing wrong??   Package is on the same server where it was built.

I have a package in production that executes without the error.  I made a change to the package (logging) in test and now it also encounters same error as the package referenced above.

split flat file into multiple file

$
0
0

hi

i have flat file which has 2 gb data .

now i have split into multiple files that text editor can handle it.

i dotn have any identity column in my data.how to use conditional split to randomly distribute this data into multiple files.

Using same package as child for parallel process

$
0
0

Hi,Would like to know if we can call the same package(child) for parallel process from Parent Package?

Like the same child package will be utilised in parallel with diff parameter options.

is that possible? If so, how can we do that, please advise!

Thank you!


--------------------------- Radhai Krish | Golden Age is no more far | --------------------------

Viewing all 24688 articles
Browse latest View live