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

On Error Event handler of Foreach Container to Script task

$
0
0

Hi All,

My SSIS package loops through set of  SQL Servers (or flat files, for easy) using foreach container, for example if the package is unable to connect to sql server (or unable to find a file), I configured  "On Error" event handler to continue executing the package, but I need to log that error in a flat file using streamwriter via script task.

Now my concern is how to capture the error generated from foreach container in a script task..during the execution of "On Error" event handler of foreach.

Please guide me....



Update New Records is taking much time to complete. How to reduce

$
0
0

Hi,

Iam having a Table with 200 Clumns and trying to Update 5 columns and the table has 5lakh Records. It is taking very much time 2hours to complete. Pls let me know why is this taking time how to reduce....

In my ssis Package iam using

Oracle Source

Look up

Oledb Command for the Update.

Please help ism stuck?

Slides/videos about SSIS 2012 overview

$
0
0

Hi,

I'm searching some slides and/or videos about an overview of SSIS 2012, not focused on the new features introduced in the 2012 version.

Any helps to me, please?

Thanks

Spread the Love! Be our SSIS TechNet Guru, this Valentine's

$
0
0

TechNet loves you!

 

We love your contributions at TechNet Wiki sooo much that we give you more than just love in return...

We give you NOTORIETY, GLORY... and VIRTUAL MEDALS!

That's not all, this love we have, together, it flows both ways my friend.

You give us stuff, we give you stuff, like interviews, recognition points, Ninja Belt rankings, and of coursefront page love!

If the love is strong enough, who knows where it could end! We may even invite you into secret clubs and other initiatives.

So why not spread the love a little further this Valentines, with more than just a cheap card from the highstreet...

Express your love for your favourite technology in a TechNetWiki article!

Pour your heart out to us, capture our hearts and woo us with your prowess!

 

All you have to do is add an article to TechNet Wiki from your own specialist field. Something that fits into one of the categories listed on the submissions page. Copy in your own blog posts, a forum solution, a white paper, or just something you had to solve for your own day's work today.

Drop us some nifty knowledge, or superb snippets, and become MICROSOFT TECHNOLOGY GURU OF THE MONTH!

This is an official Microsoft TechNet recognition, where people such as yourselves can truly get noticed!

HOW TO WIN

1) Please copy over your Microsoft technical solutions and revelations toTechNet Wiki.

2) Add a link to it on THIS WIKI COMPETITION PAGE (so we know you've contributed)

3) Every month, we will highlight your contributions, and select a "Guru of the Month" in each technology.

If you win, we will sing your praises in blogs and forums, similar to the weekly contributor awards. Once "on our radar" and making your mark, you will probably be interviewed for your greatness, and maybe eventually even invited into other inner TechNet/MSDN circles!

Winning this award in your favoured technology will help us learn the active members in each community.

Feel free to ask any questions below.

More about TechNet Guru Awards

Thanks in advance!
Pete Laker


#PEJL

Got any nice code? If you invest time in coding an elegant, novel or impressive answer on MSDN forums, why not copy it over to the one and onlyTechNet Wiki, for future generations to benefit from! You'll never get archived again!

If you are a member of any user groups, please make sure you list them in the Microsoft User Groups Portal. Microsoft are trying to help promote your groups, and collating them here is the first step.

Trace variable values in Catalog

$
0
0
I'd like to trace variable values through package execution. Is there a way to write variable values to catalog messages so that they are viewable in the dashboard? 

Migrating to SSIS 2012

$
0
0

I'm looking at migrating 2012 SSIS.

DO we have in 2012 the Integeration services engine as seperate or i see inside DB engine itself SSIS as folder

I'm bit confused.


Regards,


Issue in using SQL Authentication in child SSIS packages from Parent SSIS package.

$
0
0

I am trying to provide SQL Authentication mode and credentials at parent package and I am using some child pachnages been called from this package.

How can I resolve this to use SQL authentication.

I am using 2008 Version

Thanks

Sreenath


Sreenath G V

"Derived Column" failed because truncation occurred !!!!

$
0
0

HI Friends, 

I have got this Error so My package execution keep Failing so Please find my error Below.

Error Message : 

Executed as user: BSSLOCAL\DB-CLUS-SQL-Server. Microsoft (R) SQL Server Execute Package Utility  Version 11.0.2100.60 for 32-bit  Copyright (C) Microsoft Corporation. All rights reserved.    Started:  08:41:00  Error: 2014-02-03 08:41:13.92     Code: 0xC020902A     Source: Upload to Sharepoint Derived Column [14]     Description:The "Derived Column" failed because truncation occurred, and the truncation row disposition on "Derived Column.Outputs[Derived Column Output].Columns[SDate]" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.  End Error  Error: 2014-02-03 08:41:13.95     Code: 0xC0047022     Source: Upload to Sharepoint SSIS.Pipeline     Description: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "Derived Column" (14) failed with error code 0xC020902A while processing input "Derived Column Input" (15). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.  There may be error messages posted before this with more information about the failure.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  08:41:00  Finished: 08:41:17  Elapsed:  17.5 seconds.  The package execution failed.  The step failed.

