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

Faulting module name: DTS.dll, version: 2009.100.1600.1, Exception code: 0xc0000005

$
0
0
I have created one application and running SSIS Package dynamically with expression.I am using SQLserver 2008 R2

But while running the code Application got crashed.I saw event viewer and found below exception in event viewer

Faulting module name: DTS.dll, version: 2009.100.1600.1, Exception code: 0xc0000005

Faulting module path: C:\Program Files\Microsoft SQL Server\100\DTS\Binn\DTS.dll.

When I run my c#application to execute the pacakge see code below:                      
public DTSExecResult ExecutePackageFromFile(string packageName, IDictionary<string, object> variablesMap, out Package pkg)
        {
            Application app = new Application();
            pkg= app.LoadPackage(packageName, null,true);

            //set package varaibles
            Microsoft.SqlServer.Dts.Runtime.Variables vars = pkg.Variables;
            IEnumerator<KeyValuePair<string, object>> varEnumarators = variablesMap.GetEnumerator();
            while (varEnumarators.MoveNext())
            {
                KeyValuePair<string, object> item = varEnumarators.Current;
                                {
                    vars[item.Key].Value = item.Value;


            }

//This line crashes the application
            return pkg.Execute();
      }

Note: Package gets executed if I don't use any sql command as expression.But application gets crashed when I use expression in pacakge and gives above Faulting module error.

Please help me.

Importing Excel files

$
0
0

– Create a basic SSIS Package to enter the files provided in “ETL_Diagram Section Files” to a new Database.  The SQL Script will be executed within SSIS in a SQL Task (The script may be too big to use in a SQL Task.  In that case, find another alternative such as putting the script inside a Stored Procedure.)  The Excel file will be loaded within SSIS as well.  The end result will be 6 tables loaded to the new Database.

........I am not sure how I to create the remaining 3 tables using a  script.. not familiar with stored procedure..Any help?

.......The Excel sheets have different table structures.

Moving SSIS from 2005 to 2012 that are stored in VSS

$
0
0

Hi All,

We have a solution with mutiple project. Each project may have 1 SSIS paickage or more than 1 SSIS package. We checked in the solution and projects (has dtsx) into VSS. When ever we want to make changes, we check out the package and if needed project, make changes and check them in. So for we used Visual Studio 2005.

Now we moved to Visual Studio 2012. Before opening solution and packages with SSDT 2012, I want to keep a back of projects in Visual Source Safe. So, I want to branch it and then open main solution in new version. But my colleague says that there is no need to branch it. We will label the entire solution recursively with certain version number and then open solution and projects in 2012. If the need arises for 2005 version, at that time we can branch it based on label and can open branched 2005 version on old machine. Can we branch based on label. Further, once pakcage is opened in 2012, does the labeled version retain 2005? I know it is snapshot on that day at that time. But not sure whether underlying package xml changed or not.

I appreciate your response.

Thanks

Excel-Source outputs different date formats - leading to wrong DB values

$
0
0

Hello community,

I have Excel worksheets coming from different countries and Excel versions. My problem is a date column in the sheet.

Actually this date column causes two problems:
I know that Excel doesn't really convert cells to date values even if the cell formatting is set to it.

When I open any of the documents the date looks like this:

04.03.2014 - but in SSIS I sometimes also see this format: 3/4/2014

Those values will also convert to a date to insert into the DB but monthand day are swapped. So instead of the expected result of 04.03.2014 I'll get 03.04.2014 in the db.

Is there something I can do to handle this?

I would expect I have to use char as the Excel-source output and then do some transformation.
But how?

Thank you very much!


How to distinguish between enabled and disabled tasks in SSDT-BI 2012

$
0
0

Hi,

I've got SSDT-BI 2012 together with VS2012 installed. Simple questions: What is the difference between enabled and disabled tasks in control flow from the design/color point of view? I do see that the disabled tasks changes to grey (omg are you really kidding me????) from black. This could be a bad joke or dream however is not.

So I'm kindly asking you to help me solve this problem. How can I change the color difference between these two options (enabled task vs disabled task)? I do not care whether the one will be yellow or pink, simply just need to be recognizable at first look and not under long and painful examination.

Thanks for your reply. Hopefully it will be useful.

Karol.

Unable to understand code in script task

$
0
0

Hi Experts

I'm reading book for SSIS book and unable to understand the following piece of code by using script task.

Partial Class ScriptMain...Public Sub Main()System.Windows.Forms.MessageBox.Show(GetFileName(“bankfile”, “txt”))Dts.TaskResult = ScriptResults.SuccessEnd SubPublic Function GetFileName(ByVal Prefix As String, _ByVal Extension As String) As StringGetFileName = Prefix + “-” + Guid.NewGuid.ToString + _“.” + ExtensionEnd FunctionEnd Class

If somebody help me to implement this code in SSIS then I really appreciate it. Thanks

Regards

Muz

Run SSIS packages from Command shell

$
0
0

Hi,

i want to create a macro which runs the packages in command line.

Please help

Auto Scheduled run of the Sql server management studio or a auto refreshing query

$
0
0

Hi ALL ,

This is a very different weird requirement but workaround  for one of my requirement  . Scenario is that sql server enterprise edition is installed on a vm . I create a session with the vm using the remote desktop . I have scheduled a ssis package on the server and it should run 4 am daily us timing but its failing . If in case a user is connected to the management studio package runs on time . So i have to disconnect from the remote desktop and its not possible for me to login at 4 am every day for running package.

Requirement :  Is it possible that the sql sever management studio automatically turns on at 03:30 am and authenticates in .If that is possible my package won't fail . If this is not possible  is it possible that sql script auto refreshes every 30 min's so what i can do i will run the auto refreshing script in the management studio once and will disconnect the remote desktop not the sql server session so my virtually my session on vm will end but vm is always on from the vcenter and there is some activity on the sql server management studio so even the application won't be closed after a stipulated time frame leading to running of my package on time.

Please help


SSIS Pattern for CDC for Oracle

$
0
0

I am in the process of implementing the CDC for Oracle product from Attunity, and I have a good understanding of how the CDC process works from Oracle to SQL Server.  The next step is to load the changes into our operational data store. 

Does anyone know of good patterns in SSIS for handling the initial and ongoing loads for CDC for Oracle?  I have SSIS packages that handle pure SQL Server CDC, so I understand that process.  However, I'm not sure if there are special things that need to be done to mark the end of the initial load and then start loading changes into the operational data store.  Are there any gotchas I need to keep in mind when working with Oracle data and the CDC changes in SQL Server?  My main concerns are with data consistency between the Oracle system and our operational data store, once the initial load is finished, CDC is started and we copy data to the operational data store.  What are good patterns to ensure I'm not missing data, and that I don't introduce duplicate records, because of timing.

Any advice is appreciated.

Script Task examples

$
0
0

Hi Experts

I'm reading SSIS book to learn SSIS. My background is also programming but never work with VB and C. In SSIS book there is a topic of Script Task and in this topic the author uses Script Task and use VB but it is so confusing but if somebody help me out to give some example for Script Task that is commonly use then I really thankful to him.. Thanks in advance.

Regards

Muz

ssis execute process task error: process exit code was 1 while the expected was 0

$
0
0

Hi Sir,

in my SSIS Package(2012) i am using Execute Process Task which will call bat file.  bat file is located on UNC Path.i am having  the below script in the batch file.

 del \\servername\foldername\name.txt

 rcmd \\servername D:\name1.bat

 del \\servername\foldername\name2.txt

xcopy \\servername\foldername\file.txt   \\server\foldername\outfilefolder

i am getting the below error message:

ssis execute process task error:  process exit code was 1 while the expected was 0

i want know at what cases error exit code was 1?

Thanks for your time.

SSIS Script Task - Select Into Table Code

$
0
0

I'm trying to come up with a C# code on Script Task. My C# is not that great. What I'm trying to achieve looks like this in TSQL:

SELECT*INTO Server2.DatabaseNameXX.Sample.@MyTable

FROM Server1.DatabaseName.dbo.@MyTable

Please note that the Script Task will be inside a Foreach Loop Task and hence table name is a variable.

Can someone please kindly give me a sample C# code to address the above requirement. The sample code should include how I should handle the @MyTable variable as well as connection managers for the two servers.

Many thanks,


Mpumelelo

Retrieving Integer with XML Task

$
0
0

G'day All,

  I have an XML file in which I am trying to pull one element, an Integer, into a variable via the XML Task. As I wish to use this variable within a subsequent loop, I need to extract as an int but the XML Task insists on having it defined as a string. Can anyone provide ideas on how I can suitably obtain this value as an int?

I am not able to pull as a string and then do a cast to an int (populating another variable) nor set the XPath operation to "Evaluation" and run a "number" function on the field. As someone must have needed such a requirement before, how is this resolved?

TIA

Casting problem with UNION in OLE DB Source

$
0
0

I have SQL Server 2012 SSIS. There are 2 databases. Import and Analyses.
I have Data Flow Task. Inside it I have OLE DB Source and OLE DB Destination.

Data type is orginally nvarchar(100). Destination is nvarchar(100) as well.

I would like to use UNION statement for Data Source, but getting errors. This is mystery for me.

WHAT IS BEST PRACTISE WHEN I USE SQL STATEMENT AND UNION STATEMENTS IN OLE DB SOURCE?

Example value for CustomerAddress is "Union Street 5". Defitely less than 100 nvarchar.

[OLE DB Source [42]] Error: There was an error with OLE DB Source.Outputs[OLE DB Source Output].Columns[CustomerAddress] on OLE DB Source.Outputs[OLE DB Source Output].
The column status returned was: "The value could not be converted because of a potential loss of data."

[OLE DB Source [42]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. 
The "OLE DB Source.Outputs[OLE DB Source Output].Columns[TimingValue]" failed because error code 0xC0209072 occurred,
and the error row disposition on "OLE DB Source.Outputs[OLE DB Source Output].Columns[CustomerAddress]" specifies failure on error.
An error occurred on the specified object of the specified component. 
There may be error messages posted before this with more information about the failure.

SELECT RowId,'Toyota' as 'CustomerName',CAST(CAddress AS nvarchar(100)) as 'CustomerAddress'
FROM [Integration].[dbo].[Import_A]
UNION
SELECT RowId,'Nissan' as 'CustomerName',CAST(CAddress AS nvarchar(100)) as 'CustomerAddress'
FROM [Integration].[dbo].[Import_B]


Kenny_I

Getting Error when we are using same variable value in parallel flows

$
0
0

Hi All

In one of the case we will get a Zipped folder in which we have 4 different types of files . we will have date in folder name . we want to insert that date in all the 4 types file data . so we are storing the filedate in a variable and we are planning to insert that variable value in all the 4 types files . when we are loading data  in parallel of those 4 files (if the folder size is less than 20MB there is no problem )  we are getting the below error . If we run them in Sequence it is working fine without error . Please suggest what will be the issue .

[OLE DB Destination [132]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.

An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80004005  Description: "Invalid character value for cast specification".

[OLE DB Destination [132]] Error: There was an error with input column "filedate" (523) on input "OLE DB Destination Input" (145). The column status returned was: "The value could not be converted because of a potential loss of data.".

[OLE DB Destination [132]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "input "OLE DB Destination Input" (145)" failed because error code 0xC0209077 occurred, and the error row disposition on "input "OLE DB Destination Input" (145)" specifies failure on error. An error occurred on the specified object of the specified component.  There may be error messages posted before this with more information about the failure.

[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "OLE DB Destination" (132) failed with error code 0xC0209029 while processing input "OLE DB Destination Input" (145). 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.


Surendra Thota


Script component - Redirect row in asynchronous transformation

$
0
0

Hi,

I have 35 input columns, and same 35 output columns in asynchronous output buffer. Business logic behind is creating some extra rows, thats why i have asynchronous transformation. POint is, that it is built in if-else construction and I have 4 variants. I have to create rows in each of them and then I type in each variant (they differs) 35x times assignment expression.

Columns in input and output have same names and data types. Is there way how to redirect column from input to output.

something like

foreach (input.column) {output.column(input.column.name) = input.column(input.column.name)}

I know that only in synchronous transformation I can redirect row.

Thanks

Execute store procedure( in Id, in out RefCursor), and data fetched in ref cursor should be sent out as excel sheet.

$
0
0

I am trying to make a ssis package that get the data calling the store proc with two param one is ID and other is Sys_refcursor. Say Store Proc as ListName(Id int, myCur sys_refcursor), which gets the datas with the conditions inside it.

REATE OR REPLACE PROCEDURE schemaName.LISTNAME (P_ID  IN INT, LST_NAME_REFCUR   IN OUT SYS_REFCURSOR)
IS
P_NAMESOURCE_ID INT;
BEGIN
    SELECT SOURCE_ID INTO P_NAMESOURCE_ID FROM SEARCHING_TABLE ST WHERE ST.ID = P_ID;           
               IF (P_NAMESOURCE_ID=1)
               THEN
                  OPEN LST_SOURCE_REFCUR FOR 
                        SELECT ST.ID,
                               ST.TRANSACTION_DATE AS TRAN_DATE,

.....                                                                        IF (P_NAMESOURCE_ID=1)
               THEN 
                  OPEN LST_SOURCE_REFCUR FOR             ....     

then i need to get the data from that refcursor and fetch those data to excel sheet to a virtual directory.

Any help would be appreciated. I am new to SSIS. and i need to do this assignment this friday.   

step job failed and agent shows sucess

$
0
0

hi everyone,

I'm running a package using an agent job step Transact SQL script (T-SQL)

the step runs a package using command line dtexec only in case there are any rows in a certain table

the problem is that the package fails and yet the job step indicates sucess

i'm passing the dtexec exit code as exlpained in:

http://www.bidn.com/blogs/BradSchacht/ssis/941/capture-ssis-package-execution-status

iv'e tried using RAISERROR but it hasn't helped

can anyone help?

iv'e configured "Job step On failure action" to "Quit the job reporting failure"

The option to Set Breakpoints does not show up when I right-click any step

$
0
0

Hi All,

I am working with a SSIS package and trying to set breakpoints to view the contents of package scoped variables. I am running SQL Server 2008 R2 on Windows Server 2008 R2 and developing in Visual Studio 2008.

When I right-click on an Execute SQL Task (or ANY step in the package) I see no menu pick to "Edit Breakpoints" or "Set Breakpoint". Can someone tell me why that option is missing?

TIA

Failed to load task (Execute Processes Task)

$
0
0

Environment: These are all fresh installs.  SSIS server 2012 SP1 & SQL Server 2012 SP1 (SSIS is not installed on the SQL Server) both servers are in the same domain. The SSIS Service, MSSQL Service and SQL Agent Service are all running under domain accounts, accounts are different. 

SSIS 2005 package upgraded to SSIS 2012, upgrade completed successfully, after upgrade imported into 2012 SSIS MSDB Store.  The package runs in SQL Server Data Tools without error.  Created a job on SQL Server 2012 which runs the upgraded package from the SSIS MSDB Store.

Note: The task failing within the package is an EXECUTE PROCESS TASK, it says it fails to load.  This task calls a cmd file which runs an archiving process.  If the task is removed from the package it executes and finishes without error via the job.  I thought this was a permissions issue on the directory where the cmd file is located but I have checked permissions and the domain account which runs the Agent Service and the domain account which runs the Intergration Service have the correct permissions all the way down to the file level.

Error Message:

Step ID        1
Server        <SQL Server 2012> removed real server name
Job Name        <Package name> removed real package name
Step Name        Dump logs
Duration        00:00:07
Sql Severity    0
Sql Message ID    0
Operator Emailed    
Operator Net sent    
Operator Paged    
Retries Attempted    0

Message
Microsoft (R) SQL Server Execute Package Utility
Version 11.0.2100.60 for 64-bit
Copyright (C) Microsoft Corporation. All rights reserved.

Started:  9:09:24 AM
Error: 2014-03-27 09:09:29.23
   Code: 0xC001F02A
   Source: Dump Logs
   Description: Cannot create a task from XML for task "Archive Log Files", type "Microsoft.SqlServer.Dts.Tasks.ExecuteProcess.ExecuteProcess, Microsoft.SqlServer.ExecProcTask, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" due to error 0x80070057 "The parameter is incorrect.".
End Error
Error: 2014-03-27 09:09:29.23
   Code: 0xC0010018
   Source: Archive Log Files
   Description: Failed to load task "Archive Log Files", type "". The contact information for this task is "Execute Process Task;Microsoft Corporation; Microsoft SQL Server v9; ? 2004 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1".
End Error
Error: 2014-03-27 09:09:30.31
   Code: 0xC0010026
   Source: Archive Log Files
   Description: The task has failed to load. The contact information for this task is "Execute Process Task;Microsoft Corporation; Microsoft SQL Server v9; ? 2004 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1".
End Error
Error: 2014-03-27 09:09:30.31
   Code: 0xC0024107
   Source: Archive Log Files
   Description: There were errors during task validation.
End Error
Error: 2014-03-27 09:09:30.31
   Code: 0xC0010025
   Source: Dump Logs
   Description: The package cannot execute because it contains tasks that failed to load.
End Error
DTExec: The package execution returned DTSER_FAILURE (1).
Started:  9:09:24 AM
Finished: 9:09:30 AM
Elapsed:  5.928 seconds

Any insight is appreciated.


mkal55

Viewing all 24688 articles
Browse latest View live


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