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

Cannot Find SharePoint Connectors for SSIS

$
0
0

I have installed  SSIS with SS 2012 and run the installation for the SharePoint adapters for SSIS as found here:

http://sqlsrvintegrationsrv.codeplex.com/releases/view/17652

I cannot find how to add the connectors by going to Tools -> Choose Toolbox Items -> SSIS Data Flow Items.

The tab SSIS Data Flow Items is not there. (see image)

How do I add the connectors if the tab is not there?


Making Excel Source case insensitive

$
0
0

Hi:

When I import data from multiple excel files, the Excel source gives validation errors if the case of a column name changes.

How can I make my excel source Case Insensitive?

TIA

Kar

Foreach Loop only looping once

$
0
0

Hi,

Please be patient and bear with me, for I am new to SSIS packages.

I am using SQL Server 2008 R2 to host the SQL Agent job and the SSIS package.

I am using Visual Studio 2008 Professional Edition for designing the SSIS package. It is version 9.0.30729, Version 3.5 SP1.

I am on a Windows 8 machine.

My Foreach Loop Container seems to iterate only once when it should iterate numerous times, and this issue happens BOTH when I execute the SSIS package from within Visual Studio AND when I run a SQL Agent job to execute the SSIS package.

For the solution within Visual Studio, I have False for the property Run64BitRuntime.

In the SSIS pckg in Visual Studio, I have in the Variables pane a number of variables and these following variables pertain to my problem:

Name: objRs      Scope: the name of the SSIS package     DataType: Object    Value: System.Object

Name: txtVendorFamilyNumber   Scope: the name of the SSIS package  DataType: String   Value: 111111

The value "111111" that I entered into the txtVendorFamilyNumber variable in the Variable Pane is NOT a realistic value as there are no vendor family numbers that have the value 111111. I will populate dynamically the real vendor family numbers from within the SSIS package.

When I imported the SSIS package to SQL Server 2008 R2, via the ellipsis button for the Protection Level I chose the "Rely on server storage and roles for access control" choice.

Concerning the flow of the SSIS package, going down within Visual Studio from the beginning of the flow of the SSIS package, eventually I have an Execute SQL Task. In its General tab, it has "1252" for CodePage property, "Full result set" for ResultSet property, "OLE DB" for ConnectionType property, "Direct input" for SQL Source Type property, "False" for BypassPrepare property, and the following for the SQLStatement property:

     select txtVendorFamilyNumber from tmpVendorFamily  where VendorID = (select min(VendorID) from tmpVendorFamily)

