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

Need to delete Blank Columns from Excel File using SSIS Script Task.

$
0
0

Hi All,

I want a script to delete blank columns from excel file. Could you please help me for this.

Here goes my requirement : I will receive daily some excel source files and i want to load this into our DB,the file which we receive is same layout but some times file contains some empty columns due to which my source connection will fail. my plan is using script task i want to check if any columns are null or empty then i want delete that column, so that next my dataflow task will never fail for this issue. so i can schedule my package.

Regards

Prashu



Microsoft.SqlServer.Dts.Pipeline assembly don't exist in my library

$
0
0

Hi, i want to create a SSIS Custom Component, but i when search the Microsoft.SqlServer.Dts.Pipeline reference, i don't foundd it.

I have SQL server 2012 Enterprise,SQL Data Tools, Client Tools and all features installed.

Anyone knows what can i be?

Thanks.



SSIS - calling a package from an external solution

$
0
0

Hi all,

I have a solution with a package. I want to call another package that is in another solution.

I try to do this using external reference instead of project reference. How do I do this?

I tried to use SQL server and File System but I can't find the external package reference.

Anyone can help/provide a tutorial?

Thanks!

Error at SSIS package execution from SP using xp_cmdshell (package stored at file system)

$
0
0

 I have been trying to execute an SSIS package in SP using xp_cmdshell, however I am receiving error as

Description: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available.

Command line I used is

SELECT @Cmd = 'DTExec.exe /FILE "' + @PackagePath + '" /MAXCONCURRENT 1 /CHECKPOINTING OFF /REPORTING EW'+ ' /SET \Package.Variables[User::strVar1].Properties[Value];' + @strvar1+ ' /SET \Package.Variables[User::strvar2].Properties[Value];' + @strvar2

EXEC @ReturnCode = linkedserver.master..xp_cmdshell @Cmd

I ran this code seperately and it is working well. I tried changing the protection level, however the package already has protection Level as DontSaveSensitiveData

Have I been missing anything in this? Please suggest


SUM Time Values

$
0
0

Hi friends,

i have a problem to SUM Time Values.
I have some Time Columns which contains Hour and Minute Values and i want to sum them.

But its not possible with the aggregate Transform.

Do you have any idea how could i do this?

Thanks in advance and Best Regards,
Basti

SSIS Script task runs in SSDT but not from Integration Serivces Catalog

$
0
0

Hi,

I have a package that runs a script task that extracts data from active directory, this works great in SSDT however when I deploy it it the server it fails on that task with a generic error "an operations error occurred". I have set my environment to use the same values as the project parameters to rule out connection differences. they are both being executed by the same user looking at the same server. the only difference is where it is being hosted. I have even remote desktoped on to the server itself and executed it in SSDT and that worked. 

I am at the end of my wits with this, any advice would be very welcome.

BI

2012 SSIS Exporting SQLServer data to multiple sheets of Excel file

$
0
0

Hi 

Challenge

I am trying to write an SSIS package to export an SQL Table Data to Excel 

  • Table has 8 Columns ,  Transactionid INT,Currency CHAR(3),CustomerId INT,CustomerName NVARCHAR(50),Paymentdate DATE,Amount DECIMAL(25,2),rectypeId INT,PaymentDesc NVARCHAR(25)
  • Each sheet in Excel will illustrate data broken out by Customer ID & Currency
  • Excel Sheet name will be a concatenation of Customer ID and Currency i.e. 12234 USD 

What I am Working from so far 

All the above are the closest examples I have come across but all examples online I have seen are in 05/2008 VS so difficult to translate to 2012 but I have the concept and the structure setup in 2012 

My issue is , I am getting very generic error messages when I try to execute what I have wrote based on the above it is difficult to dev in 2012 and be 100% I have all the configuration setup , plus the posts above are not very detailed.

If anybody knows of any other detailed examples please send on :) I have spent a few hours searching now and reading

Example of my Frustration 

For simplicity , I am just trying to illustrate by Customer ID , add in the Currency grouping later

SQL Task to generate sheet list . This task will execute SQL script to get distinct list of CustomerID's from table. This will then be stored in a object variable for use within the loop to create the sheets.

