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

SSIS package SQL Server 2012 Error 0xC02020C4

$
0
0

Hi,

I'm in the middle of upgrading from SQL Server 2005 to SQL Server 2012.  I've migrated all the SSIS packages in BIDS to 2010.  I'm having a problem with one package.

I receive the following error message:

SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on XXXXXX 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.

The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020.

The source destination is a SQL Server 2000 database and is loading the data into SQL Server 2012.  There is only 140,000 rows being extracted from source, the package has about 18 lookup's for the different keys on the destination table.   Previously the package would redirect rows on error to a derived column to add default (I've re-written this and it made no difference by using an ISNULL within a derived column).

If I change the source destination stored procedure to only return the first 5000 rows i.e. TOP 5000 the package is OK, if I run the package within BIDS it is OK.  It will only fail when it is a schedule job.

  • I've tried adjusting the BufferMaxRows and the BufferSize (both up and down) and it makes no difference.
  • I've checked that the server has enough resources available (over 1.0 GB memory, CPU is hardly moving)
  • I've tried changing the provider on the connection to Native Client 10.0

The annoying thing is that the package works OK on the old version, the only difference is the O/S and it is 64 bit.

Please help, it is driving me mad!!!

Jason


Performance when Package calling child package in SQL 2012

$
0
0

Hi,

I'm seeing some strang behaviour with SSIS 2012 concerning calling child packages from a main package.

First let me set the scene: I have several packages loading data. Next to that I also have a master package that reads a table that contains all the names and path's of the different packages to execute. Reading the packagenames works, dynamically calling the packages is no problem, so everthing works, BUT performance is not as I would expect it to be.

Let me explain: When executing a single package from SS Data tools it takes only a few seconds. When I run my master package in ss data tools and call that same package it can take up to 2 minutes to complete succesfully. When I execute the same master package from command prompt with DTEXEC the same child package executes again in only a few seconds.

Anyone any idea's why executing master package in design is that slow, while executing the child package in design, or executing the master package from command prompt is fast?

I have a send problem that I'm still investigating but any tips would be welcome: I want to execute these master packages from a job in SQL Server. Normally I would use the integration services step, but for my first master I need to pass a password to the package so I choose to use Operating System step type. When I execute the dtexec in command prompt (using the same user as the sql server agent account) it works fine. But when I execute the job with exactly the same command it seems to be doing nothing, while the job states that it is executing. (The master pacakge is executed, but the child package isn't started. This is what I get from my logging information I added to the packages)

Regards,

Nico

XML FIle Parsing and validations in SSIS

$
0
0

I was looking for the best way of extracting an xml file in SSIS,

I have a   xml source file with a specific data structure and data types which need to be transformed into a target schema of  sqlserver database    of  a different structure,tthe source file is a complex structure which need to be flattened and validated 

With regards to data validations and business rules  ,how should be the extraction based on ,should we create a XML Schema  with necessary validations ,and reject the files if they don't confirm to the schema,

With regards to changing the structure of the data   of the xml  data ,what is the best way to implement it ,should we implement with XSLT with XML task to flatten the structure  or custom coding with script task in  .net framework,also any specific things to avoid while extracting xml using ssis,i have been following previous experience of other people on this forum complaining about the size of the file.

Thanks



SSIS Card number check

$
0
0

Hi i've come up with the following code for a SSIS script component. My programming is pretty weak so could someone help me and check this for me and let me know if there is a better way of doing it? It basically just looks for a regex in specified columns and nulls them if it finds anything... Thanks! This is to remove any card numbers that get stuck in phone or email columns in a dataflow... I am also getting errors when i try to build it...

Error 1 The type or namespace name 'Wrapper' does not exist in the namespace 'Microsoft.SqlServer.Dts.Pipeline' (are you missing an assembly reference?)

Error 2 The type or namespace name 'Runtime' does not exist in the namespace 'Microsoft.SqlServer.Dts' (are you missing an assembly reference?)

