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

Get the Excel file creatoin Date through For Each Loop each excel file in SSIS

$
0
0

I had  For Each Loop

in Collection Path had 2 files it had Creation date of 25/01/2014

So I want Update in Table that date as File_Receive_Date column

How Can I do ??

in variable I am using VFile_FULL_Name(=Filename with Path by attach to Foreach loop collection&connection manager)

which other System Variable to use in SSIS  ??

I have created vRef_Date  but in Expression =====??? what should I do through only SSIS ??

Thanks

Madhu


Data Conversion

$
0
0

How to insert the date data in the database through SSIS Package .

start_date            end_date

01/08/2014         01/01/2015

01/10/2014    02/02/2015

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?

,

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

Server not running SSIS job in 32bit mode

$
0
0

I have a package that I developed in VS2012 (using the SQL Data Tools component) which collects data from a DBF file using the VFPOLEDB provider, and puts it into a database on a SQL Server 2012 X64 server. The project containing the package has the DebugOption of Run64BitRuntime set to false. I have imported this package to the SSIS Package Store of a test and live server (identical setups). The VFPOLEDB provider is installed on both, and I can see in the registry of both machines that it's there for 32bit runtimes.

The package runs fine on the test machine, but fails on the live machine. The live instance of SQL does not appear to recognize the 32bit VFPOLEDB provider that is installed.

The only difference in the instances of SQL is that the live environment has an Integration Service Catalog set up, where as the test does not. Looking at the logs of the servers, when the live starts, it runs sp_ssis_startup, and then logs messages about unsafe assemblies being loaded in. This SP is not run on the test environment because there is no catalog.

The jobs I create have the flag set to use the 32bit runtime, but I can't help but feel that the SSIS Catalog is having an issue with the VFPOLEDB I am using, and not loading it.

I don't really know anything about the SSIS catalog, so is anyone able to suggest any direction I could move in?

Connection Issues in the Connection Manager

$
0
0

Good Morning Friends,

I hope i will get some answer or some directions here . I have been trying to find a solution for months. I have two servers TESTSQL(2008R2) PRODSQL(2008R2) . On these twos servers i have a package that loads data from source databases into the staging tables in the data warehouse. The source servers were 2005. The packages were running great with no problem. They have upgraded the source servers to 2008r2 and now the package on the PRODSQL(2008R2) is not working. I'm getting the connection manager connection error. we have checked all the possible places (like nameof the instance, firewall -- all the servers are internal servers). The package on TESTSQL is able to connect to the source servers and this is how we have been running the package for the time being. Please see the below error. Any documentatiuon or link will be of great help.

TITLE: Connection Manager

------------------------------

Test connection failed because of an error in initializing provider. Login timeout expired

A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.

Named Pipes Provider: Could not open a connection to SQL Server [53].

------------------------------

BUTTONS:

OK

------------------------------

Multi Part Identifier Could not be Bound - Only when parameters are referenced in excel.

$
0
0

Hello,

After much research without result, I submit this problem to the masses.

Excel 2010 OCDB.

Looking to gather data from specific user input which concatenates comment rows.The query work well until I substitute the specific parameters with (?) to make them a reference point within the excel workbook.

I narrowed the problem to the Substring clause and I tried Stuff without luck to concatenate rows into one. Without the concatenating clause, the query works.

SELECT
timecard.matter,
timecard.workdt,
timecard.billhrs,
timecard.billdol,
	substring((
		select ' ' + t1.ddesc
		from timedesc t1
		where t2.index = t1.index
		order by t1.dindex, t1.dline
		for xml path ('')
		), 1,1000000) AS 'Narative'

FROM
Timekeep timekeep,
Timecard timecard,
Timedesc t2

WHERE
timecard.index = t2.index
AND timecard.tk = timekeep.kinit
AND timecard.matter= (?)
AND (timecard.workdt>=(?) AND timecard.workdt<=(?))

GROUP BY timecard.matter, timecard.workdt, timecard.billhrs, timecard.billdol,timecard.billdt, t2.index
Thank you in adance.

excel data issue of string mixed with number or decimal

$
0
0

I have an excel file (.xls) from the client. The file only has one column Name. For some reasons, a couple of data are number or decimal (see the following example).

Name

abc

xyz

123

3.98

When I tried to import data to the table (mssql 2008) (one column with nvarchar(255)), I got the error:

