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

How to export data to multiple excel sheet dynamically

$
0
0

Hello,

I followed directions from one of the links to create multiple excel sheets dynamically to export large data (over 3 million).

I have few variables set, and two of them are ExcelTable, ExcelSheetName. ExcelTable is to create multiple excel sheets, and ExcelSheetName holds the query to create ExcelTable.

I have a Execute SQL Task in which I set a variable User::ExcelTable and in the ExcelTable variable, I have the expression: "CREATE TABLE '"  + @[User::ExcelSheetName] + "' ('Line_No' Long, 'Group1' LongText)".

ExcelSheetName has the expression: "Sheet" + (DT_WSTR,12) (@[User::Loop] + 1)+"$"

But the Create Table is failing. Please help.

Thanks,

jkrish


SSIS 2012 with SharePoint 2013

$
0
0

Hi

I have created an SSIS package which connects SharePoint 2010 using SharePointAdapter(http://sqlsrvintegrationsrv.codeplex.com/releases/view/17652).

Now the SharePoint is going to be migrated from 2010 to 2013.

So will my package support ?? If NO, what will be the workaround. IfYES, do I have to change adapter or upgrade anything. I do not have SP2013 installed so can't check.

Please help me at earliest.


Please Mark as Answer if my post solved your problem or Vote As Helpful if this helps. Blogs: www.sqlserver2005forum.blogspot.com

SSIS 2012 Help with dynamic connection string.

$
0
0

I'm new to 2012 so I'm trying to figure out how to build and execute a package within SSDT (VS 2010 shell) that allows me to easily switch database environments. I'm trying to use a project level OLEDB Connection Manager and dynamically change the connection string to accomplish this.

No matter what I do the OLEDB connection always uses the connection string it was originally created with.

I've read numerous blog posts instructing how to do this and after about the 50th time it's starting to make sense. However, I must be doing something wrong as I can't get it to work. Any help would be greatly appreciated.

Here are the steps I've taken:

  1. Create a simple project with one execute sql task and one project level OLEDB data source. The sql task simply counts rows from a table. The two databases (Dev and Test) have different row counts so I can verify which database is being accessed.
  2. Create two solution configurations via the Configuration Manager dialog. Dev and Test.
  3. Create a project level parameter called connString.
  4. Created an OLEDB data source with the values of the Dev database.
  5. Parameterized the OLEDB data source with $Project::connString.
  6. Entered values for connString for both Dev and Test via Manage Parameter Values dialog.

To see if things are working correctly I did the following:

  1. Selected Dev as the active configuration. The value of connString was updated appropriately as seen in Project.params [Design] window.
  2. Pressed F5 to execute the package.
  3. Expected results were achieved.

Then:

  1. Selected Test as the active configuration. Again, the value of connString was updated appropriately as seen in Project.params [Design] window.
  2. Pressed F5 to execute the package.
  3. The package executed against the Dev database rather than the Test database.

Here is what I have tried so far:

I delete the Value of connString in the Project.params [Design] window. The package failed to execute do to database connection.

I then typed in some random nonsense for the Value of the connString in the Projct.params [Design] window. The package executed against the Dev database.

Defining a Variable in Data Flow

$
0
0

Hello, all.

I'm in the process of relearning SSIS after a year-long hiatus and I was in the process of learning back then.

I'm trying to streamline a SQL stored procedure and I need to define a variable for use in a Derived Column task. Unfortunately, I haven't a clue how to do it. I've searched online, but I've yet to find anything that gels into something clear in my head.

Anyway, the variable definition is;

DECLARE @PreviousInputDate DATETIME
   SELECT
      @PreviousInputDate = Max([Input Date])
   FROM
      Staging2

I need to create the variable so that its scope includes all tasks in the data flow.

I'll keep digging around, but thanx in advance for any help!

Assigning a SQL NULL to an SSIS string - A SSIS Flaw ?

$
0
0

Hi,

I fetch a result set with an execute SQL task. It has only one column NullTime varchar. It has three rows, first one is NULL. I want to simply iterate and display the value of these rows. If I do it only by C# script, then there is no problem. The NULL is displayed as a blank. The same thing can also be done with a foreach loop.

How to do it with foreach - use that loop to read each row and set the value of each row to SSIS string User::STR_WORD. Then, simply display User::STR_WORD with a C# script task.

In the pure C# method, I can even assign the blank value (actually a NULL) to the SSIS string. But with foreach loop method, I get an error because of the NULL value. 

The error is - 

Error: The type of the value being assigned to variable "User::STR_WORD" differs from the current variable type. Variables may not change type during execution. Variable types are strict, except for variables of type Object.

How do I fix this error ? Is script the only alternative to what seems to be a flawed for
loop ?




Package not running from Agent

$
0
0

I have very simple package for test.

I just Excel data source and OLEDB data destination for sql server .

it is basically pulling data from excel and dump into excel.

if i run package from BI studio , it is working fine. if i try to run SQL server agent or from batch file from different server it is not working.

Any suggestion.

Integeration services Engine in 2012 - connect with SSMS

$
0
0

Hi !

Can we connect to Integeration services engine in 2012 from Management studio  as we do it in  Sql - 2008 ?

Experts Please help


Regards,


look is retrieving only one record

$
0
0

I’m trying pull data from prod server and dump it  into local server . below is  the package I created

In excel source. I’m placing a  record ID ..say  ‘a123-b456-789’ ( nvarchar)

Look up: it wil search  for the record ‘a123-b456-789’ in the table “ employee”

Destination:  is my local system.

empid

empname

account

a123-b456-789’

XYZ

RAM

a123-b456-789’

PQR

sun

a123-b456-789’

ABC

Rock

Issue  :  there are 10 rows in the employee table related the ida123-b456-789’ . but it is  getting only one record per execution .

Expected result : if there are 10 records then it should fetch 1o records and dump them into local system.



SSIS 2012 - The package failed to load due to error 0xC0010014.

$
0
0

I'm getting the following error when i tried to load the SSIS package in Testing envirorment.

The package failed to load due to error 0xC0010014.

Can you please help us ?


Regards,


SSIS Date conversion from number

$
0
0

Hi I am trying to use SSIS to convert  and import data from an input text file to the sql server database .

It is giving error for a  Date field.

The input data for date is like      90407     and the out put should be  2007-09-04 . ( or mm/dd/yyyy) .It can be null too. Mote input  data sample:101112  or  50613

How do I convert it? I use a data conversion Task  with data type as DT_Date.Did not work .

I think I need to use Derived  column.Not sure what should be the expression,because the input is 7 and 8 chars long. 

I get error  The conversion returned status value 2 and status text "The value could not be converted because of a potential loss of data."

 Error: Data conversion failed while converting column "StartDt" (46) to column "Copy of StartDate"

Thanks,

Jay





difference in loading DT_NTEXT with debug and SSISDB

$
0
0

Hello,

I'm loading an Excel file with SSIS (VS2012) in a Sql Server 2012 Table. In this file, a column is loaded in NTEXT because i have to keep the line feed (CR LF) contained in the text.

It works fine when i execute my ETL into Visual Studio but when I deploy my package on a server (SQL Server 2012), the line breaks disappear into my destination table.

I use the same source and same destination.

Does anyone have an idea about what can cause this difference ? Maybe i have to modify something in the SSIS config on the server?

Thanks you,

Léo.


Multiple Error Handling mails Issue

$
0
0

Hello,

I have created one SSIS Package, And i have added "Send Mail Task" In Event Handler on Error Event of the package.

Whenever i execute this package it will send multiple mails for single error.

Could you please help me to resolve this issue to send a single mail.

SSIS 2008 extract from SQL 2008 to a UTF16 csv file

$
0
0

Hi,

I need to create a csv feed in UTF16.

The data is on SQL Server 2008 R2.

I use BIDS 2008. WHen I set up flat file destination connection I can't see UTF16 (nearest is UTF 8).

Does it mean that UTF16 is not supported? Is there any way to work around it?

Thanks


SSIS question

Package execute job is getting fail

$
0
0

Hi ,

 I have a job that executing packages, from last one month its working fine, now its getting fail with below error message. I looked multiple blogs but I didn't get any solution when I looked error log for agent I found that "Reloading agent setting"

Executed as user: . Microsoft (R) SQL Server Execute Package Utility  Version 11.0.2100.60 for 64-bit  Copyright (C) Microsoft Corporation. All rights reserved.    Started:  3:48:02 PM  Failed to execute IS server package because of error 0x80131904. , Package path: Environment reference Id: NULL.  Description: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.  Source: .Net SqlClient Data Provider  Started:  3:48:02 PM  Finished: 3:48:32 PM  Elapsed:  30.204 seconds.  The package execution failed.  The step failed.

Thanks in advance for help.


Regards Vikas Pathak

Script component to convert large csv to multiple .xlsx files in C#

$
0
0

Hi Team,

Need to convert large csv file(ex, 5 million) to multiple excel sheets(each sheet of 500,000). Please suggest how to approach this.

Regards

Jim


Looping Creating Duplicates

$
0
0

Hello,

I have a package where I get a record set of id numbers I then pass into a loop which calls a stored procedure for each one and inserts the resulting information to a table.  I am finding that sometimes (3 in about 41,000) the looping logic appears to create a duplicate entry in the destination table which it's obviously not supposed to do.  I've checked the source and the record set that gets passed into the loop and there are no duplicates.  I could put a constraint on the destination table to make it impossible for duplicates to be inserted but I am surprised at this behavior of SSIS and wonder how I can solve it within the package itself. 

Has anyone else seen this where a loop creates duplicates and what have you done about it?

Thanks - Mike

Txt Transformations

$
0
0

Hello! I'm having a problem with a txt source. I have a column that comes like "152.2" (it´s a float number) but when is negative it comes like "152.2-" so when the inserts in the database are made It doesn´t work at at all. Is there a way to write an expression to transform that to "-152.2".

Thanks!

Different Number of Records

$
0
0

Good Morning All,

I'm using a SSIS package to load data into the DWH. The source is ORACLE and destination is SQL SERVER. My first question is :

1) There is a column in the source table "FULLDATETIME" datatype "DATE". But when i load it into the SQLSERVER its stored as date with timestamp.

