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

SSIS package does nothing when run from SQL Agent scheduled job

$
0
0
I have created an SSIS package in BIDS 2008 which imports data from 4 different sources (3 SQL Server databases and 1 Sybase database) into a SQL database 2008 R2 for consolidation.

OLE DB provider for Sybase : SQL Anywhere OLE DB  Provider 12.

32-bit ODBC System DSN for each Sybase database is created which works fine when tested and same is referenced in SSIS OLE DB connection managers.

SSIS package is saved on SQL Server via "Save Copy of Package.dtsx As..." with Protection level "Rely on server storage and roles for access control".

When the package is executed from BIDS, data is imported without any errors, but when same package is scheduled to run under SQL Agent, it either fails or does nothing.

If I disable the Sybase control flow from BIDS and redeploy on SQL Server and execute via agent job, it runs fine.

To check the failure when Sybase control flow is there, I have added step to send email notification on package failure with description. Here are the descriptions in from each email:

Message 1: Error code: -1073450996

Error description: One or more component failed validation.

Message 2: Error code: -1073594105

Error description: There were errors during task validation.

Message 3: Error description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "Sybase.cmfDb" failed with error code 0xC0202009.  There may be error messages posted before this with more information on why the AcquireConnection method call failed.

Message 4: Error code: -1073450985

Error description: component "Data Source" (16) failed validation and returned error code 0xC020801C.

Job history message: Executed as user: DOMAIN\Username. The step failed.

Delay Validation is set to True for all data sources.

I already tried the solution from Experts Exchange, but it did not work: http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/Q_27636713.html

Keeping everything same in both BIDS and SQL storage, it works for BIDS and not from agent job. What could be wrong?

Thanks in advance.

In SSIS, insert if new and update if exists .

$
0
0
QuestionHi, I got this problems when i tried to run package : insert if new and update if exists to separate database (New record and change record) . Both updating records and new record were updated to database (new record ), instead of 1 to change record and 1 to new record . My conditions (Conditional Split ) :
  1. New records : Isnull (App_ID) != Isnull (Lkp.App_ID)
  2. Change records : (Is null (App_ID) == Isnull(Lkp.App_ID)) && (Isnull(Customer_name) != Isnull(Lkp.Customer_name) || Isnull(CPC_Center) != Isnull(Lkp.CPC_Center))

Pls help me to slove it .

Many thanks,

Hong

date from a string and int value in ssis

$
0
0

hi so my table is as follows

active      expirymonth     expiryyear

0              oct                         2013

0              feb                            2015

1               jan                        2012
and so on

now my requirement is that if active =0 then in a new table lets say LASTDATE and they want a date with the last day of the expiry month and year  and if active is anything else write NULL for eg

LASTDATE

10/31/2013

02/28/2015

NULL

I went to derived tables and made a new table called lastdate. What expression do i build in the expression builder to get the required result as i could not find a way to convert the text into int and then into a date


SSIS FTP - upload files but only partial

$
0
0

Dear reader,

I need some help with the FTP in SSIS package. Its about uploading files to an FTP server (sending files).

First, I store the .csv locally my drive. Then the file-location is stored in a variable and the variable is being called by the FTP connection manager.

Now, the file has a size of about 27KB. However when uploading the file to the FTP server it only uploads a part of the file around 6KB. Why? When I copy manually the file to the FTP server then it works fine, but via the SSIS it does not work. (Even though with a sleep of about 5 seconds, in case of read-write access is does not work).

Does anybody have a clue why I can not upload the file completely?

Best regards.

SSIS with Oracle Oledb connection not working when a config file is included

$
0
0

Hi,

      I am running a SSIS package which has Oracle OLEDB Connection(32 bit). When I run from the Debug mode without the configuration file, the task completes successfully. But when I include the Orcle OLEDB Connection in the config file and try to run the package, it fails with the following error.

An OLE DB record is available.  Source: "Microsoft OLE DB Service Components"  Hresult: 0x80040E21  Description: "Multiple-step OLE DB operation generated error
s. Check each OLE DB status value, if available. No work was done.".

Is this an encrytion issue? My Package encryption has the property 'EncryptSensitivewithUSerKEy' and no password.

This package does not run the first time after I delete the configuration file from the package.I need to reenter the password for it to work properly.

How should I run my package using the Config file for all the connections(SQL Server connections work file, problem only with the oracle oledb connections).

Please suggest.

Thanks

how to get error row count from flat file destination in data flow?

$
0
0

Hi,

