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

Error executing SSIS remotely

$
0
0
I have a package that created and stored on SQL01.SSISDB catalog. The package has SQL Job Transfer task, which will connect to SQL02 and transfer jobs to SQL03.   It works fine if i run this package from SQL01.  As soon as I create a job on SQL02 to run this package (from SQL01), i get following error.

The validate method on the task failed, and return error code 0X80131501 (Failed to connect to server  SQL01) The validate method must succeed and indicate the result using an "Out" parameter. 

The job is running under agent service which is local admin on all servers.  SPN is registered for all servers as well.  

Notice another thing: If i go on SQL02 box and connect to SQL01 via SSMS and validate package, i get the same error.

Can someone help here?


SSIS Package is running slow from stored procedure (Integration Services Catalogs) than BIDS

$
0
0

I have a simple data transfer package which uses OLE DB as source and ODBC as destination. When I run the package from BIDS then it take around 2-3 minutes to complete but when the same package is called from Integration Services Catalogs through stored procedure then it take around 30 minutes to complete run.

Can anyone please help to figure out why the package is running so slow from stored procedure (Integration Services Catalogs) than BIDS?

Exporting Data from HTML Data Source Using SSIS

$
0
0

Hi Everyone,

Please I am trying to export data from an html file I saved on my system. Please can someone tell me what SSIS component I will use to achieve that and how?

Thanks


me

SSIS Datetimestamp Fail - Why?

$
0
0

Why can I insert a time '2010-12-01T22:17:18.610Z' into datetime2(3) directly in SQL Server, but, SSIS drops the time if I configure the input column as (DT_DBTIMESTAMP2 or DT_DBTIME2) or fails completely if I format the input column as a String (DT_STR)? 

CREATE TABLE [dbo].[timetester]([testtime] [datetime2](3) NULL) ON [PRIMARY]

With DT_DBTIME2, etc... it imports column and loses the time: 2010-12-01 00:00:00.000

With DT_STR, the SSIS package fails with "Invalid character value for cast specification."

I've tried every variation of column types that I can think of to no avail.  I've created a workaround package with a Derived Column that replaces the T & Z which inserts the datetime correctly.

REPLACE(REPLACE(lastModifiedTimestamp,"T"," "),"Z","")

However, I want to know what is going wrong inside of SSIS that can't process the T & Z when a direct SQL INSERT statement works just fine.  INSERT INTO [dbo].[timetester] VALUES('2010-12-01T22:17:18.610Z')

Thanks,

Otto

Execute SQl Task Error SSIS Package

$
0
0

Hi all,

I`m using for each loop container in my package to grab the file name from the source path. I have created 2 vairables

FilePath and SourceFolder

I`m using execute sql task inside the container and this is my query

Insert into  [dbo].[DCA_FF_TEST] (File_Name,File_Date) SELECT File_name = ?,
File_Date = GetDate()

Please not the Table I am trying to insert has more columns but at this stage I dont need them.

When i execute the task I get an error

