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

mssql2012 SSIS deployment error: Could not fined Source.conmgr file

$
0
0

Techies--

I'm deploying a colleague's project today which includes 60+ packages.  I suspect "Source.conmgr" was probably a default early on that was deleted. Is there an quick way to determine which package may still be referencing this?  Unfortunately the message shows up in the build on one of the key calling packages that invokes the others...


Can't attach client certificate to Http connection manager

$
0
0
I'm trying to consume a web service using a web service task in SSIS. The connection is https and I have a certificate in the trust store to enable the connection. I am trying to add the certificate to an Http connection manager, but every time I click the certificate button, I get a dialog box which says 'No certificates meet the application criteria'. How can I fix this?

SSIS custom execute sql task : Failed with error

$
0
0

I am developing a custom SSIS task for running sql task. But it fails with error - I'm trying to set the resultsetbinding to be used by next task in workflow.

Error: 0xC0014054 at CustomSSISTask: Failed to lock variable "User::id" for read access with error 0xC0010001 "The variable cannot be found. This occurs when an attempt is made to retrieve a variable from the Variables collection on a container during execution of the package, and the variable is not there. The variable name may have changed or the variable is not being created.".
Error: 0xC002F210 at CustomSSISTask, Execute SQL Task: Executing the query "SELECT id FROM sysobjects WHERE name = 'sysrowsets..." failed with the following error: "Failed to lock variable "User::id" for read access with error 0xC0010001"The variable cannot be found. This occurs when an attempt is made to retrieve a variable from the Variables collection on a container during execution of the package, and the variable is not there. The variable name may have changed or the variable is not being created.".
". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Warning: 0x80019002 at CustomSSISTask: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED.  The Execution method succeeded, but the number of errors raised (3) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
Task failed: CustomSSISTask

Here is the code sample I'm trying , 

                

        public override DTSExecResult Execute(Connections connections, VariableDispenser variableDispenser,
                                              IDTSComponentEvents componentEvents, IDTSLogging log, object transaction)
        {
            MessageBox.Show("testing:");

            try
            {
                // Add the SQL Task
                Package package = new Package();
                package.Executables.Add("STOCK:SQLTask");

                Microsoft.SqlServer.Dts.Runtime.Variable variable = package.Variables.Add("id", false, "User", 0);
                 // Get the task host wrapper

                TaskHost taskHost = package.Executables[0] as TaskHost;


                // Get the task object
                ExecuteSQLTask task = taskHost.InnerObject as ExecuteSQLTask;

                // Set core properties

                task.Connection = connections[0].Name;

                task.SqlStatementSource = "SELECT id FROM sysobjects WHERE name = 'sysrowsets'";
                //task.SqlStatementSource =
                //    "SELECT PersonID from [AmalgaSpeedTableData].[SpeedTable].[DimPerson] where PersonIntID  = '1'";

                task.SqlStatementSourceType = SqlStatementSourceType.DirectInput;

                // Add result set binding, map the id column to variable
                IDTSResultBinding resultBinding = task.ResultSetBindings.Add();
                //IDTSResultBinding resultBinding = task.ResultSetBindings.GetBinding(0);
                resultBinding.ResultName = "variable";
                resultBinding.DtsVariableName = variable.QualifiedName; //"User::id";

                task.Execute(connections, variableDispenser, componentEvents, log, transaction);

            }
            catch (Exception ex)
            {
                throw new ArgumentException(ex.Message);
            }

            return DTSExecResult.Success;

}

It doesnt throw any exception but custom task fails.

Later I will be also using parametersetbindings to pass some input parameters to this task , since I'm stuck for out param - blocked moving ahead.

Any help would be greatly appreciated.

Thanks

Sang

Restore Cube task in SSIS returns "The connection either timed out or was lost." error

$
0
0

We are experiencing a very strange issue with one of our systems. This happened only twice over last few months.

When processing the "restore cube" step we received an error message saying: "The connection either timed out or was lost." However the cube completed restore process successfully and data was available.

Our SSAS cube is processed by the SSIS package, at the final step the cube is backed up and then backup restored to the target destination where it's available for users. Basically it's a "Analysis Services Execute DDL Task" with xml command <Restore xmlns= .....>

We cannot reproduce this problem. Is there any way to determine what was the reason for the failure? It causes unnecessary error mails to be triggered and sent to many people in the firm.