The column status returned was: "The value violated the integrity constraints for the column.".

I had to open the file and added ' before the number or decimal 

Name

abc

xyz

'123

'3.98

Although it worked this way, it is not a good way. Any good suggestions to do it without modifying the file? Thanks.


A Fan of SSIS, SSRS and SSAS



SSIS Help For each Loop Container

$
0
0

I need a little help with this process that I am developing. I am fairly new to SSIS so please bear with me. I have done research online so If I seem limited in my knowledge please apologize me.

Requirement: I have a folder where we will have flat files monthly they could be one or more...

each file will have the following name standard "123456.EEAKQ2.EASDREWA12A.BID".

What I need to do is maintain a table which will have filename and date when it was added to the folder.

I have created a package with the following components "For each loop" which grabs files from a source folder.

This is where I am stuck. I need to grab the file name from the path and insert it into the table.

Can someone help me with this?

Thank you


FM


FM

how to call multiple SSIS package from one batch file?

$
0
0

Experts,

I've batch file as "ssis.bat" as below:-

DTExec.exe /F "C:\TFS\SSIS400.dtsx"
/Set \Package.Variables[User::ClientCode].Properties[Value];AS

DTExec.exe /F "C:\TFS\SSIS400.dtsx"
/Set \Package.Variables[User::ClientCode].Properties[Value];AD

DTExec.exe /F "C:\TFS\SSIS401.dtsx"
/Set \Package.Variables[User::ClientCode].Properties[Value];ED

I'm trying to run two packages 400.dtsx & 401.dtsx where 400 package is runningtwice with different variable value and 401 package is totally different package with different variable value.

When I run above batch file it runs only the first part (400 package with AS variable value) with "AS" variable value runs successfully but second part overwrite first part (400 package with AD variable value) and finally third part never executes.

Can somebody please help me with my request where I want to execute above 3 DTExec commands to execute 3 times with appropriate variable values.

Thanks

Regards,

Kumar


Please do let us know your feedback. Thank You - KG, MCTS

How to change color of rows count dispalyed while debugging ssis packages

$
0
0
Hello,

in visual 2013 ssdt version I have row count displayed in white color on pale background: bit.ly/1oWP1Cm

I'd like to have it in black. I know it should be changeable in Options -> Fonts and Colors, but what option should I change from myriads available?

Thank you in advance.

When will Attunity SSIS connector support SQL Server 2014?

$
0
0

When will Microsoft be releasing updates to the SSIS Attunity Connector for Oracle, to support SQL Server 2014?

Here's the link to the previous version released by Microsoft, for SQL Server 2012:

http://www.microsoft.com/download/en/details.aspx?id=29283

These are not compatible with SQL Server 2014, as described here:

http://social.msdn.microsoft.com/Forums/sqlserver/en-US/8a6ded27-8f6e-4957-82e3-18b26ee46817/action?threadDisplayName=attunity-ssis-connector-support-for-sql-server-2014

I have multiple clients holding off on SQL Server 2014 upgrades until this issue is resolved.

Exporting SQL data to Excel 2010 files - Excel sets all columns to DT_WSTR, ignores numeric or currency

$
0
0

It looks like this has been a problem since forever, but I'm hoping someone has a solution.  I'm exporting SQL data to an .xlsx file.  I have the columns in my query set to the appropriate values, e.g. SELECT Cast(column1 AS nvarchar()) 'column1', Cast(column2 as currency) 'column2'.  I have a spreadsheet and I've set the data type for each column.  I have an OLEDB connection manager with the connection string ofData Source=C:\MyFile.xlsx;Provider=Microsoft.ACE.OLEDB.12.0;Extended Properties="Excel 12.0;";  When I look at the Advanced Editor of my OLE DB Destination Component, I see that all the Input Columns are of the correct datatype, but all the External Columns are of datatype DT_WSTR.  

How can I get my numeric, currency, date fields to be written to Excel as numeric, currency, date?  Right now they all get written as text, any numbers get single quotes put in front of them so they are treated as text.  

I don't get it, SQL and Excel are both Microsoft, why is it so hard to get them to work together?!

Syntax proble joining 2 queries

$
0
0

Hi,

I need to join 2 query together but I always getting a syntax error, bot query are returning the proper results but no matter what I do it does not work, can anyone tell me how to proceed with this, basically, I need to see a count on my results

Thanks