/* Microsoft SQL Server Integration Services Script Component
*  This is CozyRoc Script Component Plus Extended Script
*  Write scripts using Microsoft Visual C# 2008.
*  ScriptMain is the entry point class of the script.*/

using System;
using System.Data;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using Microsoft.SqlServer.Dts.Runtime.Wrapper;
using System.Text.RegularExpressions;

[Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute]
public class ScriptMain : UserComponent
{

    public override void Input0_ProcessInputRow(Input0Buffer Row)
    {
        //Replace each \ with \\ so that C# doesn't treat \ as escape character
        //Pattern: Card matching Switch, Solo, Visa, MasterCard, Discover, American Express
        string sPattern = "^((67\\d{2})|(4\\d{3})|(5[1-5]\\d{2})|(6011))-?\\s?\\d{4}-?\\s?\\d{4}-?\\s?\\d{4}|3[4,7]\\d{13}$";
        string BusinessEmail = Row.BusinessEmail;
        string BusinessPhone = Row.BusinessPhone;
        string HomePhone = Row.HomePhone;
        string MobilePhone = Row.MobilePhone;
        string PersonalEmail = Row.PersonalEmail;
        //Find any matches of the pattern in the string
        Match One = Regex.Match(BusinessEmail, sPattern, RegexOptions.IgnoreCase);
        Match Two = Regex.Match(BusinessPhone, sPattern, RegexOptions.IgnoreCase);
        Match Three = Regex.Match(HomePhone, sPattern, RegexOptions.IgnoreCase);
        Match Four = Regex.Match(MobilePhone, sPattern, RegexOptions.IgnoreCase);
        Match Five = Regex.Match(PersonalEmail, sPattern, RegexOptions.IgnoreCase);

        //If a match is found set field to null
        if (One.Success)
            Row.BusinessEmail = null;
        if (Two.Success)
            Row.BusinessPhone = null;
        if (Three.Success)
            Row.HomePhone = null;
        if (Four.Success)
            Row.MobilePhone = null;
        if (Five.Success)
            Row.PersonalEmail = null;
    }

}


dtutil error code -532459699

$
0
0
Hi all,

We getting the below error when using dtutil to deploy SSIS packages to integration services on another server.

dtutil.exe /FILE "PackageXYZ.dtsx" /DestServer ABC /COPY SQL;"FolderX\PackageXYZ" /Q " exited with code -532459699.

what does this error code mean?

thanks

Not receiving emails through sp_send_dbmail in sql execute task BIDS 2008

$
0
0

HI,

I used sp_send_dbmail in sql execute task to send emails.I want to test the functionality in BIDS before deploy to Dev server.

So when i execute the task,its saying the task executed sucessfully but i am not receving any emails

Exec msdb.dbo.sp_send_dbmail @profile_name ='some value', @recipients =' my email address' ,@subject = 'subject',@body = 'body'

What I am missing?

Thanks,

SSIS changing the case of a string in derived column output

$
0
0

I have a SSIS package which imports data from SQlserver to SQLserver ,am using SSIS 2008.

In have a derived column transformation in middle of the dataflow which is as

(indicator) == "Y" ? "Yes": "No"

The output is coming as YES and NO for some of the rows. and for some of the rows its appearing correctly as "Yes" and "No". The case of the strings is getting changed.

Can anyone help me to fix this problem


SSIS Logging

$
0
0

Hi,

I have enabled SSIS SQL logging on my package for OnInformation event. When I run it on my machine (Windows 7 32-bit), it logs component level log such as row count for data flow tasks.

Example:

"The final commit for the data insertion in "component "xxxxxxxxxxxx" (392)" has started.  "

"component "xxxxxxx" (97)" wrote 1 rows. 

But when I deploy same package to server (Win2008 R2 64 bit) then it logs all other informational messages except above msgs. I did not find anything on google or bing related to this issue.

What is the cause?

Thanks,

Balvinder Singh


SSIS Lookup giving wrong results

$
0
0

I am using SSIS 2008 and I am doing a lookup on a customer table which has like 50K records . I am doing a lookup on the Firstname , lastname & addressid .

In both Source as well as Lookup query