I am redirecting error rows from ole db destination to flat file destination(i have written custom code) , here i need to get error rows count which is redirecting to flat file in data flow task and if count(error rows)>50 then my ssis package should fail.

How can i get error rows count in flat file destination?

how can i get the error description for the same above?

using System.Data;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using Microsoft.SqlServer.Dts.Runtime.Wrapper;
//using Microsoft.SqlServer.Dts.Runtime;

using System.Data.SqlClient;
using System.IO;
[Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute]
public class ScriptMain : UserComponent
{
    string copiedAddressFile = @"D:\test.txt";
    private StreamWriter textWriter;
    private string columnDelimiter = ",";

    public override void AcquireConnections(object Transaction)
    {

        //IDTSConnectionManager100 connMgr = this.Connections.CM_FlatFile;
        //copiedAddressFile = (string)connMgr.AcquireConnection(null);
        //copiedAddressFile = "D:\test.txt";

    }

    public override void PreExecute()
    {
        int count = 0;
        textWriter = new StreamWriter(copiedAddressFile, false);

    }

    public override void Input0_ProcessInputRow(Input0Buffer Row)
    {
        int count = 0;
        count += 1;

        {
            if (!Row.WEEK_IsNull)
            {
                textWriter.Write(Row.WEEK);
            }
            textWriter.Write(columnDelimiter);
            if (!Row.LOCATIONNUMBER_IsNull)
            {
                textWriter.Write(Row.LOCATIONNUMBER);
            }
            textWriter.Write(columnDelimiter);
            if (!Row.TPN_IsNull)
            {
                textWriter.Write(Row.TPN);
            }
            textWriter.Write(columnDelimiter);
            if (!Row.DIVISIONNUMBER_IsNull)
            {
                textWriter.Write(Row.DIVISIONNUMBER);
            }
            textWriter.Write(columnDelimiter);
            if (!Row.DEPARTMENTNUMBER_IsNull)
            {
                textWriter.Write(Row.DEPARTMENTNUMBER);
            }
            textWriter.Write(columnDelimiter);
            if (!Row.SECTIONNUMBER_IsNull)
            {
                textWriter.Write(Row.SECTIONNUMBER);
            }
            textWriter.Write(columnDelimiter);
            if (!Row.GROUPNUMBER_IsNull)
            {
                textWriter.Write(Row.GROUPNUMBER);
            }
            textWriter.Write(columnDelimiter);
            if (!Row.SUBGROUPNUMBER_IsNull)
            {
                textWriter.Write(Row.SUBGROUPNUMBER);
            }
            textWriter.Write(columnDelimiter);
            if (!Row.STYLECODE_IsNull)
            {
                textWriter.Write(Row.STYLECODE);
            }
            textWriter.Write(columnDelimiter);
            if (!Row.EAN_IsNull)
            {
                textWriter.Write(Row.EAN);
            }
            textWriter.Write(columnDelimiter);
            if (!Row.DIFID_IsNull)
            {
                textWriter.Write(Row.DIFID);
            }
            textWriter.Write(columnDelimiter);
            if (!Row.SALES_IsNull)
            {
                textWriter.Write(Row.SALES);
            }
            textWriter.Write(columnDelimiter);
            if (!Row.SALESLW_IsNull)
            {
                textWriter.Write(Row.SALESLW);
            }
            textWriter.Write(columnDelimiter);
            if (!Row.SALESLLW_IsNull)
            {
                textWriter.Write(Row.SALESLLW);
            }
            textWriter.Write(columnDelimiter);
            if (!Row.AVAILABLESTOCK_IsNull)
            {
                textWriter.Write(Row.AVAILABLESTOCK);
            }
            textWriter.Write(columnDelimiter);
            if (!Row.STOCK_IsNull)
            {
                textWriter.Write(Row.STOCK);
            }
            textWriter.Write(columnDelimiter);
            if (!Row.COUNTRY_IsNull)
            {
                textWriter.Write(Row.COUNTRY);
            }
            textWriter.Write(columnDelimiter);
            if (!Row.SOURCE_IsNull)
            {
                textWriter.Write(Row.SOURCE);
            }
            textWriter.Write(columnDelimiter);
            if (!Row.PACKIND_IsNull)
            {
                textWriter.Write(Row.PACKTPN);
            }
            textWriter.Write(columnDelimiter);
            if (!Row.PACKTPN_IsNull)
            {
                textWriter.Write(Row.PACKTPN);
            }
                      
            textWriter.WriteLine();
           
        }

    }

    public override void PostExecute()
    {

        textWriter.Close();

    }

}
This is the code ii have written inside script component(destination from ole db destination) in data flow

Please help me