After the first occurrence of the problem we adjusted the cube connection timeout setting from 60 to 600 seconds, it seems it didn't help.

Connection Manager: login failed

$
0
0

I'm trying to use the destination assistant in an SSIS project in Visual Studio v2010 to configure a database to hold fields from a flat file source.  I select the Native OLE DB/SQL Server Native Client 11.0 as a provider.  No connections show up in the connection manager.

I select 'MSSQL2008_R2', but there are no databases listed there even though I have several databases showing up in SSMS.  I've double checked the database name and connections; I've got windows authentication set as the authentication method.  I am listed in these databases as dbo and I'm an SA user.

Is there another step I need to enable the OLE DB connection from SSMS?

Designing packages by code using parallelism

$
0
0

I have create a package generator for out company by which we would like to generate packages dynamically. Generator is based on Microsoft.SQLServer.ManagedDTS

All was fine until I have started to call my generator from parallelly from threads which were totally separated.

Example:

using System;
using Microsoft.SqlServer.Dts.Runtime;

public class Program
{
    static void Main()
    {
        //for(int i = 0; i<1000; i++)
        //{
        //    packageGenerator.CreatePackage();
        //    Console.WriteLine("package #{0} was built",i);
        //}

        System.Threading.Tasks.Parallel.For(0, 1000, i =>
        {
            var packageGenerator = new PackageGenerator();
            packageGenerator.CreatePackage();
            Console.WriteLine("package #{0} was built", i);
        }
        );
    }
}

class PackageGenerator
{
    public void CreatePackage()
    {
        var package = new Package();

        var connectionManager = CreateConnectionManager(package);
    }

    private ConnectionManager CreateConnectionManager(Package package)
    {
        const string name = "AnyName";

        
        if (package.Connections.Contains(name))
            return package.Connections[name];

        var cm = package.Connections.Add("ADO.NET:SQL");
        cm.ConnectionString = "Data Source=localhost;User ID=myAccout;Initial Catalog=myDb;Application Name=Empty;";
        cm.Name = name;

        return null;
    }
}


Since that time I'm ramdomly getting One of those exceptions:

  • An unhandled exception of type 'System.StackOverflowException' occurred in Microsoft.SQLServer.ManagedDTS.dll
  • Creating an instance of the COM component with CLSID {17BCA6E8-A95D-497E-B2F9-AF6AA475916F} from the IClassFactory failed due to the following error: c0010009.
  • The connection type "ADO.NET:SQL" specified for connection manager "{732F7B58-06C5-4443-B894-5DF4C2E42CFC}" is not recognized as a valid connection manager type. This error is returned when an attempt is made to create a connection manager for an unknown connection type. Check the spelling in the connection type name.

Any idea what s wrong?

Script task fails to send mail to GMAIL

$
0
0

Hi   guys ,

   I am new here and i am glad i that i am here.  I am working in a company  as SQL Server developer(T-sql), i am learning SSIS because  i wanted to move to data warehousing.

I not familiar and i don't know any thing about  C#,  but i am learning SSIS on my own.

I tried to send mail to gmail  using script task , both sender and receiver with same mail ID using variables which i tried using tutorial i found from the below link.

[quote]http://www.codeproject.com/Articles/85172/Send-Email-from-SSIS-with-option-to-indicate-Email[/quote]

but finally when i execute the task , it returns failure message and email is not sent.

[quote]SSIS package "Send mail using script task.dtsx" starting.
Error: 0x8 at Script Task: The script returned a failure result.
Task failed: Script Task
SSIS package "Send mail using script task.dtsx" finished: Success.
[/quote]

Below message taken from progress tab

[quote]Error: The script returned a failure result.[/quote]

Can you all please help me in  finding where i am going wrong? please check below code which i have used in script task.

/*
   Microsoft SQL Server Integration Services Script Task
   Write scripts using Microsoft Visual C# 2008.
   The ScriptMain is the entry point class of the script.
*/

using System;
using System.Data;
using Microsoft.SqlServer.Dts.Runtime;
using System.Windows.Forms;
using System.Text.RegularExpressions;
using System.Net.Mail;