Issue

I can this to work returning a single Result set but trying to return the Full result set is when I get issues 

I have verified against the above examples , i.e. If the result set type is Full result set or XML, you must use 0 as the result set name.

Error I receive : 

  • [Execute SQL Task] Error: Executing the query "SELECT Distinct CustomerId FROM [Payments].Externa..." failed with the following error: "The type of the value (DBNull) being assigned to variable"User::CustID" differs from the current variable type (Int32). Variables may not change type during execution. Variable types are strict, except for variables of type Object.
    ". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
    43510
    48598

Sql Task Editior setup

The User::CustID DataType is an Int32

Full result set

Result set:Result Set Name = 0 , Variable name : User::CustID

Query is SELECT Distinct CustomerId FROM [Payments].ExternalPostPaymentsRecCarlo ,No NULLS are returned 

Result Set returned is 

43510
48598


SSIS + Slow performance on SCD component on a compressed dimension table with only 150.000 rows

$
0
0

Hi all,

I have a dimension table with only 150.000 rows. I'm using a SCD component which is running way too slow. (Atleast 15+ minutes). Other dimensions which are a lot bigger are running faster. I have no idea 

The SCD query behind this :

(@P1 uniqueidentifier)SELECT [BK_VISIT], [CAT_VISIT_STATUS], [DTT_VISIT], [TX_NAME], [TX_VISIT_STATUS_NAME],[FK_DATE], [FK_INVOICE_DATE], [FK_POS],[FLG_STATE_CODE],[FLG_STATUS_CODE] FROM [pos].[TD_VISIT] WHERE ([BK_VISIT]=@P1)


My only thought so far is that the uniqueidentifier component is slowing this down. Any experience with this?

EDIT : apologies, can someone move this to the SSIS section?


Stored procedure to create partition scheme not working with variables

$
0
0

Hi all,

I have a stored procedure where I use variables but it's not working.

CREATE PROCEDURE [CDB].[Create_partition_scheme] @InterfaceId NVARCHAR(20)
AS
BEGIN

DECLARE
	 @FG1 NVARCHAR(50)
	,@FG2 NVARCHAR(50)

SET @FG1 =  @InterfaceId + '_FG' + 1;
SET @FG2 =  @InterfaceId + '_FG' + 2;

CREATE PARTITION SCHEME DailyPS AS PARTITION DailyPF
TO (@FG1, @FG2);

END

GO


Anyone know what I'm doing wrong?

Send Email Task within For Each Loop container Expression builder error

$
0
0

Hi,

could somebody help in setting up Send Mail Task with regard to screenshot in attachment.Namely, according to Tutorial: https://msdn.microsoft.com/en-us/library/cc879316%28d=printer,v=sql.120%29.aspx

I have prepared what is visible in attachment but, it is not possible to evaluate expression forToLine property. What am I doing in wrong?

Two variables at beginning are for the tutorial purposes only while, variables belonging to actual project are three the later ones.

Thanks

Referencing dynamic variables in the Script task

$
0
0

Hello,

The package I am working with has two string variables, strFileStringName which is static with it's value hard-coded and strSiteFileName which is a dynamic with the expression defined as:

@[User::strFileStringName] + "_" + SUBSTRING ( REPLACE (@[User::FileDate], ".", ""), 5, 4)+SUBSTRING ( REPLACE (@[User::FileDate], ".", ""), 1, 4) + ".xls"

FileDate is another dynamic variable derived from GETDATE.

The expression works just fine in the expression builder, but when the used in a script task, only the static variable is recognized but not the dynamic variable. I have tried to use the MsgBox to output the variable, the static variable values shows up but not the dynamic variable. The processing icon keeps going in circles.

Any idea why/where I am going wrong?

Thank you.

Using SQL Server Configuration

$
0
0
In effort to make everything Dynamic as possible i came across this question. 

We would like to use Central SSIS Configurations table for all our SQL Server Configuration but this configuration type uses SQL server connection so how is everyone passing connection info to this connection. Do you use XML configuration ? 

FTP Load

