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

Conditionally add {CR}{LF} or Carriage Return after Column11 instead of Column 12 if certain criteria is met

$
0
0

I have a scenario where on some records, I have 11 columns (fields) and in some records, I have 12 columns (fields).

In the Flat File Connection Manager Editor, under Advanced tab, is there a way for me to add {CR}{LF} or Carriage Return when certain condition is met.

Currently the carriage return is set on Column 12 for every record.  I would like to know if I can add carriage return on column 11 when FORMID = 999999 for example.

Thank you in advance.



Project Parameter not updating when Deployed

$
0
0

I have a project parameter that I had to make a change to. Save the project and all that, then deployed the project with the changes. However, when I look at the deployed project in the Integration Catalog, the value for the parameter is still the old value.

Why didn't the parameter value change when I redeployed the project?

Expression for not null values

$
0
0

Hi,

i have a table that contains null and not values source as excel. 

want to load not null values to the oledb destination 

using conditional split we can separate the null values and not null values. by using this i use the isnull(expression) for null values

remaining (i.e) not null automatically separated.

but i dont want isnul( expression) . i require notnull expression only. because i dont want to maintain the null rows anywhere.

Note: how to write a expression for values (i.e) not null

Importing a package with SMTP Connection Manager-SSIS 2017

$
0
0

I am trying to import a package to SSIS 2017 .I have a SMTP connection manager in my package which is causing the issue while I import :

OLE received a packet with an invalid extension. (Exception from HRESULT: 0x80010112) (Microsoft.SqlServer.DTSRuntimeWrap)

I tried removing the connection manager and did an import. It worked.

Can you please let me know if I am missing any assemblies?

ForEach Loop Container Not Getting All Files

$
0
0

Hello, August Members of the Sages Guild!

I have an SSIS package that processes incoming Excel reports into a historical SQL table for data mining. It's been working fine and dandy, but, recently, two runs missed some Excel reports.

It's not something I can replicate, as it's sporadic - highly so; the vast majority of the time, it works seamlessly - but, I've got a hunch that it's a matter of timing; that one Control Flow or Data Flow task is being flagged as complete when the actual process within that task is truly not finished.

What the package does;

Within a ForEach Loop Container;
1. Clear out Staging table 1 with a SQL Task doing a TRUNCATE,
2. Clear out Staging table 2 with a SQL Task doing a TRUNCATE,
3. Run a C# script to scan the existing Excel reports to find the oldest report and make it the active report,
4. Import Sheet 1 of the active report into Staging1,
5. Import Sheet 2 of the active report into Staging2,
6. Use a UNION ALL task to send both Staging1 and Staging2 to the History table,
7. Delete the active Excel report file.

Of course, the ForEach Loop Container will check for another report, processing it the same way, finally to stop when all files have been processed.

Now, this has worked like a charm for almost a year, but twice now - last week and today - the container signalled that it successfully completed - it turned green - before having run through all of the Excel files. The only real change is that last week the Excel files jumped in size to about double or triple what they had been when it worked flawlessly.

So, I'm thinking, maybe there is a task getting ahead of itself or something. I thought, maybe a task to run a 1 or 2 second timer to give SSIS a chance to ensure it can "catch its breath" before continuing on to the next task might alleviate this issue. Maybe, I thought, my Excel files are getting too big for SSIS to handle so much at one time. Maybe even, if there is such a setting, something to tell SSIS to slow down a mite.

I guess I could gin up a script to just run a loop to account for a couple of seconds delay, since there doesn't seem to be a timer task in the tooolbox, but I wonder if my hunch is even correct, before I embark on this adventure.

Any ideas?

how to avoid extra commas while loading text file to sql server using ssis

$
0
0

Hi I have one doubt in ssis
how to load extra commaseparate rows in ssis
I want load text file data load into in sql server table 
in emp.txt files have data like below 
id,name,sal,deptno
1,ab,10,20
2,b,20,30
3,h,y,30,50
4,x,40,50
6,ab,xy,30,50