namespace ST_9bc84810a62a401aa44ddd905bcd369d.csproj
{
    [System.AddIn.AddIn("ScriptMain", Version = "1.0", Publisher = "", Description = "")]
    public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
    {

        #region VSTA generated code
        enum ScriptResults
        {
            Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
            Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
        };
        #endregion

        /*
		The execution engine calls this method when the task executes.
		To access the object model, use the Dts property. Connections, variables, events,
		and logging features are available as members of the Dts property as shown in the following examples.

		To reference a variable, call Dts.Variables["MyCaseSensitiveVariableName"].Value;
		To post a log entry, call Dts.Log("This is my log text", 999, null);
		To fire an event, call Dts.Events.FireInformation(99, "test", "hit the help message", "", 0, true);

		To use the connections collection use something like the following:
		ConnectionManager cm = Dts.Connections.Add("OLEDB");
		cm.ConnectionString = "Data Source=localhost;Initial Catalog=AdventureWorks;Provider=SQLNCLI10;Integrated Security=SSPI;Auto Translate=False;";

		Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
		
		To open Help, press F1.
	*/

        public void Main()
        {
            string sSubject = "Test Subject";
            string sBody = "Test Message";
            int iPriority = 2;

            if (SendMail(sSubject, sBody, iPriority))
            {
                Dts.TaskResult = (int)ScriptResults.Success;
            }
            else
            {
                //Fails the Task
                Dts.TaskResult = (int)ScriptResults.Failure;
            }
        }

        public bool SendMail(string sSubject, string sMessage, int iPriority)
        {
            try
            {
                string sEmailServer = Dts.Variables["sEmailServer"].Value.ToString();
                string sEmailPort = Dts.Variables["sEmailPort"].Value.ToString();
                string sEmailUser = Dts.Variables["sEmailUser"].Value.ToString();
                string sEmailPassword = Dts.Variables["sEmailPassword"].Value.ToString();
                string sEmailSendTo = Dts.Variables["sEmailSendTo"].Value.ToString();
                string sEmailSendCC = Dts.Variables["sEmailSendCC"].Value.ToString();
                string sEmailSendFrom = Dts.Variables["sEmailSendFrom"].Value.ToString();
                string sEmailSendFromName = Dts.Variables["sEmailSendFromName"].Value.ToString();

                SmtpClient smtpClient = new SmtpClient();
                MailMessage message = new MailMessage();

                MailAddress fromAddress = new MailAddress(sEmailSendFrom, sEmailSendFromName);

                //You can have multiple emails separated by ;
                string[] sEmailTo = Regex.Split(sEmailSendTo, ";");
                string[] sEmailCC = Regex.Split(sEmailSendCC, ";");
                int sEmailServerSMTP = int.Parse(sEmailPort);

                smtpClient.Host = sEmailServer;
                smtpClient.Port = sEmailServerSMTP;

                System.Net.NetworkCredential myCredentials =
                   new System.Net.NetworkCredential(sEmailUser, sEmailPassword);
                smtpClient.Credentials = myCredentials;

                message.From = fromAddress;

                if (sEmailTo != null)
                {
                    for (int i = 0; i < sEmailTo.Length; ++i)
                    {
                        if (sEmailTo[i] != null && sEmailTo[i] != "")
                        {
                            message.To.Add(sEmailTo[i]);
                        }
                    }
                }

                if (sEmailCC != null)
                {
                    for (int i = 0; i < sEmailCC.Length; ++i)
                    {
                        if (sEmailCC[i] != null && sEmailCC[i] != "")
                        {
                            message.To.Add(sEmailCC[i]);
                        }
                    }
                }

                switch (iPriority)
                {
                    case 1:
                        message.Priority = MailPriority.High;
                        break;
                    case 3:
                        message.Priority = MailPriority.Low;
                        break;
                    default:
                        message.Priority = MailPriority.Normal;
                        break;
                }

                //You can enable this for Attachments.  
                //SingleFile is a string variable for the file path.
                //foreach (string SingleFile in myFiles)
                //{
                //    Attachment myAttachment = new Attachment(SingleFile);
                //    message.Attachments.Add(myAttachment);
                //}

                message.Subject = sSubject;
                message.IsBodyHtml = true;
                message.Body = sMessage;

                smtpClient.Send(message);
                return true;
            }
            catch (Exception ex)
            {
                return false;
            }
        }
    }
}

Please help me resolve this guys ... THANKS IN ADVANCE

 

  

SSIS Conditional Split: Incompatible Data Types

$
0
0

Hey everyone,

I'm new to using conditional splits and I was hoping the community could help me out. My SSIS package imports data from an excel worksheet into a SQL Server destination table.  