[Execute SQL Task] Error: Executing the query "
INSERT INTO   [dbo].[DCA_FF_TEST] ([File_Name],[F..." failed with the following error: "The statement has been terminated.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

Can someone point me in the right direction? Am I missing anything?

Resultset property Set to None

Parameter Mapping: Variablename: FilePath , Direction: Input, datatype : Varchar, Parametername: 0, ParameterSize: 100.

I`ve checked the connection as well it works.



FM

Advantage OLE DB in SSIS

$
0
0
I created an SSIS project in Visual Studio 2014 which runs on Windows Server 2008 R2 and SQL Server 2014.  I need to load and ADT file from an Sybase Advantage database into a table on SQL Server.  All I have is the detached ADT file.  The Advantage server is on a different Windows Server.  I downloaded and installed the Advantage OLE DB provider from Sybase.  The provider shows up in the data source list on SQL Server, but it does not show up in the data source list in my SSIS project.  I searched the web but found no solutions.  Is there a solution to this problem?  Is there a better process to use to accomplish this?  Thanks.

configuation

$
0
0

i  have 1 variable in my package which i have xml configuration file.

if i change value in config file its changing when package run.

my question is when i deploy job in ssis 2012, and add config file, there also we need to go to config file and change value and

then run job

or is there any option in job where we just change variable value  without opening config file and it takes that value to run package

SQL Agent Job failing - not using credentials in the config file for Data source

$
0
0

Hi

We have an SSIS pkg, that is secheduled as SQL Agent job using proxy account. The pkg contanins data source for connecting different SQL servers and the proxy account do not have access to the external DBs. The data source credentials are stored in the Config file.

Why the job is not using the credentials in the config file and try to use the proxy account and failing.

Do the proxy account need access to all the external dbs in the pkg, and then what is the purpose of the config file.

I am sorry, i am not SSIS person trying to understand. If any one can explain tha will be great!!

Thank you!


VR


M/D/YYYY h:mm:ss tt to DATETIME

$
0
0

I would like transform the following string possibilities into DATETIME. Can you please lead me in the right direction? Many Thanks! (tt is either AM or PM)

M/D/YYYY h:mm:ss tt
M/DD/YYYY h:mm:ss tt
MM/D/YYYY h:mm:ss tt
MM/DD/YYYY h:mm:ss tt

M/D/YYYY hh:mm:ss tt
M/DD/YYYY hh:mm:ss tt
MM/D/YYYY hh:mm:ss tt
MM/DD/YYYY hh:mm:ss tt

SSIS used to integrate SQ Server and Oracle - Is it necessary both 32 and 64 bits Oracle Clients installed?

$
0
0

Hi all,

   SQL Server 2012 EE 64 bits (SOURCE)

    Oracle 12c 64 bits (DESTINATION)

   To make my solution - integrate SQL Server with Oracle - work, i had to install both 32 and 64 bits of the Oracle 12c Client. After that, i had to change the properties of my SSIS package to run on 32 bits only (properties > Debugging > Run64BitRuntime set to FALSE). Before i made this change, the execution of my package was failing, but after setting Run64BitRuntime to false, the package ran successfully. Why is that?

   I am thinking of unistalling the 64 bits ORacle Client from my Windows Server, but i fear that if i uninstall, my package stop working. 

   Any suggestions/corrections will be most appreciated. 

   Thanks in advance

   OBS1: I am using ODBC as the source and destination tasks.

dtexec Version Problem

$
0
0

Hi everyone,

I created a simple SSIS Project in 2012 data tools, which had only a data flow, with one data source, one data conversion and one OLE DB Command.

I use the Excel source to pass the columns parameters to an SQL stored procedure.

When i execute the package inside Data tools it runs perfectly.

Mi problema is when i try to use dtexec, it generates the next error:

Package migration from versión 6 to versión 3 failed.

but i have other packages running nice with the same dtexec command.

In the Execute Package Utility, prompts this error:

To run an SSIS package outside of SQL Data Tools you must install OLE DB Command of Integration Services or higher.

Anny Suggestions?

Import the name of a flat file into DB column

$
0
0

Hi,

I have a simple package importing files from FTP and then importing the contents into tables in the DWH.

So far so good,but it would be great to import the name of the files as well into the same destination tables in an additional column :file_name. The import is simply done by a data flow task, within a flat file source and a OLE db source.

My question is:

is it possible by using flat file connection to add the file name to a table in DWH?It is the same table where the content of the flat file is imported.

thanks a lot


Error:-Unable to cast COM object of type 'System.__ComObject' to class type 'System.Data.SqlClient.SqlConn

$
0
0

Hi,

 I am using SQL server 2008.My connection manager is OLEDB Source

I am stuck with a Script Component in SSIS package and I can’t work out. Let me know what steps are the correct in order to solve this.

At first I have just a Flat File Source and then Script Component, nothing else.

 

Error:

 

Script Component has encountered an exception in user code.

Unable to cast COM object of type 'Syatem.__Comobject' to class type 'System.Data.SqlConnection'.Instances of types that represents COM component cannot be cast to types that do not represent COM components;however they can be cast to interface as long as the underlying COM component supports query interface calls for the IID of interface.

   at SC_5d14020d33934d14afffb8262fa856dd.vbproj.ScriptMain.AcquireConnections(Object Transaction)
   at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.AcquireConnections(Object transaction)
System.Invalid CastException.Unable to cast COM Object of type 'System._ComObject' to class type

Script Code (from Script Component):

' Microsoft SQL Server Integration Services Script Component
' Write scripts using Microsoft Visual Basic 2008.
' ScriptMain is the entry point class of the script.

Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Imports Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost
Imports Microsoft.SqlServer.Dts.Runtime.Wrapper
Imports Microsoft.SqlServer.Dts.Runtime
Imports System.Data.SqlClient
Imports System.Data.SqlClient.SqlConnection

<Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute> _
<CLSCompliant(False)> _
Public Class ScriptMain
    Inherits UserComponent
    Dim connMgr As IDTSConnectionManager100
    Dim sqlConn As SqlConnection
    Dim sqlCmd As SqlCommand
    Dim sqlParam As SqlParameter

    Public Overrides Sub AcquireConnections(ByVal Transaction As Object)
        connMgr = Me.Connections.Connection
        sqlConn = CType(connMgr.AcquireConnection(Nothing), SqlConnection)
    End Sub

    Public Overrides Sub PreExecute()
        sqlConn.Open()
        sqlCmd = New SqlCommand("SELECT * FROM TestEmpS)", sqlConn)
        ' sqlParam = New SqlParameter("@KeyCustomer", SqlDbType.Int)
        sqlCmd.Parameters.Add(sqlParam)
    End Sub

    Public Overrides Sub CustomerRecordsInput_ProcessInputRow(ByVal Row As CustomerRecordsInputBuffer)
        Dim reader As SqlDataReader
        ' sqlCmd.Parameters("@KeyCustomer").Value = Row.CUNO
        reader = sqlCmd.ExecuteReader()
        If reader.Read() Then
            'do all field comparisons here to determine if
            '    the record changed since the last ETL.
            If (reader("Name").ToString() <> Row.Name) Then
                Row.DirectRowToUpdateRecordsOutput()
            Else
                Row.DirectRowToIgnoreRecordsOutput()
            End If
        Else
            Row.DirectRowToInsertRecordsOutput()
        End If
        reader.Close()
    End Sub

   
    Public Overrides Sub ReleaseConnections()
        connMgr.ReleaseConnection(sqlConn)
    End Sub

End Class

Please suggest what need to change in my code

Thanks in advance,

Regards,

Vipin jha


Thankx & regards, Vipin jha MCP


Office Primary Interop Assemblies does not install

$
0
0

A package doesn't work in the server because I miss the dll Microsoft.Office.Interop.Excel. A Script Task Needs this dll. I have downloaded Office Primary Interop Assemblies 2010.

In the Server it's installed

  • VS2010 Data Tools
  • SQL Server 2008R2
  • Microsoft Office Excel Viewer
  • Microsoft Office 2003 Web Components
  • Microsoft Office Access database engine 2007
  • Microsoft Office Access database engine 2010
  • Microsoft .net Framework 4.5
  • OS: Windows Server 2008 R2 Enterprise

When I run it at the beginning open a window it says it is preparing it and then it Closes.

Then I can see the dlls Microsoft.Office.Interop nowhere. There is just Microsoft.Office.Interop.Access.Dao and Microsoft.Office.Interop.Owc11, that were already there before the installation. And in Programs and Features, Office Primary Interop Assemblies 2010 is there as installed.

This is what can be seen in logs application of Windows.

The first four Messages has msinstaller as source and fourth (at the beginning of the Installation) and fifth (at the end) has RestarterManager as source.

What could I do to get Microsoft.Office.Interop.Excel installed?

,

parallel processing of data from single source table to single Destination table

$
0
0

Hi,

I want to process multiple ID same time and insert and update in single destination table, but I get deadlock problem.

What is the best practices of parallel processing?

Regards,

Manish


Jobs setting

$
0
0

Hi i would like set jobs for my packages

is it good to set all 10 packages(10 steps) in job or 10 jobs for each package

Thanks & regard 


ADKR

job step skip

$
0
0

Hi 

I have 10 steps in ajob if a step fails it should not run again until i set some thing to run it

i can identifie which step was failed


ADKR

Compute MD5 hash value using script component

$
0
0

Hi ,

I am looking to convert all the source column to md5 hash value,

I never worked on this scenario.below is my code , please suggest me where and what i need to change in code to get md5 value in derived columnhashvalue of all incoming rows.

My script component code is :-

Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Imports Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost
Imports Microsoft.SqlServer.Dts.Runtime.Wrapper
Imports Microsoft.SqlServer.Dts.Runtime
Imports System.Data.SqlClient
Imports System.Data.SqlClient.SqlConnection
Imports Microsoft.SqlServer.Dts.Pipeline
Imports System.Text
Imports System.Security.Cryptography

<Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute()> _
<CLSCompliant(False)> _
Public Class ScriptMain
    Inherits UserComponent
    Dim connMgr As IDTSConnectionManager100
    Dim sqlConn As SqlConnection
    Dim sqlCmd As SqlCommand
    Dim sqlParam As SqlParameter
    Private inputBuffer As PipelineBuffer
    Public Overrides Sub AcquireConnections(ByVal Transaction As Object)
        connMgr = Me.Connections.Connection
        sqlConn = CType(connMgr.AcquireConnection(Nothing), SqlConnection)
    End Sub

    Public Overrides Sub PreExecute()
        sqlCmd = New SqlCommand("SELECT * FROM TestEmpS", sqlConn)
        'sqlParam = New SqlParameter("@filem", SqlDbType.VarChar)
        'sqlCmd.Parameters.Add(sqlParam)
    End Sub

    Public Overrides Sub CustomerRecordsInput_ProcessInputRow(ByVal Row As CustomerRecordsInputBuffer)

        Dim reader As SqlDataReader
        ' sqlCmd.Parameters("@KeyCustomer").Value = Row.CUNO
        reader = sqlCmd.ExecuteReader()
        If reader.Read() Then
            'do all field comparisons here to determine if
            '    the record changed since the last ETL.
            If (reader("Name").ToString() <> Row.Name) Then
                ' Row.DirectRowToUpdateRecordsOutput()
                Row.DirectRowToInsertRecordsOutput()
            ElseIf (reader("Name").ToString() = Row.Name) Then
                Row.DirectRowToIgnoreRecordsOutput()
            End If
        Else
            Row.DirectRowToInsertRecordsOutput()
        End If
        reader.Close()
        ' If sqlConn.State = ConnectionState.Open Then sqlConn.Close()

    End Sub
    Public Overrides Sub ReleaseConnections()
        connMgr.ReleaseConnection(sqlConn)
    End Sub
End Class

Thanks in advance.

Regards,

Vipin jha


Thankx &amp; regards, Vipin jha MCP

Unzip all zip files at once

$
0
0

Hi,

    I have 13 zip files in a location. I want to unzip all files and load them into respective sql server tables. I am wondering whether it is possible to unzip all files at once instead of picking one-by-one? I can use For-Each loop container but again it picks up each file and process it and picks another file and so on.. is it possible to pick all files at once and unzip them? Any solution would be helpful 

Regards,

Venkata


Venkata Koppula

Why has CAST(FieldName to float) failed in view but not in SELECT?

$
0
0

I've just solved a problem but I'm still not sure what the problem is!

I have a data (staging) table with all values stored as text. The data is converted to the correct data-type and also aggregated somewhat in a view. A select statement with the conversion works. A select statement with the conversion and aggregation (GROUP BY) works. Creating a view of the conversion and aggregation works. However, on selecting from the view (e.g. SELECT TOP 1000 * FROM ViewName) it fails saying it cannot convert from varchar to float. There are no visible characters in the field apart from numbers between 0 and 9, a decimal point and sometimes a leading minus sign (-).

The fix? Cast to money and then cast to float.

The problem? I don't know! What was the problem? Some of the values had up to 10 decimal places. Was that a problem? Was it really an overflow error masquerading as conversion error? The longest strings present were:

-2.609763091
-0.082456066
-0.674010546
-2.563428427
-0.016109637
-0.313600766
-0.104452264
-0.853811384
-0.302529502
-0.000362354
-0.002961949
-0.319269185
-0.001970796

Would really like to know what caused this so I can spot it in future before it happens.

Cheers.


JCEH

Viewing all 24688 articles
Browse latest View live


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