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

Fuzzy logic - no columns showing

$
0
0

I have a really odd issue that I truly hope some has experienced and resolved

I'm attempting to do a fuzzy logic comparison between two sources but when I choose the Reference table and click on the Columns table, no columns are populated. If I choose a different table, the columns do populate but not much good to me as I need the one it isn't displaying.

It half points to permissions but I am an admin on the database so not sure how, any ideas?


How do you code the Package Execution Progress window in C#

$
0
0

 

I need to write a front end to execute our .dtsx package due to it being encrypted and not wanting to expose the password at all.

I have successfully written code to run it but I want to show something like the Package Execution Progess window and I don't know how.

This window shows up when you just double click on the .dtsx file and Execute it using the interface provided.

Can anyone help?

 

Here's my code so far.

 

using

System;

using

System.Collections.Generic;

using

System.ComponentModel;

using

System.Data;

using

System.Drawing;

using

System.Text;

using

System.Windows.Forms;

using

Microsoft.SqlServer.Dts.Runtime;

 

 

namespace

RunMigration

{

publicpartialclassForm1 : Form

{

public Form1()

{

InitializeComponent();

}

privatevoid button1_Click(object sender, EventArgs e)

{

DTSExecResult pkgResults_Sql;

 

try

{

Cursor.Current = Cursors.WaitCursor;

Microsoft.SqlServer.Dts.Runtime.

Application app = new Microsoft.SqlServer.Dts.Runtime.Application();

app.PackagePassword =

"SomePassword";

Microsoft.SqlServer.Dts.Runtime.

Package pkg = new Microsoft.SqlServer.Dts.Runtime.Package();

 

pkg = app.LoadPackage(

"T:\\amber\\encrypt\\EncryptedPHDMigration.dtsx", null);

string mypath = this.textBox1.Text.ToString();

pkg.ImportConfigurationFile(mypath);

 

 

pkgResults_Sql = pkg.Execute();

MessageBox.Show(pkgResults_Sql.ToString());

MessageBox.Show(pkg.ExecutionStatus.ToString());

 

 

 

foreach (Microsoft.SqlServer.Dts.Runtime.DtsError error in pkg.Errors)

{

Console.WriteLine("{0}", error.Description);

this.richOutput.Text = error.Description;

}

}

catch (System.Exception f)

{

MessageBox.Show(f.Message);

}

finally

{

Cursor.Current = Cursors.Default;

}

}

privatevoid btnConnect_Click(object sender, EventArgs e)

{

OpenFileDialog open = newOpenFileDialog();

open.Filter = (

"SSID config files|*.dtsConfig");

if (open.ShowDialog() == DialogResult.OK)

{

this.textBox1.Text = open.FileName.ToString();

}

}

 

}

}

Managing a SSIS pkg when the data structure of the source changes - SSIS 2012

$
0
0

Hi,

I've a SSIS 2012 pkg with several data flow task to get data from an Oracle database and then to write on a SQL Server database. The related job runs each night.

It occurs 1-2 times for month that the data structure of the Oracle source changes (e.g. for a new column or an existing column is to delete or the length of an existing column increments). In a such scenario I'd like as much as possible to avoid that the import data job goes in error, without accomplishing any actions during the nigth. Moreover, the pkg has to get all Oracle records and not only the rows without any errors due any structure data changes for the Oracle source.

Any suggests to me, please? Thanks

Attunity CDC for SSIS has status LOGGER

$
0
0

At a client I work for, we are using Attunity CDC for SSIS to replicate data from a Oracle source to a MS SQL server destination. We are currently testing the solution and while testing, an error occurred: Attunity got the status Suspended, substatus LOGGER.