sql server table :
table emp:(id int,name varchar(50),sal money,deptno int)
id,name,sal,deptno

based on text file I want load data into sql server table like below
id |name | sal | deptno
1, |ab   |10   |20
2  |b    |20   |30
3  |h,y  |30   |50
4  |x    |40   |50
6  |ab,xy|30   |50

I tried like below 



but name values came into sal column

can you please tell me how to achieve this task to avoid extra comms in ssis 





'For Each Loop' won't accurately process files of different structure inside a folder.

$
0
0

My problem is,

The folder contains multiple files and most of them have same number of sheets in them (which are being easy to load using a for each loop) However there are a few files that have extra sheets in them and 'for each loop' won't fetch the extra sheets while processing all the files in the folder. (More info: the names of additional sheet won't change and will always remain the same)

I'm wondering if there could a special conditional expressions that can be applied and fetch the additional sheet that is missing when using 'for each loop' to process all the files at once. 

'for each loop' processes files with a standard no. of sheets but not according to the actual no. of sheets in a file(which differs from file to file) 

Please shed some light. 

Thanks in advance.

Not valid path executing JOB

$
0
0

Hello

I have a problem executing a job that contains an SSIS package, which copies data from SQL SERVER to an existing Excel file. When executing the package I have no problems, the error occurs when it is executed through the JOB. I have already made the following instructions and it still does not work:

• The JOB is executed with a proxy

• The Excel file is in a shared folder which has all the permissions of the proxy account

• The sql agent service is logged on as a local system

• in SSIS package delayvalidation = true both in the Excel connection and in the data flow

I have done all the above and the package still does not work

The errors that appear are the following:

Package error: SSIS error code DTS_E_OLEDBERROR OLE DB error code 0x80004005 Y:\ test.xlsx is not a valid path.

SSIS error code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER CODE 0XC0202009

Please help me

Regards


Is usage of the "Table lock" checkbox in a new "OLE DB Destination" component desirable?

$
0
0

Is usage of the "Table lock" checkbox in a new "OLE DB Destination" component desirable?

Our SQL Server 2012 database sometimes issues message upon action of SSMS refresh the list of table names:

Lock request time out period exceeded. (Microsoft SQL Server, Error: 1222)

I wondered if choice of this Table lock" checkbox in a new "OLE DB Destination" component is related to this ?

Ole Db source getting failed

$
0
0

Have question,

Till today my SSIS package was working correctly or without any issue. 

My SSIS package is pulling the data using OLEDB Sources and dumping to .txt file then using FTP connection to send file to FTP Server, now I can able to pull the data but the PACKAGE is being stopped at after pulling the data also getting RED X mark on OLE DB Source. Below Image and error are attached. Please advice.

File is been created and I can open it and can see data too.

package "C:\Users\Package.dtsx" starting.
Information: 0x4004300A at Data Flow Task, SSIS.Pipeline: Validation phase is beginning.
Information: 0x4004300A at Data Flow Task, SSIS.Pipeline: Validation phase is beginning.
Warning: 0x80049304 at Data Flow Task, SSIS.Pipeline: Warning: Could not open global shared memory to communicate with performance DLL; data flow performance counters are not available.  To resolve, run this package as an administrator, or on the system's console.
Information: 0x40043006 at Data Flow Task, SSIS.Pipeline: Prepare for Execute phase is beginning.
Information: 0x40043007 at Data Flow Task, SSIS.Pipeline: Pre-Execute phase is beginning.
Information: 0x402090DC at Data Flow Task, Flat File Destination [2]: The processing of file "D:\NightlyFeedToSalsify.csv" has started.
Information: 0x4004300C at Data Flow Task, SSIS.Pipeline: Execute phase is beginning.
Error: 0xC0202009 at Data Flow Task, OLE DB Source [111]: 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: "Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >,>= or when the subquery is used as an expression.".
Error: 0xC0047038 at Data Flow Task, SSIS.Pipeline: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on OLE DB Source returned error code 0xC0202009.  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.
Information: 0x40043008 at Data Flow Task, SSIS.Pipeline: Post Execute phase is beginning.
Information: 0x402090DD at Data Flow Task, Flat File Destination [2]: The processing of file "D:\NightlyFeedToSalsify.csv" has ended.
Information: 0x4004300B at Data Flow Task, SSIS.Pipeline: "Flat File Destination" wrote 21619 rows.
Information: 0x40043009 at Data Flow Task, SSIS.Pipeline: Cleanup phase is beginning.
Task failed: Data Flow Task

