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

SSIS Contitional Split transformation Data types DT_WSTR and DT_I4 are incompatible

$
0
0

I am importing the values for field Atype from a .csv file as DT_STR, 13 and I need to fit them into a bit type CType field. When I write the conditional split ((ISNULL(Atype)?"a":Atype)!=(ISNULL(CType)?"9":CType)) it says that the DT_WSTR and DT_I4 types are incompatible and that I need to explicitly cast with a cast operator. I haven't been able to make it work, can someone please show me how to explicitly cast?

TIA


Assigning records to groups in SSIS like NTILE() IN SQL

$
0
0

Hello,

I am in middle of my transformation where I have to assign records equally among 3 different groups. I can do that in SQL using NTILE() Over() function. How do I do that in SSIS package. I have applied different business rules during transformation to get unique records and now I have to assign those records to 3 group in and generate excel report. Basically, I will need to have another column which will have those group numbers.

Thank you!

Sql Server Express and "remote" SSIS capabilities

$
0
0

I know that SQL Server Express (2014) only supports simple Import\Export not a full SSIS implementation. But can it be used to create sophisticated packages onanother server running, say,  Sql 2014 Standard edition? (In other words can Express be used as "client" to create packages on a backend server, using the full SSIS resources of the backend server)

TIA,

edm2


Error Handling. Excel Sheet Refresh.

$
0
0

Hi Guys

I am trying to run a SSIS package. I am having some issues in that..

The setup

SQL Server 2012 with SSIS.

A active directory service account(sql_user)  has been created, added to SQL Security as sysadmin, give rights for msdb and SSISDB for roles

db_ssisltduser

db_ssisoperator

public

SQLAgentOperatorRole

SQLAgentReaderRole

SQLAgentUserRole

and for SSISDB

public , ssis_admin

A credential has been created with the same user account who has all the permission above. A proxy has been created using the credential made above.

SSIS package deployed and run using the proxy.

ISSUE :

I am running a very simple SSIS package to refresh the excel file.

Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Runtime
Imports Microsoft.Office.Interop.Excel<Microsoft.SqlServer.Dts.Tasks.ScriptTask.SSISScriptTaskEntryPointAttribute> _<System.CLSCompliantAttribute(False)> _
Partial Public Class ScriptMain
	Inherits Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase

	Enum ScriptResults
		Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success
		Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
	End Enum


    Public Sub Main()


        On Error GoTo ErrorHandler

        Dim bt(0) As Byte

        Dim excel As New Microsoft.Office.Interop.Excel.Application
        Dim wb As Microsoft.Office.Interop.Excel.Workbook


        wb = excel.Workbooks.Open("E:\ExcelFile.xlsb")
        wb.RefreshAll()
        wb.Save()
        wb.Close()
        excel.Quit()
        Runtime.InteropServices.Marshal.ReleaseComObject(excel)

        Dts.TaskResult = ScriptResults.Success

        Exit Sub
ErrorHandler:

        Dts.Log("Err,Description  " & Err.Description, 0, bt)

        Dts.Log("Err, Description " & Err.GetException.ToString(), 4, bt)

	Dts.TaskResult = ScriptResults.Failure
    End Sub

End Class

The code runs fine when I open visual studio using same AD service account (sql_user), open the project and run it and excel file get updated . When the same package is deployed to SQL and run under the proxy account (sql_user) it fails.

AD user (sql_user) is normal AD users and is able to run the SSIS package succesfuly from visual studio but not from sql agent job. But if I add the sql_user to the Windows Administrators group.. The job runs successfully and file gets updated. Not sure why it would need admin rights and what it access while running the package from sql job but on the other hand, being a normal windows user, sql_users can run the package using visual studio.

I tried adding errorhandler and upon running I am getting error

" the script returned a failure result"

Anyway I get can more detail?

Any help why I am getting the error in sql and what should I add more to get the detailed error.

FYI

For error hanlder, in SSIS -> Logging, I have added msdb as configuration .. not sure if that's right ..






Error while consuming SSIS Web Service Task

$
0
0

FULL EDIT:

I have to consume a webservice where the provider does not have either an asmx nor a wsdl. All I have is a wsdl file located on my pc. I know there are some solutions forvb.net solutions as this or this but I want to create a SSIS package using this service and do not know how to handle this and if this is even possible.

Besides the local wsdl file my provider gave me an url like http://a.b.com/services/SOAP. So what I did is:

1. Creating a Web Service Taks2. Setting up the HTTP Connection Manager-With Server URL http://a.b.com/services/SOAP3. I linked the WSDLFile to the same named field4.Set up dthe Input and Output 

What I got was the following error:

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 request failed with the error message:
--<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><html><head><title>302 Found</title></head><body><h1>Found</h1><p>The document has moved <a href="http://a.b.com/services/SOAP">here</a>.</p></body></html>

Could anyone help me 1. understanding and 2. solve the problem. I just cannot find anything about it.