BTW I am coping from SSMS and this is the result I get, is there a better way to copy/paste the code without so much space between lines

Q1:

select

DISTINCT IDMagasin, NoCaisse, NoFacture, SalesDate, ID_Z, Code

from

stgDailySales s

where

NoFacture in(selectDISTINCT NoFacture

from stgDailySales f

where Code='it'

and NoFacturein(selectdistinct NoFacture

From stgDailySales

         

where Code='Es'and IDMagasin= s.IDMagasin

         

and NoFacture= s.NoFacture

 

and SalesDate= s.SalesDate))

and

Code ='es'

and Q2:

select

COUNT(code)


from

stgDailySales g


where

Code ='it'and NoFacturein(selectdistinct NoFacturefrom stgDailySales

where Code='Es'and IDMagasin= g.IDMagasin

and NoFacture= g.NoFacture

and SalesDate= g.SalesDate)

AND

id_Z >(select id_z from stgDailySales

where Code='Es'and IDMagasin= g.IDMagasin

and NoFacture= g.NoFacture

and SalesDate= g.SalesDate)


group

by IDMagasin, NoCaisse, NoFacture,SalesDate, Code

    

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




Varying result set and binding parameters in sqlcmd from variable

$
0
0

SSIS  - Support of Multiple versions of our product

Our Enterprise Data warehouse consolidates data from multiple data sources.  We have a requirement that we should be able to support data collection from different version of these data sources at the same time.

Ex. Customer has three different versions of our product installed 7.3,  7.3.1 and 7.3.2. The data warehouse would in this case would be on version 7.3.2, but should be able to collect data from prior versions of the data sources.

We use stored procedures to collect data from sources into our staging area and then we transform and load it on to the warehouse. The design of SSIS packages are that, there is one main package that executes packages for each table that we collect data from the source. The main package is invoked per source that we need to collect data from, if there are three sources at run time there will be three instances of the main package running. These packages run on the warehouse machine to pull the data from the source system.

We would like to maintain one version of these packages on the warehouse and support collecting data from different source versions.

Challenges

 

  • The signature of stored procedures on the source system has changed between versions
  • There are some additional fields returned by these stored procedures in the newer release

 Example

 7.3 version signature :[dbo].[PDW_GetMediaAgentSummary](@LastVersionIDASBIGINT,@InitializeDaysasINT= 60,@NextVersionIDASBIGINTOUTPUT)

7.3 Sp1 version signature:  [dbo].[PDW_GetMediaAgentSummary](@LastVersionIDASBIGINT,@DataStartDateASDateTime2(3),@NextVersionIDASBIGINTOUTPUT)

 Also, let us say in 7.3 this stored procedure returned 8 fields and 7.3 sp1 it is returning 10 fields.

The way we are trying to accommodate is to use “SQLCmd from variable” option in the OLE DB source to cover the signature difference, but this option does not allow us to bind parameters to variables to get the output value. The second issue of additional fields (or the lack of additional fields from the 7.3 procedure), we tried to turned off the metadata validation, but we get field not found error at run time when we run the SSIS package against 7.3 version. Looks like the only way we could solve is to duplicate the data flow tasks, based on the source version. Looking for better way to do this, since this could go out of control as the number of releases increases.

Appreciate help on this.

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.

expression builder

$
0
0

i want to use if function in expession builde .

iig(month( @[User::edate) ==2 and year(@[User::edate) ==2015), 4 ,12) 

please help me

script task

$
0
0

hi

i am using c# in my script task.

i  need to function which gives me 30 days back date in c#.

 newTime = DateTime.Parse("2014-01-16");

instead of this had code i need something which gives me last month date

ex if today we have 2015-02-16 ,it should return 2015-11-16 ,basically last  month date

OData deployment gotcha

$
0
0

Just posting this as a FYI as it took me a little while to figure out....

Developed a new SSIS ETL job using the OData provider, first version deployed ok, and I was debugging locally fine. Once I reached code complete I wanted to promote to the Dev server to check out the Environment variables but it kept failing..

So once I checked out the operations messages

SELECT * FROM [catalog].[operations_messages] WHERE operation_id = ??

It came back with

Failed to deploy the project. Fix the problems and try again later.:Unable to create the type with the name 'ODATA'.

I'd forgotten to install the SSIS OData adapter on the Dev server.

Hope this helps


Paul

Viewing all 24688 articles
Browse latest View live


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