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

format destination .csv file

$
0
0
Hello,
in ssis, I use a oledb source to execute a stored procedure and a flat file source to have the result into .csv format file.
One of the result columns is Date.
The stored procedure returns dd/mm/yyyy but when I look at the .csv destination file, it shows the column as dd/mm/yyyy 00:00:00
Question:
How do I get rid of the 0's after the date in the destination .csv file please?

Facing an issues on prod server scheduled SSIS job

$
0
0

Hi All,

Facing issue with below error message occusationally. 

SSIS job scheduled daily morning 6am to 6 pm for every two hours using SQL server agent. Job is failing occasionally with the below error. with out any modifications the job running successfully in next schedule. 

Any one suggest on this one. 

Description: SSIS Error Code DTS_E_OLEDBERROR.  An OLE
DB error has occurred. Error code: 0x80040E4D.  An OLE DB record is
available.  Source: "IBM OLE DB Provider for DB2"  Hresult: 0x80040E4D
Description: " SQL30082N  Security processing failed with reason
"3" ("PASSWORD MISSING").  SQLSTATE=08001  ".  End Error  Error: 2014-07-17
08:00:49.84     Code: 0xC020801C     Source:
DFT_Load_Company_Subject_Area_Staging_Tables OLE_SRC_Stock_Holder_Tbl
[1535]     Description: SSIS Error Code
DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.

Thanks in Advance! 

how to extract required data from a column to a flat file

$
0
0

my ssis package is working OK. However, I want to refine one of the column extraction.

when data is extracted to the flat file, I just want to the initials, firstname, lastname e.g.

FZ = Ben Smith, Add1, add1, etc

the only bit that i want is  Ben Smith

how can i state in the package to just give me the name and exclude the rest


sukai

SSIS package scope is chaning when I open the other ssis package

$
0
0

Hello,

When I open the ssis package which was created by other user package scope is changing and the creator name is showing my name that was not created by me.

Any help would be appreciated ASAP.

Thanks,

Vinay s

Creating SSIS Package Variables Programmatically

$
0
0

Hi There,

I am fairly new to SSIS.  I am creating a number of custom SSIS Tasks that I want to be able to share information between at runtime.  I figured that the best way to do this was through package variables, as in the Execute() method each custom task has access to the package variables through the VariableDispenser object.  I have managed to read variables at runtime that I create in the designer, however I am having trouble creating and writing to them.  I have created a very simple custom task below that I would expect to create the specified variable...

  [DtsTask(DisplayName = "TestVariableWriter")]publicclass Variab : Task
  {publicoverride DTSExecResult Execute(Connections connections, VariableDispenser variableDispenser, IDTSComponentEvents componentEvents, IDTSLogging log, object transaction)
    {try
      {string varName = "TestVariable";string varValue = "TestValue";
        Variables vars = null;
        variableDispenser.LockForWrite(varName);
        variableDispenser.GetVariables(ref vars);if (variableDispenser.Contains(varName))
          vars[varName].Value = varValue;else
          vars.Add(varName, false, string.Empty, varValue);

        vars.Unlock();

        return DTSExecResult.Success;
      }catch (Exception ex)
      {
        componentEvents.FireError(0, "TestVariableWriter", ex.Message, string.Empty, -1);return DTSExecResult.Failure;
      }
    }  
  }
however when I use the custom task in a package and run from VS2005, I get the following error...

Error: 0xC0014055 at TestVariableWriter: Failed to lock variable "TestVariable" for read/write 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.

Has anybody tried / succeeded in achieving what I am trying to do?  I have googled this a lot and many resources talk about doing it this way, I just can't seem to get it to work.

I am developing in .NET 2.0 / VS2005 for SSIS in SQL Server 2005.

Many thanks in advance.

Problem in using Failover partner in connection string in SSIS packages

$
0
0

Hi Everyone,

We have mirroring databases for our disaster recovery. Due to that all of our connection strings in our SSIS packages have 'Failover partner' set to mirror side. By mistake in one of config files the Data source was poiting to Mirror database and Failover partner was pointing to Principle one.

This Weekend mirrored server was shut down for maintance purpose and all the jobs that were using that config file started to fail. I was thinking by having the failover partner setup in connection string all the jobs should continue to work, but this did not happen. Would you please somebody explain why this happened?

Regards,

AG


A.G

Loading the data with XML Source having dataset element which contains a metadata element and a data element

$
0
0

It seems XML Source does not recongnize this type of xml, i found an alternative by preparing XLST file using XMLCompiledTransform in C#.NET , this is working 90% but it is very slow.

Do we have any other alternative to load these type of XML files.

Urgent help importing an XML file