attribute relationship error

$
0
0

Hi all,

When ever i tried to build a cube, i get stuck in this attribute relationship. either i shows a "yellow" icon in the hierarchy or "red" underline in the attribute column.I dont know how to rectify those errors. could you help me out in resolving it. or can you send me some links where i can go through it, step-by-step.

Thanks

Ranjan


Ranjan DS

Script component transformation using BIML script

$
0
0

Hi there,

I was trying to generate script component transformation using BIML script but couldn't able to figure out that how to write

Just I will be going to use script component transformation for to find out the error description

Input column ErrorCode and output column ErrorDescription 

Row.ErrorDescription = ComponentMetaData.GetErrorDescription(Row.ErrorCode);

Can anyone guide me the BIML script to implement this (would be good if you have any examples)

Thanks for your help


SQL Server Agent: Request to run job from user refused??

$
0
0

Hi,

I am working intergration between SQL and sybase from SSIS. Its execute perfectly when i run manually from SSIS.

But if i create a job in SQLAgent and give schedule means  only one row data inserting after that it show error like "Request to run job from user xx refused because the job is already running from a request by user xxx".

Before that i configure job schedule 1 min after this error i change to 10 mins then also same error only prompting.

Note: Both are same  user.

Please do the needful

Thanks



Jaffer


Cannot edit package in SQL Data Tools after upgrade to Windows 10

$
0
0

I "upgraded" to Windows 10 (I was installing a new c: drive anyway).  I installed SQL Server & SSIS, Visual Studio 2012, SQL Server Data Tools 2012, etc.

When I try to load up my project (.sln) in SQL Data Tools I get the following warnings/errors:

Warning1Warning loading DataImport.dtproj: Warning: Failed to decrypt an encrypted XML node. Verify that the project was created by the same user. Project load will attempt to continue without the encrypted information.
Warning2Warning loading DataImport.dtproj: Warning: Failed to decrypt sensitive data in project with a user key. You may not be the user who encrypted this project, or you are not using the same machine that was used to save the project. If the sensitive data is a parameter value, the value may be required to run the package on the Integration Services server.
Error3Error loading ImportFiles.dtsx: The version number in the package is not valid. The version number cannot be greater than current version number.  
Error4Error loading ImportFiles.dtsx: Package migration from version 8 to version 6 failed with error 0xC001700A "The version number in the package is not valid. The version number cannot be greater than current version number.".  
Error5Error loading ImportFiles.dtsx: Error loading value "<DTS:Property xmlns:DTS="www.microsoft.com/SqlServer/Dts" DTS:Name="PackageFormatVersion">8</DTS:Property>" from node "DTS:Property".  
Error6Error loading 'ImportFiles.dtsx' : The package failed to load due to error 0xC0010014 "One or more error occurred. There should be more specific errors preceding this one that explains the details of the errors. This message is used as a return value from functions that encounter errors.". This occurs when CPackage::LoadFromXML fails. 