DTS Package failing when running from 2000 SQL Server Agent Jobs. Both dts and sql jobs are in 'sa'

$
0
0

Executed as user: OLDDATABASE\SYSTEM. DTSRun:  Loading...   DTSRun:  Executing...   DTSRun OnStart:  DTSStep_DTSExecuteSQLTask_1   DTSRun OnStart:  DTSStep_DTSDataPumpTask_1   DTSRun OnFinish:  DTSStep_DTSExecuteSQLTask_1   DTSRun OnError:  DTSStep_DTSDataPumpTask_1, Error = -2147467259 (80004005)      Error string:  Error opening datafile: Access is denied.         Error source:  Microsoft Data Transformation Services Flat File Rowset Provider      Help file:  DTSFFile.hlp      Help context:  0      Error Detail Records:      Error:  5 (5); Provider Error:  5 (5)      Error string:  Error opening datafile: Access is denied.         Error source:  Microsoft Data Transformation Services Flat File Rowset Provider      Help file:  DTSFFile.hlp      Help context:  0      DTSRun OnFinish:  DTSStep_DTSDataPumpTask_1   DTSRun:  Package execution complete.  Process Exit Code 1.  The step failed.

ANY HELP VERY APPRECIATED!

SSIS Programming- How to declare a variable of type Object?

$
0
0
Hello, I have a very specific coding question. I am trying to create a pkg using SSIS Object model. I am trying to create a variable of type Object. But I could not find any reference in KB or forums on creating variable of this data type.

Example:
// Create the package.
Application a = new Application();
Package p = new Package();
p.Name = "MyDataExtractPkg";

//Add Variables to the pkg
Variables pkgVars = p.Variables;
.....
.....
Variable var8 = p.Variables.Add("varHour", false, "User", (System.Int16)0);
Variable var9 = p.Variables.Add("varHourDiff", false, "User", 0);
Variable var10 = p.Variables.Add("varIntervalWaitInMS", false, "User", 5000);
Variable var11 = p.Variables.Add("varJobCnt", false, "User", 0);
Variable var12 = p.Variables.Add("varjobID", false, "User", 0);
Variable var13 = p.Variables.Add("varJobRS", false, "User", (System.Object)0);
Variable var14 = p.Variables.Add("varProcessDate", false, "User", "abc");

As you can see I was able to successfully variables of Type Int16, Int32(default) & String.
But I need to create a variable of type Object for "varJobRS" and above code is generating int. Appreciate any direction or help on how to create Object variable type.


Thanks,
DW Guy


Order of package configurations

$
0
0
In the package configurations window, I see that I can select the order in which the configurations will be loaded when the package runs. What is the need for to have an order option in SSIS, ie use cases ? 

SSIS package exclusive lock on source table

$
0
0

I have created a package that copies data from one table to another table on a different server. When I run the package, most of the time it runs for a while and then hangs.  I am using the method found in this website: http://blogs.msdn.com/b/jorgepc/archive/2010/12/07/synchronize-two-tables-using-sql-server-integration-services-ssis-part-i-of-ii.aspx for synchronizing the tables.  In BIDS as I am watching the execution of the package all objects turn Yellow in the Data Flow window and the counts do increase till it hangs.  Then the counts stop.

I have run the SQL Server "Resource Locking Statistics by Objects" report on the source server/database and it reports there are two locks on that table by my userid at the time I am running the package (a page lock and a object lock).  All I am doing with the table is reading it.  In the package the OLE BD Source(SQL Server Native Client 10.0) I am using a query "select * from table where id between ? and ?".  "id" is an identity column and a clustered index.

This package does work once in a while.  There was never any problems in the Development environment.  This is occurring in Production where another application is writing data to the table all day long.  The Development environment did not have another app running at the same time.

The package also copies 6 other tables with no problem.  The problem table is larger (more columns) than the other tables.

Any ideas of what the problem might be?

Fred


Fred Schmid



SSIS - Change Config File Path LOCATION in SQL Agent Job Step (NOT USING DTEXEC)

$
0
0

SSISers;

I am not new to ssis but am trying to deal with promoting of ssis config files differently for a specific project. We are using SQL 2008 R2.

As a standared pattern used for years, we just use SQL Agent, build a job step for the ssis package, add the ssis package as SQL Integration Services Package type from fileshare (not using Integration Services), and add the necessary production config files in the configutation tab of the job step. Easy.  We do not execute our packages with DTEXEC command line.