$
0
0

Hi all,

I'm currently exporting my XML files from Magento, the webshop client. However I cannot use the XML task in ETL because I get the error about namedspaces. I can open the XML file itself no problem, it contains a few columns with data, some empty values. What I do to solve the error is create the script in ETL that converts the XML file so that I can make the SDX schema. The ETL script itself works 

<?xml version="1.0" encoding="utf-8" ?> 
<xsl:stylesheet version="1.0"         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
  <xsl:output method="xml" indent="no" /> 
  <xsl:template match="/|comment()|processing-instruction()"> 
    <xsl:copy> 
      <xsl:apply-templates /> 
    </xsl:copy> 
  </xsl:template> 
  <xsl:template match="*"> 
    <xsl:element name="{local-name()}"> 
      <xsl:apply-templates select="@*|node()" /> 
    </xsl:element> 
  </xsl:template> 
  <xsl:template match="@*"> 
    <xsl:attribute name="{local-name()}"> 
      <xsl:value-of select="." /> 
    </xsl:attribute> 
  </xsl:template> 
</xsl:stylesheet> 

But when I open the newly created file he looks really odd: See below for the initial file and the new file (based on how many times I open the file, i get another weird look...). Please help me out it's killing me :)



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?

WMI Event Watcher or Windows Service

$
0
0

Our data sources are as follows:

- An mdb file (downloaded every hour)

- Multiple xls files (downloaded every week)

Which approach is best and why?

1 - A WMI Event Watcher to trigger a SSIS package as files arrive

2 - A Window Service that use WMI to detect file arrival and launch SSIS package



SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER

$
0
0
Hi Experts,

I have a package to import data from Excel to SQL tables. I have created and depolyed the package on production server say "ProdServer". 

Also I have created job on the same server and it runinng the package successfully. Even I run it manually it is running properly. But 

problem here is when I am connecting to SQL installed on the production server from my local machine using windows authentication and trying 

to run the package manually it gives below error.


Executed as user: SERVERNAME\SYSTEM. Microsoft (R) SQL Server Execute Package Utility  Version 10.50.1600.1 for 32-bit Microsoft Corporation 2010. All rights reserved.    Started:  7:41:10 AM  Error: 2014-07-15 07:41:17.24     Code: 0xC0202009     Source: ImportMasterData Connection manager "PracticeMapping"     Description: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.  End Error  Error: 2014-07-15 07:41:17.27 Code: 0xC020801C     Source: Load Practice Get Practice [69]     Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection 
manager "PracticeMapping" failed with error code 0xC0202009.  There may be error messages posted before this with more information on why the AcquireConnection method call failed.  End Error  Error: 2014-07-15 07:41:17.29     Code: 0xC004701A     Source: Load Practice SSIS.Pipeline     Description: component "Get Practice" (69) failed the pre-execute phase and returned error code 0xC020801C.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  7:41:10 AM  Finished: 7:41:17 AM  Elapsed:  6.692 seconds.  The package execution failed.  The step failed.


So in short when I run the packgae direclty from production server it works fine but from local machine or any other machine by connecting 

to the SSMS and running manually, it get failed. Please help me guys on this issue. Its very very urgent.

Thanks and Best Regards,
Mangesh

SSIS 2012 job hangs dataflow task

$
0
0

hi all,

i have 2 data flow tasks in a package that run based on parameters.

the package is being run as a sql agent job using catalog execution model.

the job sometimes hangs without reason. also, when i looked at the target sql tables, only few rows have been loaded into the 2 target tables and stopped when the job hanged,

the data flow tasks loads data from source into a target sql table.please advice on why the job hangs, are there issues with the catalog model of ssis 2012 that is causing this?

Append data in OLEDB tracking by date (new column) in SSIS

$
0
0
I want to append the data extracted from excel file at different date in destination database and track it by date . I donot want to overwrite the destination database.Would you please help me out.

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.

SFTP task performance

$
0
0

Hi All

how to increase the performance of SFTP task .


Surendra Thota


SSIS Cannot consume web service

$
0
0

I'm using SSIS to connect to a Cisco web service hosted on the Cisco machine that manages our telephones. I've tested the service in SoapUI and have found everything to be working. I can get/use the WSDL, can connect to the service using authentication credentials, get an expected reply.

I first tried to use a Web Service Task. I set up my Http Connection Manager, selected it to use credentials, and ran the test. The test completed successfully. I downloaded the wsdl and saved it locally. In the Web Service Task I point to the wsdl file and the service and methods are detected in the input pane. But when I execute the task, I get the following exception:

Error: 0xC002F304 at Web Service Task, Web Service Task: An error occurred with the following error message: "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: The Web Service threw an error during method execution. The error is: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.. at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebMethodInvokerProxy.InvokeMethod(DTSWebMethodInfo methodInfo, String serviceName, Object connection) at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTaskUtil.Invoke(DTSWebMethodInfo methodInfo, String serviceName, Object connection, VariableDispenser taskVariableDispenser) at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()".

Again, my Http connection test passed, and I’ve retyped my credentials that enabled me to successfully test with SoapUI several times now.

After being unable to resolve the issue with a Web Service Task, I tried using a Script Task. I set up a HttpWebRequest and set all the header properties the same way they were while testing in SoapUI. Also, I set the Authorization: Basic value to correct value. I then built the data String that is passed to a StreamWriter exactly the way it was for the SOAP Envelope in SoapUI. The StreamWriter Writes and then Closes, but when I call GetResponse, I get the wonderful exception of:

Warning: 0x0 at Script Task 1, WEB EXCEPTION CAUGHT: : The server committed a protocol violation. Section=ResponseStatusLine Error: 0x6 at Script Task 1: The script returned a failure result.

For this issue I’ve tried

  • Setting ProtocolVersion to 1.0 and then tried 1.1

  • Setting KeepAlive to false

  • Setting ServicePoint.Expect100Continue = false;

  • Tried to programmatically set useUnsafeHeaderParsing to true but the script would not compile even though the editor did not indicate any errors (may have been caused by reflection, I don’t know)

  • Don’t know how to access the configs in my SSIS package to set useUnsafeHeaderParsing to true that way