This implicates there is an temporary error on de Oracle redo-log, but Attunity never got past this error. Our interpretation is that Attunity was looking for the “Transaction log head change number”, but could not find it. We temporarily solved this by changing the “Transaction log head change number” manually (without looking for a CSN in the alert-log), from that point on Attunity was working again. We are not sure if there was any data loss. So we are trying to force an error in Attunity to test its reliability and stability, and to reproduce this error. One of the goals is to see if we can get Attunity back on track with a “transaction log head change number” (that we created based on the CSN from the Oracle Alert-log).

The reason we think Attunity could not find the “Transaction log head change number”, is because the Oracle-server Attunity mines was restarted, but before it restarted it killed all of its sessions. We think Attunity already processed some new records that Oracle has rolled back afterwards.

Based on this story I have three questions:

  • How can we let Attunity crash and get it into Status Suspended, substatus LOGGER?
  • Do you know a way to get Attunity back on track without, or with minimum, data loss?
  • Is there a lists of know errors that force Attunity to crash?


Error in Typecasting from string to datetime

$
0
0

I am using derived column to convert string data to datetime .

My string data :

Start Date 

15/06/2015

30/06/2015

NULL

2015/06/24

I wrote in derived column expression:

(DT_DATE)(SUBSTRING(([Start Date]),7,2) + "/" + SUBSTRING(([Start Date]),5,2) + "/" + SUBSTRING(([Start Date]),1,4))

which is giving error :

[Derived Column 1 [5452]] Error: The "component "Derived Column 1" (5452)" failed because error code 0xC0049064 occurred, and the error row disposition on "output column "Start Date" (5650)" specifies failure on error. 
An error occurred on the specified object of the specified component. 

Please suggest.

How to write the expression in derived column to handle null value as well.

Thanks in advance.

Can select in SSMS but not in SSIS

$
0
0

I have a really odd issue that I truly hope some has experienced and resolved

I'm attempting to do a fuzzy logic comparison between two sources but when I choose the Reference table and click on the Columns table, no columns are populated. If I choose a different table, the columns do populate but not much good to me as I need the one it isn't displaying.

It half points to permissions but I am an admin on the database so not sure how, any ideas?


How to make SSIS prompt for connection values when running a DFT or package from Visual Studio?

$
0
0

Hi,

I am new to SSIS. My earlier ETL experience is on Datastage, hence, it's taking me a little time to get my head around some things in SSIS, hence this question which might seem kind of naive to some of you. Our project is on SSIS 2012 and we are using the project deployment model. We have parameterized the connection managers, created environments, environment variables and configured the references. Hence, when we deploy the solution to higher environments, the connection strings are picked from the environments and not the ones stored in the connection manager. However, we face issues when in development environment, we need to run the same package but by entering the values manually in the connection manager. Even though the connection details are correct, when we execute the package from Visual Studio, SSIS is not able to connect to the database. Is there any way to have SSIS prompt for the connection details after we have click on "Execute Task" or "Start" from Visual Studio? 

Thanks for your time,

Shreya K.

Get back (Identity) ID to the other table in SSIS Data flow?

$
0
0

Table 1:

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

Name       Add                  No         RowID

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

aa     #a-1,India                              10

bb     #a-1,India                              11                

aa     #a-1,India                              12

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

 table 1 inserting to Table 2 (Using 1st Data flow)

Table 2:

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

Name       Add                 ID(Note:Here Identity1,1)

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

aa     #a-1,India                 1

bb     #a-1,India                 2

aa     #a-1,India                 3

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

My Requirement is Update  Table 1 set Column::No=Table 2.ID

                                                                        based on Exact Match of

                                                                         Table1.Name=Table2.Name  and

                                                                         Table1.Add=Table2.Add


It means Get back the Id for Source Table 1

 2nd Data flow

             Source(Table1:Name, Add,No)

                          |

   --LOOKUP(Table2:Name, Add::Matched Look Columns Name, Add and Tick Mark on ID)

                         |(Match)

   -->OLEDB Command: update Table1 set N0=? where  RowID=?(Here Param_0= NO ,Param_1=RowID)