$
0
0

Hi Experts,

Please guide me for the given requirement below :

We have a FTP location which stores the backup of DB's on daily basis. I need to copy the backup restored on the prior date to a new ftp location and also ensure the count before copying the DB's to new location. The backup file could be any naming convention but will contain the valid date format for prior date like . DBName_Backup_2016-01-12_2r3fwe.Bak

So in total 20 different backup files are expected if the count is less then that we shouldnt copy the backups to other ftp location.

So let me express in steps below.

1.Check just for the prior day backup file in the ftp location.

2.If they exist check for the count it need to be 20 if less send email with the count and the name of the available backups.

3.If the backups are found move to a different ftp location and remove the existing backups from that folder .

4.Rename the backups (DBName_Backup_20160112.bak) same prior date but alter the format  as in the braces and send an email when copied.

5.Next check for existence of a text file with prior date in 2 different folders and in 2 other folders in which the file can be prior date or 2 dates old.

6. If the files are not found send an email with the details of the folder in which the file was missing the file is in text format for which we need to check the existence.

7.If all the above is satisfied run a ssis job.

8. Send an email the SSIS job has started.

9.When the SSIS job completes send another email about the competition.

Sorry for the lengthy requirement it will really help me and my team .

 We have both SSIS 08/12

Thanks in advance 

Priya 



How can i load data from excel to sql table with multiple columns

$
0
0

Hi 

My excel sheet having the data by following way..

 

                                               07/02/2015               14/02/2015           21/02/2015          .. n no of dates

Customer-Name      Location                      Revenue       Cost                  Revenue       Cost             Revenue Cost 

   Prdeep                       us                          1000          800                     1100           500            500          600

       xyz                         uk                          2000          1500                   400            800             400            100

Now i need the data in the following way....

Customer name          location         date                    revenue             cost

pradeep                          us            07/02/2015          1000                800

pradeep                           us            14/02/2015          1100              500

.............................

I got the data properly except date values.. and i used unpivot transformation in ssis..

I like to load the data by using ssis package.. pls guide me the best practice to do this task.

Thanks in advance.

Starting DTS Package from SQL AGENT

$
0
0

 

Hi, i have some problem with SSIS Packages. I try start them from SQL Agent Schedule. Shedules are working, but packeges did't starts. i get this error list in output file.

 

Microsoft (R) SQL Server Execute Package Utility
Version 10.0.1442.32 for 32-bit
Copyright (C) Microsoft Corp 1984-2005. All rights reserved.

Started:  16:06:00
Error: 2008-10-31 16:06:00.42
   Code: 0xC0016016
   Source: 
   Description: Failed to decrypt protected XML node "DTS:  Property" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available.
End Error
Error: 2008-10-31 16:06:00.42
   Code: 0xC0016016
   Source: 
   Description: Failed to decrypt protected XML node "DTS:  Property" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available.
End Error
Error: 2008-10-31 16:06:00.67
   Code: 0xC0202009
   Source: Package Connection manager "axsrv2.AxFinCut"
   Description: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E4D.
An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80040E4D  Description: "Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.".
End Error
Error: 2008-10-31 16:06:00.68
   Code: 0xC020801C
   Source: KontrAgent Data Flow OLE DB Source [1]
   Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "axsrv2.AxFinCut" 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: 2008-10-31 16:06:00.68
   Code: 0xC0047017
   Source: KontrAgent Data Flow SSIS.Pipeline
   Description: component "OLE DB Source" (1) failed validation and returned error code 0xC020801C.
End Error
Error: 2008-10-31 16:06:00.68
   Code: 0xC004700C
   Source: KontrAgent Data Flow SSIS.Pipeline
   Description: One or more component failed validation.
End Error
Error: 2008-10-31 16:06:00.68
   Code: 0xC0024107
   Source: KontrAgent Data Flow
   Description: There were errors during task validation.
End Error
DTExec: The package validation returned DTSER_FAILURE (1).
Started:  16:06:00
Finished: 16:06:00
Elapsed:  0.672 seconds