A new project has the developers leaving the config files in the package - not removing the config files for deployment. Is there a way to override JUST THE CONFIG FILE PATH LOCATION in the job step for ssis package? Remember, we are NOT using dtexec.  I was told that /SET might do it but I do not see a good example anywhere of hooking this in and how it works for a CONFIG FILE PATH LOCATION - I see variable overrides but not CONFIG FILE PATH LOCATION. The packages were written with Absolute config file path and not Relative path.

Please understand that my goal is to let them leave the packages as is, we move the config files to the production sever and all we have to do is flip the location of where the config files are sitting for the ssis pacakge to look for them.  We would rather NOT have to use DTEXEC command  line with the job step for reasons that I do no need to get into on this forum.

Any suggestions are appreciated.


Deployment - configure executables ?

$
0
0

I am trying to make a deployment file for one package. Under executables, there are some sequence containers. The structure is like this - 

Executables > Sequence Container > Variables, Properties, Executables (call it sub-executable)

Under sub-executable, I see the tasks which in turn have the structure: 

eg. For loop > Task > Executables > Variables >  Properties > Enumerator properties. 

I only use global variables. So, I don't see why I should have to configure any of these executables. Am I missing something here ? Why is there a configuration option for these executables when all variables, connections etc are already configured/checked ?


SQL Agency Job Fails on Schedule, Successful if manually run from Job Agent

$
0
0

I get the following error when the job runs at it's scheduled time:

Message
Executed as user: D*****\FINNS025. Microsoft (R) SQL Server Execute Package Utility  Version 10.50.1600.1 for 64-bit  Copyright (C) Microsoft Corporation 2010. All rights reserved.    Started:  12:45:00 AM  Error: 2014-01-15 00:45:07.64    Code: 0xC0029151     Source: Execute Process Task Execute Process Task     Description: In Executing "C:\Program Files\Microsoft SQL Server\90\DTS\Packages\Export2.bat" "" at "", The process exit code was "2" while the expected was "0".  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  12:45:00 AM  Finished: 12:45:07 AM  Elapsed:  7.015 seconds.  The package execution failed.  The step failed.


When I run the job from SQL Agent (right click, ""Start Job"), it is successful.

Any ideas what could be causing this issue?

Thanks,


Susan


Susan

SSIS Deploy package - Too many configurables - how to do quickly ?

$
0
0

I am trying to create a deployment config/file for package. I have many configurables like variables, connection managers etc. For variables, I only want to configure the value and nothing else. I don't want to go to each variable and then click the checkbox for that. Is there a quicker way of configuring the package for deployment ?

Become our FIRST Microsoft TechNet SSIS Guru of 2014!!

$
0
0

Happy New Year!

Time for a fresh start!

We're looking for the first Gurus of 2014!!

This is your chance to make your mark on the Microsoft developer community.

All you have to do is add an article to TechNet Wiki from your own specialist field. Something that fits into one of the categories listed on the submissions page. Copy in your own blog posts, a forum solution, a white paper, or just something you had to solve for your own day's work today.

Drop us some nifty knowledge, or superb snippets, and become MICROSOFT TECHNOLOGY GURU OF THE MONTH!

This is an official Microsoft TechNet recognition, where people such as yourselves can truly get noticed!

HOW TO WIN

1) Please copy over your Microsoft technical solutions and revelations toTechNet Wiki.

2) Add a link to it on THIS WIKI COMPETITION PAGE (so we know you've contributed)

3) Every month, we will highlight your contributions, and select a "Guru of the Month" in each technology.

If you win, we will sing your praises in blogs and forums, similar to the weekly contributor awards. Once "on our radar" and making your mark, you will probably be interviewed for your greatness, and maybe eventually even invited into other inner TechNet/MSDN circles!

Winning this award in your favoured technology will help us learn the active members in each community.

Feel free to ask any questions below.

More about TechNet Guru Awards

Thanks in advance!
Pete Laker


#PEJL

Got any nice code? If you invest time in coding an elegant, novel or impressive answer on MSDN forums, why not copy it over to the one and onlyTechNet Wiki, for future generations to benefit from! You'll never get archived again!

If you are a member of any user groups, please make sure you list them in the Microsoft User Groups Portal. Microsoft are trying to help promote your groups, and collating them here is the first step.



SSIS expression for 1st monday of the month

$
0
0

please post SSIS expression for 1st monday of the month.

Format: yyyy-mm-dd


s

Manifest Deployment Fails

$
0
0

Hi,

I had a working SSIS package deployment methodoligy (double clicking on the manifest file) and suddently it's not working.  I'm running SSIS as administrator and get the error below.

TITLE: Package Installation Wizard
------------------------------
You need to specify the full path to a SSIS deployment manifest file.