Here My Issue is if  Table 1 had Duplicates(same Name, Add, but Row Id is different it is Updating Same ID for Table 1.No It means Get Back ID correctly not updating

Result::

Table 1:

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

Name       Add                  No         RowID

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

aa     #a-1,India                1              10

bb     #a-1,India                2              11                

aa     #a-1,India              1              12

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

My correct Output is         3             instead of Result:Table1 1.NO  1             where RowID =12

It caused by LOOKUP , It picking Top1 ID while Matching Look on fields.

How Should I update the (Identity) Get Back Table 2.ID to Source Table1. NO  in Above logic in SSIS??????

Please help instead of LOOKUP , May I use SCD ???

Thanks



Issue using Excel Source while Reading Excel File in SSIS 2008

$
0
0

While fetching data from Excel File using Excel source in SSIS 2008  , it is showing the below error message

DataAccess mode =Table name or view name variable

Variable name = select the variable which store the excel file path.

 when clicking on the column to view the records it throws the below error.

Error Message 

"

TITLE: Microsoft Visual Studio
------------------------------

Error at Import User Provided Data To Staging Area [EX_SRC_InputFile [528]]: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.

Error at Import User Provided Data To Staging Area [EX_SRC_InputFile [528]]: Opening a rowset for "E:\PTS_SSIS\ZPTS-Files\011111_DrawingImport2_2015-07-14_12-25-30.xlsx" failed. Check that the object exists in the database.



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

Exception from HRESULT: 0xC02020E8 (Microsoft.SqlServer.DTSPipelineWrap)

------------------------------
BUTTONS:

OK
------------------------------

"

how can we resolve the issue ..

Truncation error when exporting data from sql server 2012 to excel

$
0
0

I need to export some data from sql server 2012 to a excel file(.xlsx). Truncation error happened when executing the exporting task, error happened in conversion from a column of type nvarchar(max) to a column of type LongText. Max length of the source column data is 4303, and documented length limit of LongText, which is a alias of type Memo, is 64,000. Anyone knows why this error happen?

Below is detailed error message:

- Executing (Error)

Messages

Error 0xc02020c5: Data Flow Task 1: Data conversion failed while converting column "extended_info" (59) to column "extended_info" (143).  The conversion returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".

(SQL Server Import and Export Wizard)

Error 0xc020902a: Data Flow Task 1: The "Data Conversion 0 - 0.Outputs[Data Conversion Output].Columns[extended_info]" failed because truncation occurred, and the truncation row disposition on "Data Conversion 0 - 0.Outputs[Data Conversion Output].Columns[extended_info]" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.

(SQL Server Import and Export Wizard)

Error 0xc0047022: Data Flow Task 1: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "Data Conversion 0 - 0" (99) failed with error code 0xC020902A while processing input "Data Conversion Input" (100). 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.

(SQL Server Import and Export Wizard)

Error 0xc02020c4: Data Flow Task 1: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020.

(SQL Server Import and Export Wizard)

Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on Source - audit_data_table returned error code 0xC02020C4.  The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.

(SQL Server Import and Export Wizard)




SSIS package (SQL 2014) always fails when debugging in VS2012 but each individual DataFlow tasks succeeds.

$
0
0
SSIS package (SQL 2014) always fails when debugging in VS2012 but each individual DataFlow tasks succeeds.

I installed SSDTBI tools for SQL 2014 for Visual Studio 2012 Window 8.1 (64 bit) from the links found here

I've created an SSIS project in VS 2012.

I need to import data from a set of FoxPro DBF files into their equivalent tables in SQL 2014.

I installed the Visual FoxPro OLEDB provider from this page

For each DBF file I set up a Container with 2 tasks - 1 to delete the related SQL table and 1 to import the data from the DBF files.

I've set constraints on the containers so that they will import one by one in sequences.

When I execute each container from within Visual Studio they all succeed.

When I try to execute the package though, the first container succeeds and the second container starts executing.

The first sub-task (the delete) succeeds and the spinning icon is displayed next to the second sub-task (import from the DBF file.)

However the output window pops-up saying the package has finished: Canceled.

There are no errors displayed, but I DO find errors in the Event Viewer / Windows Logs / Application log which includes:

Faulting application path: C:\Program Files (x86)\Microsoft SQL Server\110\DTS\binn\DtsDebugHost.exe
Faulting module path: C:\Program Files (x86)\Microsoft SQL Server\110\DTS\PipelineComponents\OleDbSrc.dll

NOTE - That looks like the path for SQL 2012 - not 2014!

I am logged in with privileges to read and write to the folder where the DBF files are stored, and the SQL connection is using Integrated security, and I have full permissions on the staging database.

Why can I execute each container without error but not as the package.
How can I fix this problem to let me execute the package?





Why Merge Transformation Need to Sorted Inputs

$
0
0
Why Merge Transformation Need to Sorted Inputs

Problem with ODBC Source

$
0
0

I'm having trouble using a Progress database as a source.  I have an OpenLink driver installed and a System DSN set up.  I can successfully test the connection. 

I added this DSN to the connection manager and added it to a DataReader Source.  I then added the SQLCommand property.  I was able to map columns and such, so I believe the SQLCommand was successfully parsed.  However, when I try to save the DataReader Source, I get an error:
   
   Error at Data Flow Task [DataReader Source [2266]]: System.Data.Odbc.OdbcException: ERROR [HY010] [OpenLink][ODBC][Driver]Function sequence error

   at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
   at System.Data.Odbc.OdbcDataReader.NextResult()
   at System.Data.Odbc.OdbcDataReader.Close()
   at Microsoft.SqlServer.Dts.Pipleline.DataReaderSourceAdapter.ReinitializeMetaData()
   at Microsoft.SqlServer.Dts.Pipleline.ManagedComponentHost.HostReinitialieMetaData(IDTSManagedComponentWrapper90 wrapper)



What am I doing wrong?  Why does the error reference DTS?

Thanks,
stacy

.dtsconfig file being used when try to edit to change some variables

$
0
0

hi there:

 I've deployed my ssis pkg to the server and created a sql job to run this pkg. So far, everything is fine. Today, I got a request to change some variables inside the package which is part of the .dtsconfig.  I want to edit the deployed .dtsConfig but it won't allow me and always complained  that this file has been opened by another program. I am sure i've closed my ssis designer and other notpad, why can't I edit and save .dtsconfig file?

 Thanks

Hui


--Currently using Reporting Service 2000; Visual Studio .NET 2003; Visual Source Safe SSIS 2008 SSAS 2008, SVN --

Executing sql server 2012 packages

$
0
0

I used the import wizard in sql server 2012 management studio to load data from an excel 2013 spreadsheet into a new table in a sql server 2012 database. I saved the package to the file system since I want to be able to rerun the package and potentially change where the excel spreadsheet is obtain from when I use this code in production.

Thus I have the following questions about executing the package I saved to the file system:

1. Can you give me directions on how I can execute the package that I saved to the file system? I tried doubling clicking on the dtsx package and that did not work.

2. If I want to change any of the input and/or output locations, is this possible? If so, can you tell me how I can change the file system package? Do I need to open the package in ssis manager or in visual studio?



Parent- Child package failing in sqlagent.

$
0
0

Hello ,

I have 20 child packages calling in a single master package as shown below.

these packages transfer data from mysql to SQLServer. I installed the ODBC-32 bit drivers.

when i run the project in visual studio its executing successfully. I deployed it to ssiscatalog. created a job in sqlagent and selected this project master package. I set the conditions like 32-bit run time and  project protection level to 'Do not Save Sensitive'.  

But, When i execute the package in sqlagent its throwing the error as 'Unable to open the ODBC connection'

what might be the issue ? how i can i solve it ?

how to convert from string(varchar/nvarchar) to binary

$
0
0

Hi All,

In Source, we have a column of datatype string(varchar/nvarchar).

Example:

col1

True

False

In Target we need to map the column which is of type binary. Binary column accepts only 1,0.

col1

1

0

how to achieve this? can this be done in derived column?

Thanks in Advance.

Raghavendra

Calling SSIS package from Stored Procedure

$
0
0

Hi Experts,

I have a master package which calls a child package and child package calls one more package. The packages reside on file system. I have created a stored procedure in SQL Server 2012 to execute the packages. The snippet of sp and output of the query looks like below.

My problem is sp is not taking below parameters and instead run the ssis package with config file parameters. Is something wrong with below query because of which it is not running with these parameters? How can I force the sp to run with parameters I pass and not with the default config file paramaters?

Command –

SET @SQLQuery='DTExec /F '+@PackagePath+'\Master.dtsx '

SET@Params= '/SET \Package.Variables[User::v_PackagePath].Properties[Value];"'+@PackagePath+'"

               /SET \Package.Variables[User::v_DBConnection].Properties[Value];""\"'+@DBConnection+'"\"                       

               /SET \Package.Variables[User::v_OverrideUIFilePath].Properties[Value];'+CAST(@OverrideUIFilePathASVARCHAR(1))+'

               /SET \Package.Variables[User::v_Mode].Properties[Value];"'+@Mode+'"

               /SET \Package.Variables[User::v_Type].Properties[Value];'+CAST(TypeASVARCHAR(100))+'

               /SET \Package.Variables[User::v_FileName].Properties[Value];"'+@FileName+'"

               /SET \Package.Variables[User::v_Source].Properties[Value];"'+CAST(@SourceASVARCHAR(100))+'"

               /SET \Package.Variables[User::v_ID].Properties[Value];'+CAST(@IDASVARCHAR(100))+'

               /SET \Package.Variables[User::v_KeepParallelSupport].Properties[Value];'+CAST(@KeepParallelSupportASVARCHAR(1))+''

SET@SQLQuery= @SQLQuery+@Params     

print@SQLQuery

EXECmaster..xp_cmdshell@SQLQuery

O/p –

DTExec /F D:\Temp\Master.dtsx

/SET \Package.Variables[User::v_PackagePath].Properties[Value];"D:\Temp"           

/SET \Package.Variables[User::v_DBConnection].Properties[Value];""\"Data Source=ServerName;Initial Catalog=DBName;Provider=SQLNCLI11.1;Integrated Security=SSPI;"\"

/SET \Package.Variables[User::v_OverrideUIFilePath].Properties[Value];0

/SET \Package.Variables[User::v_Mode].Properties[Value];"regular"

/SET \Package.Variables[User::v_Type].Properties[Value];0

/SET \Package.Variables[User::v_FileName].Properties[Value];"C:\Exec\2.txt"

/SET \Package.Variables[User::v_Source].Properties[Value];"default"

/SET \Package.Variables[User::v_ID].Properties[Value];1

/SET \Package.Variables[User::v_KeepParallelSupport].Properties[Value];0

Thank you for your help!

leading zeros with employee number column

$
0
0
Hi,
I need leading zero's with EmployeeNum column(source employeenum  is datatype : float).

REPLICATE('0',8-LEN(RTRIM(a.[RecordID and EmpNum]))) + RTRIM(a.[RecordID and EmpNum]) AS [Employee Num]

I have done above query it's populated correctly in database table.

Ex:00010198

When ever we are excuting the package is not receiving the leading zero's to CSV file. Source it self truncating this leading zero's.

Source:OLEDB ,Destination : Flatfile(CSV)
Could you please provide the solution.

Success package when task fails

$
0
0
I've existing SSIS package which is loading Inbound file and SP to validate the data. If data has error then that task is failing by raising errors and user is being notified to correct the data. Task failing is causing package failing also. If there is a task failed due to data error, I want to stop the package execution and success package. How can I set this in existing SSIS package?
Viewing all 24688 articles
Browse latest View live


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