I understand that perhaps this may be by design (as suggested in this article https://social.technet.microsoft.com/Forums/sqlserver/en-US/62789ebb-c5c5-40a7-832f-fdea7161af03/decrypt-xml-node-failed-on-loading-master-package?forum=sqlintegrationservices).  But I do not know how to overcome this now.

As well as installing Windows 10, I had also renamed by computer.  I have tried renaming it back (I noticed some references to the computer name in the xml), but no difference.

Have I installed the wrong versions of one of the software?  If so, how could I check which one I need to install (to match the VS project/dts package)?  


I have this and a few other issues I need to resolve with this move to Win10, so any help with this would be greatly appreciated.

Thanks  in Advance!


TIA


Import data from multiple excel sheets to multiple tables using SSIS

$
0
0

Hi,

I have an excel file that has multiple sheets and I need to import data from each separate sheet to a separate table using SSIS. 
E.g. Sheet A data should go to Table A and Sheet B data should go to Table B and so on. 

Is it possible to do this with out using script task.

Can somebody help me to achieve this?

Regards,

Praveen C


Regards, Praveen


Connection failing validation to SSAS (could not connect to the redirector)

$
0
0

Hi all,

I have a package that works fine locally but doesn't work when I deploy it to the server (and reset the connection strings to the local DB and AS instances that are running on the same server)

It's not the usual permissions issue; I'm getting something about the SQL Browser not running (it is) and named instances. But my SSAS instance is the default unnamed instance?

The error message is "errors in the oledb provider. could not connect to the redirector. ensure the sql browser is running on the "." server"

then another error with "error while retrieving name instance information"

I've tried referencing the ssas server using its ip, ., hostname but the package craps out in a few sec

Any tips?

I've verified that the SSAS server is running and i can connect to it using ssms/tableau/excel etc

I've tried changing the service account of the sql browser to use local system


Jakub @ Melbourne, Australia Blog

Environment variable issue using BIML

$
0
0

Hi Friends,

I was writing BIML script for to generate the packages as I have an issue with environment variable 

I was fallowing below link and used exactly same script for environment variable but it was not showing in the package at all, couldn't able figure out where I was doing mistake can anyone guide me please 

http://microsoft-ssis.blogspot.co.uk/2014/03/package-configurations-with-biml.html

Moreover, I have installed BIDhelper 1.7.0.0  is there any issue with version ? 

How to a copy Folder from FTP using SSIS

$
0
0

Hi everyone,

Please how do I copy a folder from an FTP location using the FTP task in SSIS. Currently, I can only move the files in the folder one after the other but I want to copy the folder at once.

Please I need urgent assistance. 

Regards,


me

SSAS as data source. MDX Query executed twice.

$
0
0

I'm trying to extract some complex data out of a cube. I've noticed that the query is executed twice by SSIS. Once to get the metadata and once to pull out the data.

I've tried both the oledb and ado.net connectors. I've tried disabling validation etc but it hasn't helped.

Is there a way to have SSIS query a cube just once? My queries take tens of minutes to hrs to run, so having them execute twice will mean the package will run twice as long

How do reporting tools do it? they use the oledb driver and dont query the cube twice


Jakub @ Melbourne, Australia Blog

Illegal characters in command line on Execute Process Task Editor

$
0
0

I'm trying to execute a simple VBS file from the Executable command line in the Execute Process Task Editor.

My line is this:

cscript.exe "c:\convertcsvssis\XlsToCsv.vbs"

SSIS keeps saying there are illegal characters here.  I've Googled and looked about 20 articles and I can't resolve it.

I have a ForEach that loops through Excel files and changes them to CSV files using code i found.

This script takes an original Excel file and transfers it to a new CSV file in a new directory.

So in DOS at the CMD line I would type:

XlsTocsv.vbs originalfile.xls newfile.csv

I have the original file and new file in the Arguments line so I'm assuming that after the script executes it will look at the filepaths in the loop and loop through them so I want it do to this when it runs:

XlsTocsv.vbs [User::@ExcelFile] [User::@CSVFile]

I just can't get it to execute and I keep getting illegal characters.  Also on a previous post, I could not get what I was trying to work despite the good advice so I'm using this instead.  The original files were so messed up that I couldn't figure out what was wrong with them and a simple copy did not work.


Chris Davis


Run the foreach loop container if file exist

$
0
0
Hi All,
In my SSIS Package I am using For each loop container to load the data from csv file to SQL Table.
my file will be like abc_120554.csv
I want to places one script task before the foreach loop container to check if the file exist in the folder which start withabc_.

what to do for same.
Regards,
Vipin Jha

Thankx &amp; regards, Vipin jha MCP

how to display sum value in message box in ssis

$
0
0

hi to all,

i want to display sum value in message box using script component in data flow transformations.

i using package like below,

here i want to capture single column sum value and display in message box .


GVRSPK VENI

Rename File in SSIS

$
0
0

Hi All,

I have a dataflow task that load data from flat file to SQL Table.
In need to rename the file with the  datestamp(current date ) at the end of filename.
I am daily getting a file like Vendor_20150820_2484.csv , 
Vendor_20150821_2484.csv

as the file name getting changed so i can not load data .

i want to change the file name  Vendor_20150820_2484.csv to Vendor_yyyymmdd.csv.

this file I will use to load into sql


Suggestions and Help would be highly appreciated.

Thanks,


Vipin Jha

 

Thankx &amp; regards, Vipin jha MCP

Foreach loopcontainer to load file which contains the string %vendor%

$
0
0
Hi,
In my SSIS package I am using Foreach loopcontainer to load multiple flat files.
Now my requirement is that I want to load only those file which contains %vendor%.In source folder I have many files but I am interested in to load only those file which contains the string %vendor% in file name.

Thankx &amp; regards, Vipin jha MCP

Why is my SSIS package producing a file that looks wrong?

$
0
0

My Database Table is defined as such...

CREATE TABLE [dbo].[FileHeaderRecord](
	[FileHeaderRecordIdentity] [int] IDENTITY(1,1) NOT NULL,
	[RecordType] [char](2) NULL,
	[RecordDescription] [char](12) NULL,
	[LockBoxNumber] [char](6) NULL,
	[BusinessDate] [char](8) NULL,
	[Filler] [char](52) NULL
PRIMARY KEY CLUSTERED
(
	[FileHeaderRecordIdentity] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

The data looks like so when I SELECT it...

FHTEST        00000108252015                                                    

However, when I set-up my SSIS Package to SELECT from this table and then use "Flat File Destination" it writes the file out...but the format seems wrong...like when I look at it in Notepad++ it appears as so...

FHTEST         000001                                       08252015                                                   

Why the gap between my data columns [LockBoxNumber] and [BusinessDate]???

Thanks for your review and am hopeful for a reply.

Viewing all 24688 articles
Browse latest View live


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