If i runing package from SSIS it works perfect. I understand that it is authorization problem. Most likely SQL Agent have no permission to run package, BUT WHERE???? A know that there is SQLAgentCmdExec user, BUT WHERE?? I don't see this user on my comp. In Job property "Owner" i set my domain account, it have all permissions everywere. What is the problem?

SSIS - Error Code 0x80004005

$
0
0

I have searched through many forums concerning this error:

Error at Load Data Table Position Requisition [Load Data Table SFactor_PositionReqisition [1]]: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred.  Error code: 0x80004005.

An OLE DB Record is available.  Source: "Microsoft OLE DB Provider for Oracle" Hresult: 0x80004005 Description: "Unspecified error."

An OLE DB record is available.  Source:  "Microsoft OLE DB Provider for Oracle" Hresult: 0x80004005 Description: "Oracle error occurred, but error message coud not be retrieved from Oracle.".

An OlE DB record is available.  Source: "Microsfot OLE DB Provider for Oracle" Hresult: 0x80004005 Description: DataType is not supported.".

Error at Load Data Table Position Requisition [Load Data Table SFactor_PositionRequisition [1]]: Opening a rowset for "PHSF"."SFACTOR_POSITIONREQUISITION"" failed.  Check that the object exists in the database.

Additional information

|__> Exception from HRSULT: 0xC02020E8 (Microsoft.SqlServer.DTSPipelineWrap)

I am using SQL Server 2008 R2 (BIDS).

I think I get the issue as this only occurs on one of five table loads and this table is trying to take an NTEXT (Excel) data column and send it to a NCLOB Oracle (10g) data table.  This behavior was not experienced until I added the NCLOB column to the data table.  The data is required and setting the Oracle data column to VARCHAR2(2000) is not large enough to hold the data being imported. 

Is there a way to import the data to an NCLOB with this version of SSIS?  Maybe transform the data from NTEXT to TEXT to Varchar(Max)?  Any help and direction offered will be greatly appreciated.

Thank you.


MT

Delimiter to replace commas?

$
0
0

I have an SSIS package that previously outputted a tab delimited file but now i need to change this to comma delimited output file.  The problem I'm having now is that some of the data in the SQL values have commas in them so when I generate the output file it is shifting the data sometimes when it should not if the data has a comma in it.  How can I fix this?

e.g. if this is my table

Col_A   Col_B   Col_C
a,b,c   d,e,f   g,h,i
j,k,l   mnop    qrst
and if i want to export this to a comma delimited file then how can I do this?  Could I just replace all of the commas with some sort of delimiter in the TSQL end?


Ryan D

Pervasive SQL v12 o SQL server 2012 via SSIS - HELP!!

$
0
0

I have been trying to import data from Pervasive v12 to SQL Server version12 for quite some time to no avail. I can connect but I am getting the error and have tried many different ways.

I need to build a package that can be run routinely to pull the information from Pervasive to SQL for an eventual cutover, decommission and building of a web interface for archive purposes.

.NET Provider for ODBC = "Cannot locate the mapping file to map the provider types to SSIS types".

Pervasive Current release 4.2 = "Column information for the source or the destination, could not be retrieved or the data type from the source were not mapped correctly"

pervasive OLEDB = "Cannot locate the mapping file to map the provider types to SSIS types".

Would appreciate some help.

Execute Package from Another Project SSIS 2012 (Project deployment Model)

$
0
0

Hello,

How can we execute a package from another project passing the parameter values etc (In project deployment model)? Currently after adopting to project deployment model we could able to reference to packages within the project. 

does anyone encountered anything similar before? Tried scripting the package from catalog and using Execute t-sql task but i don't see how we could pass parameter values to the package.

Thanks!!

Invalid License Message when Debugging Script Transformation

$
0
0

I am trying to debug a Script Transformation in Visual Studio 2013 (Update 5). When the package execution gets to my Transform, the following message is displayed instead of the VSTA Debugger:

Some sources on the web suggest uninstalling and reinstalling SSDT-BI. I've uninstalled SSDT-BI, but when I attempt to reinstall, the following error occurs:

Does anyone have a solution for this?

Viewing all 24688 articles
Browse latest View live


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