for Firstname & last name lookup columns  I am using lower , ltrim , rtrim  & isnull functions like this lower(ltrim(rtrim(isnull(firstname ,'')))) .

I am doing a Full cache ( as I am doing lookup on 50K records ) .

I am getting duplicates ( I am already having this customer  Firstname = A  , Lastname =  B    addressid =  12345 , again the lookup does not find a match because I get it as a , b , 12345 ) . When I go back to test this record and put a where clause to filter only this particular record it is working fine .

Any help will be greatly appreciated

Thanks,


shek

How to embed SSIS package password in a SQL Job Agent

$
0
0

Hi,

I'm having a problem with saving a password in a SSIS package that is accessing an Oracle database as an external data source.  I experienced the problem that many people have had with the SSIS package not saving the Oracle password as expected.  I successfully saved the Oracle datasource password (Password #1) using the "Encrypt sensitive with password" security setting and then setting a separate/new password (Password #2) for the SSIS package.  I've imported this package into my Integration Services installation, and I can get it to run successfully by manually entering Password #2 when I open the package.

Now I want to pull the SSIS package into a SQL Job Agent, along with some other steps, to run on an automatic schedule.  My question -- how/where do I embed Password #2 (the one for the SSIS package) in the settings for the SQL Job Agent step that I use to run the SSIS package?  The SQL Job Agent step settings box prompts me for Password #2 before it will let me edit settings for the package, but it doesn't save that password.  So when I actually run the whole job, the SSIS package always fails.

Thanks much,

Bill J.

How do I capture @@ROWCOUNT from a stored procedure?

$
0
0

Greetings,

 

I have a stored procedure that does updates.  The sproc is called from an “Exec SQL Task”.  The sproc returns the number of rows that were updated using this technique:

 

RETURN @@ROWCOUNT

 

How do I capture the sproc’s return value (number of rows) in a package-level variable?  I eventually want to log this value.  The sproc is not returning a result set.  I’m new to SSIS so any general guidance would be appreciated.

 

Thanks,

BCB

exporting data to flat PATH

$
0
0

not sure this question should be here.

I'm trying to create a fully qualfying path so that I can drop a flat file into a location on a different server. I have credentials to do it. but I'm not sure how to set up my path/string .

Does anyone know how to do this

example \\100.00.555.00\UE\Im\UE-Document\Watch\Test.txt username password credentials

DTS and SSIS exporting flat file formats.

$
0
0
Hello,

When DTS exports data to flat file the format is the following: (Having for Column 1 and column 3 quotable is checked and for Column 2 not)

"Column1", "Column2", "Column3"
"DataVal1", DataVal2," DataVal3"

In DTS we see that thow Column2 is NOT quotable the header is "Column2" (quotable).

But in SSIS the quotable option is also affecting on header row:

"Column1", Column2, "Column3"
"DataVal1", DataVal2, "DataVal3"

Is there any option to export file in SSIS with DTS format.

Moving Data From one SQL Server to Another in SSIS???

$
0
0

Hello every one,

I have scenario where I need to move one SQL Server As A Tables to another SQL Server As B, both are on different remote systems. When I am trying to configure OLEDB source  for server A, I do not see the Databases under that server which I have provided?? 

Any suggestions on this..

Thanks


Please Help People When they need..!!

Question about extracting data from different. options availabe in OLEDB Source

$
0
0
You cannot vote on your own post
This may seem very simple for many of seasoned SSIS punters. I wanted now for extracting data from OLEDB source we use different options like
- Table Or View
- Table Name Or View Name from variable
- SQL Command
- SQL Command from variable

My question is all there options does the same thing. Why these many number of options. Please let me know.

Smash126


SSIS oledb command error

$
0
0

I have used  oledb command  many time in sevral packages for type one/two updates and inserts. I am running into a strange problem when i use alias to table name in a updates statement. It errors out at the alias name

Error: "Invalid object name 'aliasname' "

example: UPDATE A SET COLUMN1 = ?,COLUMN2 = ? FROM TABLENAME A WHERE COLUMN3 = ?