Thank you

SSIS using nested selects

$
0
0

I need to use nested selects in SSIS lookup query - the problem is the inner query takes one param and outer query takes one param... so, I have to use two reftables which is throwing an error... any idea to fix it OR any other alternative.

Basically one param is used by inner query and the results are used by outer query with another param...

xp_cmdshell @sql1 it is not working in linux server.can you help me out on export sql server result set on lenux server

$
0
0
select @sql1='  bcp "select * from '+@USERNAME+@SPID+'" queryout C:\abc\'+@filename+'hf.csv /SDESKTOP-FA0SFCN /c /t, -T -S'
exec master..xp_cmdshell @sql1

Microsoft.SqlServer.XEvent.Configuration.dll gets exceptioncode 0xc0000409 when executing SSIS package

$
0
0

Hello,

when executing an SSIS package on a virtual machine set up as following:


Windows Server 2016 v 1607 (OS Build 14393.2248)

SQL Server 2016 Enterprise with Service Pack 1 v13.0.4466.4

Integration Services v13.0.4001


I get the following exception:


Faulting application name: dtexecui.exe, version: 13.0.1601.5, time stamp: 0x572453d7

Faulting module name: Microsoft.SqlServer.XEvent.Configuration.dll, version: 2015.130.1601.5, time stamp: 0x57244e3d

Exception code: 0xc0000409

Fault offset: 0x0000dec7

Faulting process id: 0xc20

Faulting application start time: 0x01d4b3d557c938d3


followed by:


Fault bucket 116384339059, type 5

Event Name: BEX

Response: Not available

Cab Id: 0



Problem signature:

P1: dtexecui.exe

P2: 13.0.1601.5

P3: 572453d7

P4: Microsoft.SqlServer.XEvent.Configuration.dll

P5: 2015.130.1601.5

P6: 57244e3d

P7: 0000dec7

P8: c0000409

P9: 00000002

P10: 

Add an SSIS package once an OLE DB Source added

$
0
0
I'm working currently on staging to prepare my data warehouse. I want to have an SSIS package added automatically(with the name of the recently added table(s)) once a table added to my source database to use it for the staging process.Creating an automated job scheduling of SSIS Packages may be a solution but I didn't find any tip about it.

How to call dot net or C# script from SSIS package and load in sql table

$
0
0

Hi Team,

Am storing the data in the format of .zip in sql table. How to extract that column to text format and store in sql table.

Could you please anyone help on this issue.


Thanks Bala Narasimha


Get dataflow programmatically

$
0
0

Hello,

my needs is create a master package who launch package with parametre ( source , destination query , column mapping...)

So I add a script task to update connexion and query in my control flow before data flow.

Can you tell me in this script task in C# how can get dataflow by name ? 

I have faced deadlock issue in job execution.

$
0
0

 I have one ETL package and multiple job execute the same time and getting deadlock issue(Error Message below). Could you help me how to resolve this issue.

Error Message :  15 = RangeI_N ( Insert Key-Range and Null Resource lock). Used to test ranges before inserting a new key into an index

Thanks,

Krishnan


SQLAgent Job Step > Execute SSIS Package > Setting String Variable Value

$
0
0