When I remote into the Server, I can get the Wizard to run and deploy the package; however, I think there is an encryption error as nothing is actually processes when I run the associated job.  

SSIS won't generate deployment files

$
0
0

I enabled building of deployment by - MySolution > right click > properties > CreateDeploymentUtility = True, DeploymentOutputPath = bin\Deployment > Apply > OK.

Then, SSIS > Build > Build MySolution.

I went to the above folder (under visual studio 2008 projects) and saw nothing there. why is this happening and how do I fix it ?

read from sql task and send to data flow task - [OLE DB Source [1]] Error: A rowset based on the SQL command was not returned by the OLE DB provider.

$
0
0

I have created a execut sql task -

In that, i have a created a 'empidvar' variable of string type and put sqlstatement = 'select distinct empid from emp'

Resultset=resultname=0 and variablename=empidvar

I have added data flow task of ole db type and I put this sql statement under sql command - exec emp_sp @empidvar=?

I am getting an error.

[OLE DB Source [1]] Error: A rowset based on the SQL command was not returned by the OLE DB provider.

[SSIS.Pipeline] Error: component "OLE DB Source" (1) failed the pre-execute phase and returned error code 0xC02092B4.

Package deployment error - change connection string to SQLNCLI10 or find and install support for SQLNCLI.1 ?

$
0
0

I tried to run a package under SQL server agent. Most of my error messages  indicate that I have to - change connection string to SQLNCLI10 or find and install support for SQLNCLI.1. 

I need to know the meaning of this error. Is it as simple as installing a driver and registering it or is it more than just drivers. Could there be non-driver related reasons for this problem ? 

Thanks.

Full error -

Code: 0xC0209302     Source: MyPackage Connection manager "MyOleDBConnection"     Description: SSIS Error Code DTS_E_OLEDB_NOPROVIDER_ERROR.  The requested OLE DB provider SQLNCLI.1 is not registered. 
Error code: 0x00000000.  An OLE DB record is available.  Source: "Microsoft OLE DB Service Components"  Hresult: 0x80040154  Description: "Class not registered".  
End Error  

Code: 0xC020F42A     Source: MyPackage Connection manager "MyOleDBConnection"     Description: Consider changing the PROVIDER in the connection string to SQLNCLI10 or 
visit http://www.microsoft.com/downloads to find and install support for SQLNCLI.1.  
End Error  

Code: 0xC020801C     Source: MyPackage Log provider "SSIS log provider for SQL Server"     Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  
The AcquireConnection method call to the connection manager "MyOleDBConnection" failed with error code 0xC0209302.  
There may be error messages posted before this with more information on why the AcquireConnection method call failed.  
COM error object information is available.  Source: "MyPackage"  error code: 0xC0209302  
Description: "Consider changing the PROVIDER in the connection string to SQLNCLI10 or 
visit http://www.microsoft.com/downloads to find and install support for SQLNCLI.1.  ".  
End Error  

Code: 0xC0209302     Source: MyPackage Connection manager "MyOleDBConnection"     Description: SSIS Error Code DTS_E_OLEDB_NOPROVIDER_ERROR.  
The requested OLE DB provider SQLNCLI.1 is not registered. Error code: 0x00000000.  
An OLE DB record is available.  Source: "Microsoft OLE DB Service Components"  Hresult: 0x80040154  Description: "Class not registered".  
End Error  

Code: 0xC020F42A     Source: MyPackage Connection manager "MyOleDBConnection"     Description: Consider changing the PROVIDER in the connection string to SQLNCLI10 or 
visit http://www.microsoft.com/downloads to find and install support for SQLNCLI.1.  
End Error  

Code: 0xC020801C     Source: DFT Insert Execution Log OLE_DST Insert SSIS Execution Log [25]     Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  
The AcquireConnection method call to the connection manager "MyOleDBConnection" failed with error code 0xC0209302.  
There may be error messages posted before this with more information on why the AcquireConnection method call failed.  
End Error  

Code: 0xC0047017     Source: DFT Insert Execution Log SSIS.Pipeline     Description: component "OLE_DST Insert SSIS Execution Log" (25) failed validation and returned error code 0xC020801C.  
End Error  

Code: 0xC004700C     Source: DFT Insert Execution Log SSIS.Pipeline     Description: One or more component failed validation.  
End Error  

Code: 0xC0024107     Source: DFT Insert Execution Log      Description: There were errors during task validation.  
End Error  

DTExec: The package execution returned DTSER_FAILURE (1). 


Viewing all 24688 articles
Browse latest View live


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