I'm trying to implement a conditional split that checks for Non-NULL values.

I'm using the following logic:

LEN(MaptToType) > 0 ? 1 : 0 == 1

SSIS keeps telling me that I cannot compare DT_I4 and DT_WSTR without first casting my values to an appropriate format. I've tried different variations of my Condition such as

LEN(MaptToType) >0 ? "Pass" : "Fail" == "Pass" 

I keep getting the same error message though.

 NOTE: I've tried using ISNULL

(ISNULL(MaptToType) ? 0 : 1) == 1

But when I run my package, no records are matched. There are at least 5 records that are not null in my excel worksheet that I am pulling this data from.

Any help would be greatly appreciated. Thanks everyone!


Insert to data from SQL ssis package to SharePoint list people or group column

$
0
0

When I am trying to insert to data from SQL ssis package to SharePoint list people or group column I am getting below error.

[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "SharePoint List Destination" (25) failed with error code 0x80131500 while processing input "Component Input" (34). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.  There may be error messages posted before this with more information about the failure.

look is retrieving only one record

$
0
0

I’m trying pull data from prod server and dump it  into local server . below is  the package I created

In excel source. I’m placing a  record ID ..say  ‘a123-b456-789’ ( nvarchar)

Look up: it wil search  for the record ‘a123-b456-789’ in the table “ employee”

Destination:  is my local system.

empid

empname

account

a123-b456-789’

XYZ

RAM

a123-b456-789’

PQR

sun

a123-b456-789’

ABC

Rock

Issue  :  there are 10 rows in the employee table related the ida123-b456-789’ . but it is  getting only one record per execution .

Expected result : if there are 10 records then it should fetch 1o records and dump them into local system.


multiple execl files with few different columns

$
0
0

Hi

I have two excel files in a folder and few of the excel column names are different. I need to import two excel files one after the other to one sql table(already existing and has some data).

How do i do this?Please help

Fail to start project

$
0
0

Hi, everyone

When I click start to run the project, there is a error message: 

Failed to start project

------------------------------
ADDITIONAL INFORMATION:

Method not found: 'Boolean Microsoft.SqlServer.Dts.Design.VisualStudio2012Utils.IsVisualStudio2012ProInstalled()'. (Microsoft.DataTransformationServices.VsIntegration)

I installed vs2012 iso and integrated, my version is 11.0.5058.0.

Any help appreciate.

SSIS Package Hanging all of a sudden on simple data flow task (Expands Tempdb exponentially)

$
0
0


We have an SSIS package that has 100s of tasks that has been running fine for months.  All of a sudden a couple of days ago the above task started hanging and the tempdb started blowing up exponentially and the task never finishes.  We have tried changing the commit batch size to 10000.  Disabling the triggers on the table we are inserting into.  We are only trying to insert around 20k records.  We have done many more before. The data gets inserted into the table but it won't move on to the next step.  We have disabled all the indexes and that doesn't seem to work either.  Any help would be greatly appreciated

The site won't allow me to insert pictures.  

how to schdule ssis job on first working day after 15th of the every month?

$
0
0

Hi All,

Let me clarify my question, I need to run my ssis job on first working day of evry month after 15(which means day must be greater than 15th of each month); working day is Monday to friday other than saturday and sunday. for example the next month August 2014 it should run on 18th(monday) and for september 2014 it should run on 16th(monday).

I tried this query to keep in execute SQL task and on Expression And Constraint and set Constraint as OnSuccess and Expression as @Variable == True but i have a concern it is not picking 18th for the next month. so you please help in tweeking the below CASE statement to take the first working day of evry month.

DECLARE

@d1 DATETIME

SET @d1=dateadd(day,15,CONVERT(varchar,dateadd(d,-(day(getdate()-1)),getdate()),106))

select @d1

SELECT

CASEWHENDAY(@d1)> 15andDATEPART(WEEKDAY,@d1)= 1ORDATEPART(WEEKDAY,@d1)=7then 0else 1endas BusinessDayThanks in Advance!

Problems with XML script

$
0
0

Hi Guys,

I got the error about the namespaces. I read about another topic 

http://social.msdn.microsoft.com/Forums/sqlserver/en-US/2fde216c-01ab-42a5-8b43-52f5f42d35bc/multiple-namespaces-in-an-xml-document

Did the whole process, ETL package is working but when I open the newly created files it does not contain my data.

In my actual XML file I have 6 columns, when i open the new created file it contains 2 columns like OfficeDocumentSettings, ExcelWorkbook, Name (sheet), Data.

Can someone please help me out, am I doing something wrong?

After doing some testing I now get even more weird columns.



Problem connecting to SAP Open Hub

$
0
0

Hi, I am trying to set up a SSIS job  connecting to SAP Open Hub and have with support from the SAP guys been able to get some progress, but it has now stopped up on a error message we're not able to solve. Any suggestion on what can be wrong and how to solve this? When I run the package I get the following error message:

SSIS package "D:\Source\MSBI\SapLoadStaging\Package3.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.
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: 0x4004300C at Data Flow Task, SSIS.Pipeline: Execute phase is beginning.
Information: 0x3E8 at Data Flow Task, SAP BW Source: Process Start Process, variant has status Completed (instance DH88PUV2SZBIFKMIF48K3USME)
Error: 0x3E8 at Data Flow Task, SAP BW Source: Process Data Transfer Process, variant /CPMB/HMIJYDZ -> ZOH_VPL has status Ended with errors (instance DTPR_DH88PUV2SZCA46Y9QNO66A6W6)
Error: 0x3E8 at Data Flow Task, SAP BW Source: The component is stopping because the Request ID is "0".
Error: 0x3E8 at Data Flow Task, SAP BW Source: No data was received.
Error: 0xC0047062 at Data Flow Task, SAP BW Source [41]: System.Exception: No data was received.
   at Microsoft.SqlServer.Dts.SapBw.Components.SapBwSourceOHS.PrimeOutput(Int32 outputs, Int32[] outputIDs, PipelineBuffer[] buffers)
   at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPrimeOutput(IDTSManagedComponentWrapper100 wrapper, Int32 outputs, Int32[] outputIDs, IDTSBuffer100[] buffers, IntPtr ppBufferWirePacket)
Error: 0xC0047038 at Data Flow Task, SSIS.Pipeline: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on SAP BW Source returned error code 0x80131500.  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: 0x4004300B at Data Flow Task, SSIS.Pipeline: "OLE DB Destination" wrote 0 rows.
Information: 0x40043009 at Data Flow Task, SSIS.Pipeline: Cleanup phase is beginning.
Task failed: Data Flow Task
Warning: 0x80019002 at Package3: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED.  The Execution method succeeded, but the number of errors raised (5) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "D:\Source\MSBI\SapLoadStaging\Package3.dtsx" finished: Failure.
The program '[6916] DtsDebugHost.exe: DTS' has exited with code 0 (0x0)

Regards
Paal

How do i do a simple backup and restore in SSIS?

$
0
0
I've been searching google and to my avail i've found nothing.  How do i do a simple Database Backup to Database A, and from the Backup File, restore it (incremental backups) to Database B using BIDS?  I just wanted to design a control flow to deal with this
SIRIUS

Code: 0xC0208452 Source: Data Flow Task ADO NET Destination [86] Description: ADO NET Destination has failed to acquire the connection {}. The connection may have been corrupted.

$
0
0

Hi There!

I have created one package (1) to import data from Flatfile(csv), (2)Clean It  then (3)send clean rows to SQL Database.

This package was working fine before. Since I have decided to deploy this package to automate this process, I have no clue what went wrong but this doesn't run anymore. Flatfile and Database are on same windows box. We are running SQL 2008.I have attached some screenshot to make this conversation more concise.

Your time and efforts will be appreciated!

Thanks,

DAP

Multiple SSIS Packages into one single package

$
0
0

Hello All,

I have created 4 SSIS Packages.

1st package- To load data from FlatFiles to DB(MasterTable)

2nd package- split the MasterTable into 2 different tables(ChildTable1, ChildTable2).

3rd package- join the child table to another mastertable to get an ID column.

4rd package - Remove the duplicates from childtables and load all the duplicates into another table.

Is it possible to have them all in a single Package? Which is the best way to develop them in a single package?

Please Help me. 


Thanks, Shyam Reddy.

Exel to SQL DFTask loads some Null records

$
0
0
I have an SSIS package to import Excel data into SQL. When I look at Excel I dont see ANY Null rows. However when I run the SSIS package and check SQL, It loads some NULL RECORDS IN SQL. WHy is that It loads Null records in SQL, When i cannot see the Null recs In Excel?
Viewing all 24688 articles
Browse latest View live


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