In the tmpVendorFamily table on SQL Server 2008 R2, there are 379 rows of results for the SELECT statement above (starting with the values 100110, 100115, 100120, 100130, through the LAST row's value 106370.

In the Parameter Mapping tab of the Execute SQL Task Editor, I have nothing. In the Expressions tab of the Execute SQL Task Editor, I have nothing.

In the Result Set tab of the Execute SQL Task Editor, I have the value 0 for Result Name property and I have the value User::objRs as the value in the Variable Name property.

This Execute SQL Task has a green arrow (Constraint evaluation operation, Success in Value drop down) to the Foreach Loop Container.

In the Foreach Loop Editor, in the Collection tab, I have "Foreach ADO Enumerator" as the value in the Enumerator property. In the drop down for ADO Object Source Variable, I have chosen the User::objRs, and I have the radio button "Rows in the first table" selected.

In the Foreach Loop Editor, in the Expressions tab, I have nothing.

In the Foreach Loop Editor, in the Variable Mappings tab, I have "User::txtVendorFamilyNumber" for the Variable property and I have the value "0" for the Index property.

So in the Foreach Loop, I first have a Script Task with the ReadOnly variable User::txtVendorFamilyNumber and with the ReadWrite variable User::TESTING_OnlyTesting that I created with a package scope, string datatype, and no default value. This Script Task has the following code for testing purposes:

Dim strFullVerbiage As String

strFullVerbiage = "The value is: "

Dts.Variables("User::TESTING_OnlyTesting").Value = strFullVerbiage + Dts.Variables("User::txtVendorFamilyNumber").Value.ToString()

Dts.TaskResult = ScriptResults.Success

I have next in the Foreach Loop Container a Send Mail task. In the Expressions tab of the Send Mail Task Editor, I have for the Message Source property the following:

      @[User::TESTING_OnlyTesting]

The remaining tasks (including FTP Tasks) in the Foreach Loop Container are disabled for now as I am trying to figure out why the Foreach Loop only iterates the FIRST time, only iterates once.

When I run on SQL Server 2008 R2 the SELECT statement from the Execute SQL Task, I get 379 rows of results. The default value 111111 that I entered into the Variable Pane for the txtVendorFamilyNumber variable does NOT exist in any of these 379 rows of results. The 1st row of results has for the txtVendorFamilyNumber column the value 100110. Then the subsequent rows of results have the values 100115, 100120, 100130, et cetera, ending with the value 106370 in the last row of results.

I imported the SSIS package into Integration Services on SQL Server 2008 R2. When I imported to Integration Services, in the Import Package editor for the Protection Level I chose the "Rely on server storage and roles for access control" choice because there are FTP Tasks and we needed to use this "Rely on server storage and roles for access control" choice.

I created a SQL Agent job that executes this SSIS package.

When I run the SQL Agent job, no error happens and I get only ONE email with the value 100110 for the vendor family number in it. I should get 379 emails total, the 2nd email showing 100115, the 3rd email showing 100120, et cetera.

When I was testing while executing the SSIS package from within Visual Studio, I did NOT have the Send Mail task and I only had enabled one Script Task that had the ReadOnly variable User::txtVendorFamilyNumber and the following lines of code:

MsgBox(CType(Dts.Variables("User::txtVendorFamilyNumber").Value, String))

Dts.TaskResult = ScriptResults.Success

Executing the SSIS package with only this Script Task enabled within the Foreach Loop Container, I would get the ONE message box showing 100110 but I would not get any message box for a SECOND ITERATION of the loop.

Since my txtVendorFamilyNumber in the Variables Pane has the default hard-coded value 111111 that does NOT exist in the result set of the Execute SQL Task that feeds the Foreach Loop, and since the first and only email sent shows the value 100110 when I run the SQL Agent job that runs the SSIS package that is set up to send an email from within the Foreach Loop Container, the FIRST LOOP seems to run correctly and shows correctly the 1st value 100110 in the 379 rows of results that populate the Foreach Loop Container. Why does the Foreach Loop Container NOT loop more than once?

Could anybody give me any suggestions as to what the problem might be?

I thank you in advance for your consideration of my problem. I have been reading and reading on the Internet to try to find a solution but I have not solved yet my problem with the Foreach loop only iterating once.

Thanks much to you.

I created an Execute SQL Task in ssis package to get the counts and store it in the variable and I use the variable in the control flow

$
0
0

I always get the count as 0 for the variable. I am not sure what I am doing wrong. Please let me know if any of you know the fix.

Thanks

How to execute an SSIS package on a scheduled basis from remote server and pass in input files

$
0
0

I have an application server and a db server.  My db server has all things SQL Server stored on it (DBMS, SSRS, SSIS, etc.)  I have several nightly batch process SSIS packages (dtsx files currently) that will pickup an input file and import them into the database.  I would like to execute all batch processes from my application server as I have quite a few other ones as well that do other stuff outside of SQL Server via powershell.  My question is how to do this?  Is there away to execute them remotely via DTexec.exe, should I set them up as Agent jobs and somehow pass in the file names\location (how?), create and SSIS catalog, etc.?  

I need to easily be able to see if the packages execute successfully or not and if not capture the detailed information of why they failed from the remote server so I can use that to drive my process flow logic in the batch processes.

Run DTSX Package in SQL Server 2012

$
0
0

Hi,

Can I run the DTSX packages( Developed in SQL Server 2008 R2 ) directly in SQL Server 2012 without converting into SSIS . Can anyone tell me the procedures to execute a DTSx packages in SQL server SQL Server 2012 without converting into SSIS.

 One Common Parent Package calls all the Child packages. i.e 32 bit on 64 bit

Regards,


Execute Process Task showing all the SSIS Config variables in SQL Job History

$
0
0

Hi,

Am using an Execute Process task to execute my child package. And executing the Parent package from a SQL JOB.

I am using the same config file for both Parent and Child packages.

After the Job execution was Successful / Failure, in Job history it is showing all the variables from Config file which are not using in Child package. With the below message.

"The package path referenced an object that cannot be found"

I don't want to catch all the Variables information in Job History. Instead I need only the Success / Failure message.

PFA Screen.

Thanks,

Sailaja

How can I cursor through my external staged data for editing and cleansing?

$
0
0


Excuse me for being a newbie to the SSIS world and a novice here and learning as I go.

So we have successfully stored external data from a 3rd party vendor to a SQL Server staging table. Now the fun begins!

How can I cursor through that data first of all? Meaning...the external 3rd party data is associated with our Member data. How can I go through each row of that data to ensure that it matches one and only one member data row? It's possible that we could have multiple member rows for the same individual. If that's the case, then I want to handle that as a data anomaly and report on it accordingly..."Staged Data is associated with multiple member database rows". So in my opinion, it's better to go through the external 3rd party data row by row rather than having a mass INSERT...SELECT...which could result in multiple rows for the same external 3rd party member data row.

In most cases, however, the external 3rd party data will match up one-for-one.

Once we attempt to match up the external 3rd party data, then we want to perform some edits on it. For instance, the external 3rd party data we are supposed to be receiving are associated with certain diagnosis...Diabetes. So I'll want to make sure that there are "Diabetes" claims for the external 3rd party list just to QA it. In most cases we will find a "Diabetes" claim. But we want to make sure. And if we do not find a "Diabetes" claim, then we'll write that out to a Data Anomaly Table as well..."Diabetes claim not found for Member".

I have enclosed what we've got so far. Now it's time to add some edits and data stores for reporting purposes.

I GREATLY appreciate your review and am hopeful for a reply.



Using DESTINATION variable in XML task (Control Flow) as source in XML Source (Data Flow)

$
0
0

Experts,

I have an XML file and I am using an XML task with properties as below:

Operation Type - XSLT

SourceType - File Connection

Source - XML file location (In an expression, I have set the ConnectionString to get the value from a variable)

Variable - XML Path (Name) - C:\Test.xml (Value)

SaveOperationResult: True

DestinationType: Variable

Destination: User::ModifiedTest

OverwriteDestination: True

SecondOperandType: File Connection

SecondOperand: File.xslt (I am using this to PARSE Test.XML to remove some unwanted elements)

When I run the task on it's own, it completes successfully. So, I am assuming "ModifiedTest" variable gets populated with the PARSED XML file.

But, I want to use "ModifiedTest.xml" as the source in XML Source Editor in Data Flow Task. However, when I use "Data Access Mode" as "XML Data from variable" and chose "ModifiedTest" variable and click on "Generate Schema", I get an error:

"Unable to generate the XSD. The variable "ModifiedTest" does not contain XML data". I want to use the columns from this XML file."

How can I accomplish that? If we hard code the values OR if I use Test.xml as source and then GENERATE schema, that'd work. But, I want to use the destination variable from XML task as the source.

read data from excel

$
0
0

Read data from excel files  and query these records in database and send the output to excel destination 

for example :

empid

1

2

3

and so on in excel sheet

query :

select * from emp where empid in (1,2,3........)

Visual Studio Tools for Applications Editor

$
0
0

Hi all,

I'm having an issue with a new installation of VS Pro 2013.  When I try to create a Script Task and Edit Script, I get an error:

TITLE: Microsoft Visual Studio
------------------------------

Cannot show Visual Studio 2012 Tools for Applications editor.

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

Could not load file or assembly 'Microsoft.VisualStudio.Tools.Applications, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. (mscorlib)

------------------------------
BUTTONS:

OK
------------------------------

I was using the VS 2012 (Shell) to create a few SSIS packages, but was upgraded to the full Pro 2013 version and I think that VS is still looking to the old Script Language.  My only options for language are Microsoft Visual Basic 2012 or Microsoft Visual C# 2012, but I would think it would want to use 2013 instead.  I double checked the install and have Microsoft Visual Studio Tools for Applications 2013 installed (and also Microsoft Visual Studio Tools for Applications Runtime 3.0 - not sure if this needed to be uninstalled?).

Thank you for your feedback, and apologize if this is a rookie question! Hoping for an easy fix!

Execute SQL task for Email ToLine using COALESCE and two variables

$
0
0

Hello...

I am converting an old DTS package to SSIS. The old package consist of mostly ActiveX Script so I am breaking it down into steps. Basically... I am retreving a set of records that need to be sent via email to multiple people.  In my package to create my ToLine for the Send Mail Task I am using several steps. Frist I am using:

SELECT CASE
          WHEN EXISTS (  SELECT        users.User_EmailAddress
FROM            dbo.Errors INNER JOIN
                         dbo.Users ON users.user_id = Errors.MonitorAuditor_User_Id
WHERE        ([Audit_Id] = ?) AND ([ErrorCode_Id] = ?) ) THEN
             1
          ELSE
             0
       END AS ValidEventID

I use this to see if there is any records to create my email string. This works fine.  After this I have a Script Task that splits my pipe in two. When no records exist (User::ValidEventID == 0) I am loging that event to a log. When records do exist I am using another Execute SQL task to create the actual ToLine:

Declare @combinedString VARCHAR(max)

SELECT      @combinedString = COALESCE(@combinedString + ', ', '') + Users.User_EmailAddress
FROM            dbo.Errors INNER JOIN
                         dbo.Users ON users.user_id = Errors.MonitorAuditor_User_Id
WHERE        ([Audit_Id] = ?) AND ([ErrorCode_Id] = ?)

SELECT convert(varchar(4000),@combinedString) as StringValue

I have my resultSet set to Single Row. I have two variables coming if for the Audit_Id and ErrorCode_Id. My Result Set is set to a Variable: User::EmailAddressString.

Next it goes through a foreach loop to map to the ToLine email variable that I created named User:User_EmailAddress.

Then I am using that in my Send Email Task.

It all works fine when I hard code my variables into the COALESCE statement but as soon as I replace that with the ? that SSIS requires for variables I am getting the following error:

[Execute SQL Task] Error: Executing the query "Declare @combinedString VARCHAR(max)

SELECT      ..." failed with the following error: "Syntax error, permission violation, or other nonspecific error". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

I have tried changing my resultset property, I have checked my paramenters and my connection. I don't understand why it works fine when I have my varaiables hard coded but not when I change them to the ?.

Thanks in advance for you help in this matter.


Reach for the unknown!

how to create pdf from ssis

$
0
0

hi

just like we create flat file as a destination,

i need pdf file , how to do it?

The type of the value (DBNull) being assigned to variable "User::AlereCoachingEnrolledID" differs from the current variable type (Int32)

$
0
0

This occurred within an Execute SQL Task

I am trying to get my entire result set with the following SQL...

IF EXISTS
(
SELECT	[Alere_Coaching_Enrolled].[AlereCoachingEnrolledID]
FROM	[dbo].[Alere_Coaching_Enrolled]
WHERE	([Alere_Coaching_Enrolled].[MatchMember]	IS NULL
OR		 [Alere_Coaching_Enrolled].[MatchMember]	=	0)
AND		([Alere_Coaching_Enrolled].[Processed]		IS NULL
OR		 [Alere_Coaching_Enrolled].[Processed]		=	0)
)
	BEGIN
		SELECT	[Alere_Coaching_Enrolled].[AlereCoachingEnrolledID]
		FROM	[dbo].[Alere_Coaching_Enrolled]
		WHERE	([Alere_Coaching_Enrolled].[MatchMember]	IS NULL
		OR		 [Alere_Coaching_Enrolled].[MatchMember]	=	0)
		AND		([Alere_Coaching_Enrolled].[Processed]		IS NULL
		OR		 [Alere_Coaching_Enrolled].[Processed]		=	0)
	END
ELSE
	BEGIN
			SELECT	0	AS	[AlereCoachingEnrolledID]
	END

I want to handle using a Sequence Container and an Expression and Constraint if I have rows to process and if I do not...thus the 0 portion of the SQL...

Thanks for your review and am hopeful for a reply.

Cannot Debug SSIS packages in 64 bit mode.

$
0
0

Hi,

To anyone who may be able to help.  We are using SQL server 2014 Enterprise addition.  Visual studio 2013, SSDT latest version installed, all 64 bit tools installed.  I have tried to run my packages  with the "Run64bitRuntime" set to true ( project properties-->Debugging-->Run64BitRuntime = True).  Initially I thought it an issues with my package (we migrated them from SSIS 2008R2, they run fine with no issues within the 32 bit memory constraints) so I created a super simple package with VS 2013 in the SSIS 2014 environment from scratch, a lookup and an OLEDB Data source that's it.  Same problem.  No matter what I do when I debug in SSIS the 32 bit process (DtsDebugHost.exe (32 bit)) fires up, even though I have selected debug in 64 bit runtime I cannot get the 64 bit version of DtsDebugHost to run.  This is an issue because I am debugging projects that will utilise more than 4GB of memory for say a particular set of lookups.  Curiously when I schedule the projects to run in the  scheduler, it fires up a  64 bit process, and the package executes successfully, however if I can't debug in 64 bit mode and leverage the extra memory at the design stage, this is useless.  I have checked obvious things like the path environment variable, thinking perhaps SSIS debug doesn't know where the 64 bit exe is, but it is all fine paths are as they should be.  All 64 bit tools/dll's are installed.  I have tested this directly on the server, and on the client machine that I use and the issue is the same. If no one can help me here I guess I can log a support ticket.

thanks in advance.


Can't install SSDTBI_VS2012_x86_ENU

$
0
0

Hi,

New to SSDT/SSIS.

Last fall I installed SQL Server 2012 and Visual Studio 2012 Professional (demo version). Was trying to get SSDT installed. Realized I didn't need the full blown Visual Studio 2012 so I uninstalled that and installed SSDT ("SSDTSetup.exe").

Since that point learned about SSDT-BI and realized I had again installed more than I needed. Downloaded "SSDTBI_VS2012_x86_ENU.exe", ran the installer, it told me I had everything installed already, was not surprised since I had installed SSDT already. Others on the team have installed "SSDTBI_VS2012_x86_ENU.exe".

Today I (foolishly) decided to try and clean up and install "SSDTBI_VS2012_x86_ENU.exe" just so there were no compatibility surprises later. Uninstalled anything that made any reference to Visual Studio 2012, following these instructions: http://support.microsoft.com/kb/2771441. Made sure to remove any related updates as well. Used the SSDT intaller to remove Data Tools. My plan was run "SSDTBI_VS2012_x86_ENU.exe" and get a clean install of SSDT and the Visual Studio 2012 shell.

Now, when I try and install via "SSDTBI_VS2012_x86_ENU.exe", I am unable to select or unselect any features and I get a message "To continue, select a feature to install. If all features are already selected, these features are installed. You cannot add additional features".

Only thing I see left installed that is vaguely SSDT related is "Prerequisites for SSDT", but removing that did not help either.

All I am trying to do is get the Visual Studio 2012 version of the SSDT BI tools installed for ETL development.

I do have earlier versions of Visual Studio.

Any ideas?

Thanks



Parent Variable Configuration - Passing Connection strings..

$
0
0

I have one parent package and a few child packages. I am using SQL Server 2008 R2.

I want to pass variables from Parent Package containing Connection String and other data to the child package. I created few variables in parent package e.g. ParentConnectionString & child package e.g. ChildConnectionString. I set the child package variables using Package Configurations > Configuration Type = Parent package variable and map the ChildConnectionString value to ParentConnectionString.

I have put a script component that displays variables value set in the child package from parent package.

In child package i have a Connection of ConnectionManagerType = OLEDB. I have added an expression to set the ConnectionString using the ChildConnectionString.

When i run the parent package during the validation phase, it calls the child package. The script component displays the values are being set in child package from parent package but after that it fails saying  - invalid username/password; logon denied.

I suspect that the connectionstring expression are going to be executed at run time and not at validation time.

If i put the complete connection string in ChildConnectionString it works fine.

I am not sure if i am doing anything wrong?



SSIS downloads

$
0
0
I am trying to find SSIS for sql server 2008 r2.  I have a MSDN subscriber id but I do not see the SSIS in the download options.  Am I not allowed to download it or is it bundled in another download?

Migrate data from Access 2003 database to Azure

$
0
0

Hello,

I have to migrate data from an old Access 2003 database to another existing database with different table and columns. For example, I have Customers table in both databases, but in the local database I have Name, Surname1 and Surname2 columns and in azure I have only FullName column (Azure.FullName = Local.Name + " " + Local.Surname1 + " " + Local.Surname2). Another difference is that in local DB I have PhoneNumber and MobilePhoneNumber columns and in Azure only PhoneNumber column. Sometimes PhoneNumber is home phone number, other times mobile phone number or maybe empty, so I have to check if both columns and get only one phone number. Other thing that I have to do is the following: for each row that migrates in Customers table I have to create another row in another table named Services with the ID generated automatically in the Customers table.

These are very complicated things for me because I have never used Integration Services. I'm doing some test and using SQL Server Import and Export Wizard 32-bit (running from Apps screen of Windows 8.1) I have created a simple package (don't know if it is a package). In this case I have migrate only direct columns. Then I can see my test element in MS SQL Server Management Studio in MyLocalServerName->Stored Packages->MSDB->MyTest. But now I don't know what I have to do with this...