None of these worked. It doesn’t matter which task I use, I just need one to work. Anybody have any ideas/suggestions or can point me toward anything else I can use to research these issues? (I’ve been Googling for two days now :( ).

Below is a snippet of my code from my script in case anyone else can see an issue I’m overlooking. Thank you for your time and reading my question!

        StreamReader responseReader = null;
        StreamWriter requestWriter = null;

        string data = getPayload();

        HttpWebRequest httpRequest = (HttpWebRequest)WebRequest.Create("http://***********:8443/realtimeservice2/services/RISService");
        httpRequest.ProtocolVersion = System.Net.HttpVersion.Version11;
        httpRequest.Method = "POST";
        httpRequest.AutomaticDecompression = DecompressionMethods.Deflate | DecompressionMethods.GZip;
        httpRequest.ContentType = "text/xml;charset=UTF-8";
        httpRequest.Accept = "Accept: text/*";
        httpRequest.Headers.Add("SOAPAction", "executeCCMSQLStatement");
        httpRequest.Headers.Add("Authorization", "Basic ********");
        httpRequest.ContentLength = data.Length; 
        httpRequest.Host = "*********:8443";
        httpRequest.KeepAlive = false;
        httpRequest.UserAgent = "Apache-HttpClient/4.1.1 (java 1.5)";
        requestWriter = new StreamWriter(httpRequest.GetRequestStream(), System.Text.Encoding.ASCII);

        requestWriter.Write(data);
        requestWriter.Close();

        WebResponse webResponse = httpRequest.GetResponse();//EXCEPTION THROWN

UPDATE

So we’ve tried installing the service host’s certificate into the trusted root store of the machine making the call. The connection manager can now test an https successfully, but when I run the package I still get the same ‘Could not establish trust relationship for the SSL/TLS’ issue. My desktop can still successfully connect to the service, make the call, and get back expected results. But for some reason I cannot get the DB server and the service host to play nice together.


Custom SSIS Source: How do I make it create a new connection manager and display its properties window?

$
0
0
I am writing a custom SSIS source that uses a standard SSIS Flat File Connection Manager. I have got a working UI that shows all usable connection managers in a dropdown list and allows the user to pick one. I would like to be able to have a button that the user can click on to create a new connection manager, and it would open the properties window for the new connection manager so it can be set up.

Abridged code:

Public Class MyNewSourceUI
    Implements IDtsComponentUI

    Private MetaData As IDTSComponentMetaData100

    Public Function Edit(ByVal parentWindow As IWin32Window, _
                         ByVal variables As Variables, _
                         ByVal connections As Connections) As Boolean _
            Implements Microsoft.SqlServer.Dts.Pipeline.Design.IDtsComponentUI.Edit
        Dim UIwin As New MyNewSourcePropertiesWindow(MetaData, connections)
        Return (UIwin.ShowDialog() = DialogResult.OK)
    End Function

    Public Sub Initialize(ByVal dtsComponentMetadata As IDTSComponentMetaData100, _
                          ByVal serviceProvider As System.IServiceProvider) _
            Implements Microsoft.SqlServer.Dts.Pipeline.Design.IDtsComponentUI.Initialize
        MetaData = dtsComponentMetadata
    End Sub
End Class

Public Class MyNewSourcePropertiesWindow
        Inherits System.Windows.Forms.Form
    Private _metadata As IDTSComponentMetaData100
    Private _cnxions As Connections

    Public Sub New(ByVal ComponentMetaData As IDTSComponentMetaData100, ByVal connections As Connections)
        InitializeComponent()
       _metadata = ComponentMetaData
       _cnxions = connections
       ShowConnections()
       'Setup Existing Metadata                                                   '
    End Sub

    Private Sub ShowConnections()
        Me.cboConnection.Items.Clear()
        Me.cboConnection.Items.AddRange((
            From i As ConnectionManager In _cnxions _
            Where CType(i.Properties("CreationName").GetValue(i), String) = "FLATFILE" _
            AndAlso CType(i.Properties("Format").GetValue(i), String) = "Delimited" _
            Select i.Name).ToArray())
    End Sub

    Private Sub btnNewConnection_Click(ByVal sender as Object, ByVal e as System.EventArgs) Handles btnNewConnection.Click
        Dim newconn As ConnectionManager = _cnxions.Add("FLATFILE")
        ShowConnections()
        Me.cboConnection.SelectedItem = newconn.Name
    End Sub

    Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCancel.Click
        Me.DialogResult = DialogResult.Cancel
        Me.Close()
    End Sub

    Private Sub btnOK_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnOK.Click
        'Store any metadata changes                                               '
        Me.DialogResult = DialogResult.OK
        Me.Close()
    End Sub
End Class
That's what I've got so far. I had assumed that adding a new connection would automatically display the properties window to the user (right?). However, in my tests, what actually happens is that it creates the new source with a random GUID for a name and no other properties set up, and puts it in the connections pane, and that's it. Not real useful.

Obviously, something else is required to make the properties window appear, but I can't find what it is. There's no ShowUI() member on any of the classes I have, and I haven't been able to find out the name of the UI class that's used by the flat file source. Does anyone know how this is done? I know it can be done, because such a button exists in the normal Flat File Source UI.

1 Configuration filter for several SSIS pacakges

$
0
0

I have 20 ssis packages. most of these packages (15)  has a SAME destination server "ServerX" and Database "DatabaseX" . 

so in the first package i created a  configuration of type "SQL server" with filter name "Filter X" 

Second package i again created a  configuration of type "SQL server" with same configuration filter name "Filter  X" and "reused" it. 

because its the same database and same catalog. when i deployed in SQL job. everything fails. was working absolutely fine before i configured these packages .

my aim was to use single configuration filter for all these packages. please Help.    

Union All in SSIS

$
0
0

Hi,

I have near to 30 Raw Source files, and few i/p sources has 6 columns and some of them has 8 columns.

i need to use Union ALL and get all the columns mapped to destination table.But by using Union ALL i am geting 6 columns as output. Any way can i get all the columns as output

Please help

CDC for Oracle in SQL 2012 not writing updates

$
0
0

Hello...

I have set up a CDC for Oracle Service and Instance for use with SQL 2012.  After the instance was started, I inserted six rows of data into my Oracle table and a few minutes later, it looks like the changes were picked up by the service.

The instance status page contains the following information:

Status = Green Checkmark

Detailed Status = PROCESSING

Last Transaction Timestamp = 7/22/2014 12:11:56 PM

Last Change Timestamp = 7/22/2014 11:58:35 AM

Transaction Log Head Change Number = 0x0A2C1C...

Transaction Log Tail Change Number = 0x0A2C1C... (not the same value as the head)

Current Change Number = 0x0A2C1C...

Active Transactions = 1

Staged Transactions = 0

Completed Transactions = 0

Written Changes = 0

Read Changes = 6

It looks like the six rows have been read, but they are not being written to cdc.CDC_TEST_TABLE_CT on my SQL 2012 database.

I exported the diagnostic data using the "Collect Diagnostics" link, but there are no errors in the log.  Is there a primer for how to read the results of the diagnostics?

I had the following error earlier today:

"ORACDC517E:Oracle Call Intreface (OCI) method failed: ORA-01291: missing logfile 
ORA-06512: at "SYS.DBMS_LOGMNR"

But that error was resolved when my Oracle account was granted DBA and "execute_catalog_role" permissions.

The account being used for the CDC Service and Instance has dbo rights on the SQL Server.

Does anyone have an idea what the problem could be?

Any help would be greatly appreciated.

Thanks!

Viewing all 24688 articles
Browse latest View live


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