Please give me how Can I rectify This Error Thanks For Advance.


SSIS 2008 - Import all CSV files in folder - each target different table

$
0
0

I'm new to SSIS 2008, and I'm attempting to import a series of CSV files into a database. I want to loop over every CSV file in a specified folder and import each file into a different table that must be created on the fly (name of table should be base name of file, i.e. with path and extension stripped off). The file structures are similar, but not identical, so the single target table solution won't work.

Using an example I found here:

http://microsoft-ssis.blogspot.com/2011/02/how-to-configure-foreach-loop-file.html

I'm able to successfully load all files into ONE table, but I need to load each file into a separate table. Can anyone provide some assistance on exactly how to modify the project to allow for a table to be created, on the fly, for each source file?

thanks,

Mark

 

The @flags parameter is not valid for a job step of type 'SSIS'

$
0
0

Dear Support,

I am trying to migrate SharePoint 2010 on premise server to SharePoint 2013 server but we are getting issues regarding sql server agent job as mentioned below.

Performing operation

- Add log for package (Success)

- Add task for transferring database objects (Success)

- Create package (Success)

-Start SQL Server Agent Job (Error)

Messages

·Create failed for JobStep 'CDW_SPS2010_SPS2013_0_Step'. (Copy Database Wizard)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.4000.0+((KJ_PCU_Main).120628-0827+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+JobStep&LinkId=20476

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

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

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

The @flags parameter is not valid for a job step of type 'SSIS'. (Microsoft SQL Server, Error: 14545)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=11.00.2100&EvtSrc=MSSQLServer&EvtID=14545&LinkId=20476
 

- Execute SQL Server Agent Job (Stopped)

Would request your support for solving in this matter.

Thanks & Regards

Akhilesh

SSIS SCript Task FTP Error

$
0
0

HI,
I have created a script task which:

  1. Connects to an FTP Site
  2. Gets a list of files
  3. Checks for files that do not exists within a object variable (using a function)
  4. Downloads the new file if not exists within object. 

The object variable is populated from the results of an execute sql task. 

However the issue I am getting is when I try to download the new file(s) using the ftp.ReceiveFIles from within a for each loop I receive the error "Value of type String cannot be converted to '1-dimensional array of String"

Any help would be great!

Chris

    Public Sub Main()
        'Create the connection to the ftp server
        Dim cm As ConnectionManager = Dts.Connections.Add("FTP")

        'Set the properties like username & password
        cm.Properties("ServerName").SetValue(cm, "XXX")
        cm.Properties("ServerUserName").SetValue(cm, "XXX")
        cm.Properties("ServerPassword").SetValue(cm, "XXX")
        cm.Properties("ServerPort").SetValue(cm, "21")
        cm.Properties("ChunkSize").SetValue(cm, "1000") '1000 kb
        cm.Properties("Timeout").SetValue(cm, "0") 'The 0 setting will make it not timeout
        cm.Properties("Retries").SetValue(cm, "1")

        'create the FTP object that sends the files and pass it the connection created above.
        Dim ftp As FtpClientConnection = New FtpClientConnection(cm.AcquireConnection(Nothing))


        'Populate a list of files already downloaded
        Dim oleDA As New OleDb.OleDbDataAdapter
        Dim dt As New DataTable
        oleDA.Fill(dt, Dts.Variables("Var_AllFileNames").Value)

        'Connects to the ftp server
        ftp.Connect()
        ftp.SetWorkingDirectory("14069/")

        'Get File List
        Dim FolderNames() As String
        Dim FileNames() As String

        ftp.GetListing(FolderNames, FileNames)

        'Loop through files
        For Each File As String In FileNames
            If File.Contains("Impression_4892_14069") Then
                If RowExists(File, dt) Then
                    'Already downloaded file and imported previsouly
                Else
                    'Download the file
                    ftp.ReceiveFiles(File, "C:\Users\XX\Desktop\Dart Files", 1, 1)

                End If

            End If
        Next

        ftp.Close()

        Dts.TaskResult = ScriptResults.Success
    End Sub

#Region "ScriptResults declaration"
    'This enum provides a convenient shorthand within the scope of this class for setting the
    'result of the script.

    'This code was generated automatically.
    Enum ScriptResults
        Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success
        Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
    End Enum

#End Region
    Private Function RowExists(ByVal fileName As String, ByRef dt As DataTable) As Boolean

        Dim exists As Boolean = False

        For Each row As DataRow In dt.Rows

            If (row(0) = fileName) Then
                exists = True
                Exit For
            End If

        Next

        Return exists

    End Function
End Class


Why is the Microsoft Office Access Database Engine data source looking for a workgroup information file?

$
0
0

While trying to import to MSSQL2012 from SSDT using the wizard from an Access 2013 DB (.accdb) which is password protected, I get the following error with the username blank and the password field correctly populated: 

Cannot start your application. The workgroup information file is missing or opened exclusively by another user. (MicrosoftOffice Access Database Engine)

But according to this link:

http://office.microsoft.com/en-us/access-help/what-happened-to-user-level-security-HA010342116.aspx

MSA10 and beyond shouldn't need workgroup information files, although it's not clear to me if they arecreated/used or not.

I can point the wizard to some local version of system.mdw at Advanced -> All -> Jet OLEDB:System Database, and then the error becomes:

Not a valid account name or password. (Microsoft Office Access Database Engine)

for any username I can think of.

Questions:

1.  Why does this data source insist on looking for a workgroup information file even though user-level security should be disabled?

2.  Why does the Open dialog box for the Microsoft Access Database Engine have *.mdb as the only selectable filetype?

3.  How can I get around these errors for an .accdb that is password protected?

Thanks!

SSIS 2012 FIle Not Found, probably kerberos issue

$
0
0

Hi,

I have a SSIS 2012 project to import some XML files into a SQL Database. The Project was deployed using the new SSIS catalog feature, and the idea is to programmatically execute the packages through a .NET webapp using the new SSIS Catalog API (like this: http://muxtonmumbles.blogspot.com.br/2012/08/programmatically-executing-packages-in.html).

The problem is that the webapp is on a Web Server, the SSIS project on a SQL Server and the XML file on a file server, and when I try to run the package trough the application it returns a file not found error.

For testing purposes I moved the XML file to the SQL Server and the package ran alright. Then I moved it back to the file server and ran the package from the SQL Server and again everything was ok. The problem looks like a Kerberos situation when try to use the 3 servers scenario.

I know, from Microsoft documentation, and other forum posts, that SSIS is not Kerberos aware. I would like to know if there is any workaround for my situation. Or if maybe some Kerberos configuration would work in this case since its just a flat file access problem. In other words, how can I avoid the double hop issue?

Thanks.


MCT & MCP - SharePoint & BI

Annotating Data Flow Tasks

$
0
0

Hello, all.

In Visio, when I create a flow chart, there is an annotation tool that I can drag onto the workspace in which I can place notes and the like for reference.

I'm wondering, is there any way to do the same for SSIS Data Flow tasks?

I don't want to use the name field of the task and make it some huge honking box. The description field in a task's properties is also not the best, as it only tells what a task does when the cursor hovers over it. It'd be nice if I could drag a tool onto the workspace to provide a reader with some notes as to what the particular task does at a glance.

Also, is there any way to print the Data Flow workspace screen? I can print the Control Flow screen, but I'd like to be able to print the Data Flow screen without using a screen shot. It would help with documenting a project.

Thanx!

Column cannot convert between unicode and non-unicode string data types

$
0
0

I am converting SSIS jobs from SQL Server 2005 running on a Windows 2003 server to 2008R2 running on a Windows 2008 server.  I have a dataflow with an OLE DB Source which is selecting from an Oracle view.  This of course worked fine in 2005.   This OLE DB Source will not even read the data from Oracle without the error "Column "UWI" cannot convert between unicode and non-unicode.  The select is:

SELECT SOME_VIEW.UWI AS UWI,

             CAST(SOME_VIEW.OIL_NET AS NUMERIC(9,8)) AS OIL_NET

FROM SOME_SCHEMA.SOME_VIEW

WHERE OIL_NET IS NOT NULL AND UWI IS NOT NULL

ORDER BY UWI

When I do "Show Advanced Editor" on this component, in the Input and Output Properties, I show the OLE DB External Column as DT_STR length 40 for the UWI column and for the Output Columns I see the UWI as the same DT_STR.

How can I get past this?  I have tried doing a cast...cast(SOME_VIEW.UWI AS VARCHAR(40)) AS UWI and this gives the same error.  The column in Oracle is a varchar2(40).

Any help is greatly appreciated.  Thanks.








Use SSIS 2012 but not MS Sql 2012 db

$
0
0

Hi,  Our group wants to use SSIS 2012 but stay on MS Sql 2008 for database.  I am very confident I could use the  Sql Server 2012 Developer copy I bought from amazon to run ssis 2012 on my laptop and access our ms sql 2008 databases.   But when I had a job finished and wanted to put in in production, we generally run ssis on the servers that our database machines are on.   So here are some questions:

- Can you install just the dtexec part of ssis 2012 without the rest of ssis on a server?

- Does installing ssis 2012 on a server require that the ms sql 2012 database be there so ssis 2012 can save objects somewhere?

- can ms sql 2012 database and ms sql 2008 database run on the same server at the same time?

- If all I wanted to install was ssis 2012 on the server,  would I have to buy a full ms sql 2012 db license to be able to do that?

Thanks.  ssis 2008 is running into problems of drivers for Oracle and all the 32 and 64 bit stuff.  It would really be nice to just start clean with ssis 2012.

try to ad a code from C# to the script task editor

$
0
0

Is possible to adapt this code to script task editor?

coming from this link >>  link

public void ListItemCollection GetListItemCollectionFromSP(string name,string value,string type, int rowLimit )
{
 //Replace siteURL and documentListName with your SharePoint site URL and DocumentList

string siteURL = "site URL";
string documentListName = "document list";
string UserName = "UserName";
string Password = "Password";
string Domain = "Domain";

ListItemCollection listItems = null;
using(clientContext.Credentials = new System.Net.NetworkCredential(UserName, Password, Domain))
using (ClientContext clientContext = new ClientContext(siteURL))
{
List documentsList = clientContext.Web.Lists.GetByTitle(documentListName);
 
CamlQuery camlQuery = new CamlQuery(); ;
camlQuery.ViewXml =
@"<View><Query><Where><Eq><FieldRef Name='" + name + @"'/><Value Type='" + type + "'>" + value + @"</Value></Eq></Where>      <OrderBy><FieldRef Name='Modified' Ascending='FALSE' /></OrderBy> <RowLimit>" + rowLimit.ToString() + @"</RowLimit></Query></View>";
listItems = documentsList.GetItems(camlQuery);
clientContext.Load(documentsList);// tell model we want that data 
clientContext.Load(listItems);
clientContext.ExecuteQuery();// actually go to SharePoint and get data 
}
return listItems;
}

public Stream DownloadDocument(string siteURL, string documentName)
{
ListItem item = GetDocumentFromSP(documentName);
if (item != null)
{
using (ClientContext clientContext = new ClientContext(siteURL))
{
FileInformation fInfo = Microsoft.SharePoint.Client.File.OpenBinaryDirect(
clientContext, item ["FileRef"].ToString()); 
return fInfo.Stream;
}
}
return null;
}
private static ListItem GetDocumentFromSP(string documentName)
{
'//  ...
'// Get List Item Collection from SharePoint Document List
ListItemCollection listItems = null;
listItems = GetListItemCollectionFromSP("FileLeafRef", 
documentName,"Text", 1);

return (listItems != null && listItems.Count == 1) ? listItems[0] : null;
}


any help is appreciated it


CRISTINA& MICROSOFT Forum


SSIS 2012. SSDT gui going crazy. Can't drag objects or resize in control or data flow. The gui has a mind of its own

$
0
0

I recently upgraded to on 2012 SP1 CU5 and have found the SSDT gui for SSIS to be almost unusable. I can't drag or resize items. Any time i try they either automagically shrink to the tiniest possible size, shoot off to some extreme or just shake uncontrollably

I didn't have these problems on previous versions (dont remember what It was).

Is there a fix for this?


Jakub @ Adelaide, Australia

Multiple parallel loads into one table with TABLE LOCK option

$
0
0

Hi everyone:

We have several SSIS packages where each package has the basic design of having one sequence container. Inside each sequence container can be anywhere from 2 - 9 data flow tasks where for each data is selected from a different table but all 2-9 tasks do an OLEDB fast load (with table lock option checked) into the same single destination table.

The number of rows were pulling from the various sources might be anywhere from 5 up to 100,000.

Right now this doesn't seem to be causing any issues, but I wanted to check to see if this set up (since we're doing a review) could potentially cause problems down the road?

We seem to think that each parallel task will acquire its data as normal, and just won't be able to insert until one of the other parallel tasks completes its fast load. To us, that's no big deal as we're at least able to acquire the data in parallel.

What are everyone's thoughts?

Thanks!

SSIS package

$
0
0

We have SSIS package that we run to import legacy data from an MS Access database.  An application uses a SQL 2005 Express database which doesn’t have Integration Services. Couldn’t we run the script on a 2008 Server and set the 2005 Express server as the destination? 

Thank you

Viewing all 24688 articles
Browse latest View live


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