In some sites I can see things like that:

But I don't know how to get this design view...

I'm working with Windows 8.1 Pro (x64) machine with SQL Server 2012 Enterprise (on the intallation time I check all components).

Can you help me explaining the steps? Any useful tutorial?

Thanks in advance,

Jon.

Xp_cmdshell with elevated privilege

$
0
0

Hi,

I am facing issue with XP_cmdshell after upgrading OS form Windows 2003 to 2008.Actually there was one scheuled JOb in SQL server which run WMI command to fetch disk space details from all the server in our environemnet.Command I used for this is

wmic  /node:Myservername LOGICALDISK get Systemname,Caption,VolumeName,Description,FileSystem,Freespace,Size /format:csv.xsl   1>>c:\test1.txt 2>>c:\testerror.txt

It was configured in SQL Agent Jobs & it run through one proxy account which having Local admin access to all the Servers.

There was no issue till 2003 to run the Jobs.Job ran sucessfully daily basis.But problem started after upgrading Windows to 2008 & I am able to identify why this jobs failing now & but not getteing any option to resolved this.

Actually from 2008 there is term UAC(User Access Conttrol) which means there are certain task which you can not run even if you have Administrator privilege until you ran the application with "Run as Administrator".

When I ran above command with just clicking cmd.exe it fails with error 'Access Denied' but same command if we ran after clicking 'Run as Administrator',it shows the output.

This is the reason my Job is also failing with error 'Access Denied' but I am not sure how I can implement 'Run as Administrator' for elevated privilege  for xp_cmdshell.

Googled suggest to run command 'runas' to open the command promt with Administrator access but I don't think it will work in this case.This is actually run the cmd with for perticular user but it also not give elevated privilage so that I can run my WMIC command.

Any suggestion apprecaited

Rgds

Debasish Bhattacharya

Viewing all 24688 articles
Browse latest View live




Latest Images