Is it the way SSIS OLEDB Command works or is the somethng that I am missing???

Started it thinking its a minute job and still digging into it :)

Any help

Triggering Stored Procedure

$
0
0
Need a trigger to run a stored procedure after insert in specific table, if inserted in a specific field a certain value.
For example, have a table of movement and need to be executed a stored procedure when a value is inserted in a specific field. The stored procedure executes movements on all the records from a table, only interests me running on the records containing the value entered in a field in the first table.
I need a trigger, because this stored procedure that is originally used by an application's functionality, and it is performed to reconstruct a totals table by recalculating all lines of movement. Intends to make the recalculation of movements that contain only references to specific values ??entered in the first table, to expedite the process.
I hope I have been explicit, thank you for your help.

Package Dependencies and Dynamic Package Generation.

$
0
0

Hi,

The way my master -child packages are set up is as follows:

1) I have a Excel CSV file which contains: Package Order, Package Name and Package Location.

2) At the start of my master package- I load the packages to execute from the excel file on a sql server table and use a ForEachLoop Container to Execute the child Packages ( I do have a Execute Package Task inside the ForEachLoop Container)

3) The set up above is in working condition.

4) I have several chilld packages whose execution should begin only after some of the packages are execute. ( the execution of packages depend on the execution of other packages) and there are also some packages which can be exectued in pararell.

Guidance:

1) I want to what changes do I need to make in order to implement package dependencies and parallelism in my etl ?

2) Also I want to re-design my package in such a way that it dynamically builds Master Packages containing all Child Packages ( Dynamically generate Master Package in such a way that it shows all child packages with the flow dependencies and parallel --something like dynamic package generator. In that way when I make changes to the file ( add more packages / substract packages I just have to make changes to the file ----NOT load data into the SQL SERVER table) and have a package which will generate a child packages flow execution.

Thanks,

eva


EVA05

VS_ISBROKEN Error After Table Delete

$
0
0

I have an SSIS package that is using a new table in the DataFlow.  The former table has been deleted.  The package runs good on it's own; however, when I run it from the MasterPackage, I get the error below.  I have tried DelayValidation=True, ValidateExternalMetadata = False, BypassPrepare = false but none of them make a difference.  The error message references the deleted table but I do not know where the reference to the table is being held.

Information: 0x4004300A at IMPORT NEW, SSIS.Pipeline: Validation phase is beginning.

Error: 0xC0202009 at IMPORT NEW, BBTA [58]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E37.

An OLE DB record is available. Source: "Microsoft OLE DB Provider for SQL Server" Hresult: 0x80040E37 Description: "Invalid object name 'STAGE.EQUIPMENT'.".

Error: 0xC0202040 at IMPORT NEW, BBTA [58]: Failed to open a fastload rowset for "[he object exists in the database.

Error: 0xC004706B at IMPORT NEW, SSIS.Pipeline: "component "EAIODS" (58)" failed validation and returned validation status "VS_ISBROKEN".

Error: 0xC004700C at IMPORT NEW, SSIS.Pipeline: One or more component failed validation.

Error: 0xC0024107 at IMPORT NEW: There were errors during task validation.


Please Vote &/or "Mark As Answer" if this post is helpful to you. Thanks and happy coding :D

Best Practice - How to Filter Data After Execute SQL Task

$
0
0

 Newbie question:

In my Package I have an Execute SQL task running a stored procedure that populates a table. If the task cannot find a person's date of birth, it sets that column with NULL.

For the records with no DOB, I do not want to continue processing. Instead, I need to put them in a separate table for reporting.

I could to the work inside the stored procedure, but I would like to make it a visible step in the package design.

Ideally, what is the best practice to pull certain records from a table and put them in table A and put the rest in table B?

There is an OnPostExecute event I can use to set up a Data Flow Task to set up the query and move the fields.

Or, in the main Control Flow I can have another Execute SQL task after the first one that does that work. 

Does anyone have suggestions?

Thanks.

Viewing all 24688 articles
Browse latest View live