Good day,

SQLAgent Job Step > Execute SSIS Packaging > Setting String Variable Value

In SQLAgent, set values. I know how to pass/set an INT Variable value but not a STRING, I don't know how to test.

Anyone guide me on passing a string value to the variable. the below worked when the variable was INT but now string

From a value of 1 I now must pass a 2N, is it as simple as '2N' or just 2N ?

Kindly Advise

Regards

DataTools is missing ReportWebService

$
0
0

I am trying to create a SSIS package to call a SSRS report and create a PDF file. I am using the Script Task. In version 2008 there is a ReportWebService that needs to be connected to. I am using Visual Studio DataTools 2017.   When I look to add the ReportWebService, it does not exist. There is a Web Reference but it is greyed out.  How do I connect the ReportWebService to the script task in VSDT 2017? 

Also, does the report URL still use "/reportserver/reportexecution2005.asmx" for the web service or is there a new one for 2017?


Fred

Assembly not found in SSIS Script Component- Random

$
0
0

 have a weird problem. I have a SSIS package with multiple DataFlows and within them I am using a Script component as a destination to write AVRO files. Now for writing these AVRO files, I am using Microsoft.Hadoop.Avro.dll which I do not want to install to GAC and just refer using reflection. There is a cool guide here, which I have been following. Now all that worked in a demo project last week. However, today when I try to incorporate the same in my actual solution, some Dataflows work and everything goes fine but when the same script component is copied over to another dataflow and run using another dataset, it fails saying it can't find the assembly.

Point to note that - there is nothing wrong with the dataset, because the error is "loading the assembly".

Error:System.Reflection.TargetInvocationException:Exception has been thrown by the target of an invocation.--->System.IO.FileNotFoundException:Could not load file or assembly 'Microsoft.Hadoop.Avro, Version=1.1.0.5, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.The system cannot find the file specified.

I am at my wits end to find the reason for this as it is baffling.

Here is the code for reflection that I used and works in one dataflow and not in the other (within the same package)

publicScriptMain(){AppDomain.CurrentDomain.AssemblyResolve+=newResolveEventHandler(CurrentDomain_AssemblyResolve);}publicSystem.Reflection.AssemblyCurrentDomain_AssemblyResolve(object sender,ResolveEventArgs args){string path =@"C:\Program Files\Microsoft SQL Server\130\DTS\Binn\";//@"D:\AVRO Serialize and Deserialize\C#\bin\Debug\";if(args.Name.Contains("Microsoft.Hadoop.Avro")){returnSystem.Reflection.Assembly.LoadFile(System.IO.Path.Combine(path,"Microsoft.Hadoop.Avro.dll"));}if(args.Name.Contains("Newtonsoft.Json")){returnSystem.Reflection.Assembly.LoadFile(System.IO.Path.Combine(path,"Newtonsoft.Json.dll"));}returnnull;}

I have copied the assembly in the DTS\binn folder as my posts have suggested.

How, do I see a log of which paths the SSIS runtime is looking at, when it runs? I do not know what more info I can give because this is really weird but if anyone wants me to put in more details, please let me know and I can edit the question to include more details.

P.S: I also added it to GAC one time and then it worked but I do not want to do that on the server and also the fact that reflection did work in another project

One more details- last week when all dataflows worked in the test solution- It had the target version as 2017, which also showed up against the project name in Visual Studio. So, in the actual project where I have this weird problem of this working in one dataflow and not in the other, I tried to change the target server version to 2017 (from 2016), but the display against the project name still shows 2016. Could this be the problem? But then why does the display name of the project does not change to include 2017 even when change the target server version to 2017?

This is how it is in the solution where it all worked.

ProjectName(SQL Server2017)

And this is how it is in the buggy project

ProjectName(SQL Server2016)

Even changing the targer version to 2017 does nothing to the display but I doubt this to be the problem

Viewing all 24688 articles
Browse latest View live