For example in the source column if the value is "05-FEB-14" in the destination table its loaded as "2014-02-05 21:15:00.000".I'm not using any transformation it is a straight load.

2) My second question is i want to schedule this package to just load the delta records, for this i'm using the FULLDATETIME column from the Source table and want to load just the previous date's records. Please see the below queries i'm getting two different sets of records. The first SQL is giving me 5 records and the second one is giving me 1619 records. I'm confused as both queries mean the same.

select t1.*,t2.year,t2.monthofyear,t2.dayofmonth,t2.fulldatetime
from TABLEA t1
inner join  TABLEB t2
on t1.intervalkey=t2.datekey
where t2.fulldatetime=trunc(sysdate)-2


select t1.*,t2.year,t2.monthofyear,t2.dayofmonth,t2.fulldatetime
from TABLEA t1
inner join TABLEB t2
on t1.intervalkey=t2.datekey
where t2.year=2014
and t2.monthofyear=2
and t2.dayofmonth=5

Please advice as what i'm overlooking here.

Thanks

SSIS package fails in sql server agent wirh 'Process exit code "-532459699" runs fine when run independantly

$
0
0

I have a SSIS package that fails when running via sql server agent.  I can successfully run it from BIDS.    I have created a proxy account that is in the local server administrators group and is sysadmin.  SQL Server Agent and SQL Server Integration Services  are running under the same account,

following the the error message:

Error: 2014-02-07 10:29:12.59
   Code: 0xC0029151
   Source: Execute De-linking Execute Process Task
   Description: In Executing "d:\cie\files\working\9426\PowerpointConsole.exe" " 60.ppt" at "d:\cie\files\working\9426", The process exit code was "-532459699" while the expected was "0".
End Error

This package ran successfully on a different server running windows 2003 and sql server 2008 r2.  The new environment is windows 7 with sql server 2008 r2.

passing parameter to SSIS from SQL JOB in .net

Viewing all 24688 articles
Browse latest View live


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