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

Auto run if Script get fails in Loop

$
0
0

Hi team,

I have used to create the report using script task and run through for each loop container. some times my script task webservice connection strings is getting time out for some times. after some times, it will come to up. so i need solution, even my package get failed for this loop, i don't want to get failure for whole package. i want to give chance to failure request 2 more times .

http://social.technet.microsoft.com/Forums/en-US/9c23f232-652b-48d9-af94-827778c02317/ssis-package-auto-retry-until-succeed

This is link extact solution for me, but its not clear to me how to use this.


Howto use linebreak in ssis "send mail task"-mailbody

$
0
0

Hi,

i created a ssis task "send mail" and everything works fine. I uses parameter to pass recipient-email-address, mail-subject and mail-body.

Now I like to use linebreaks in the mail-body but I don't know how. I tried:

 'my mail text ' + char(13) + char(10) + ' next line for my mail'

I also tried:  'my mail text \n next line for my mail' and  'my mail text \\n next line for my mail'

 

I created a procedure to run the dts-package with the following code:


 

Code Snippet

@toAddress VARCHAR(255),

@subject VARCHAR(255),
@mailBody VARCHAR(max),
@exitcode INT = 0 OUTPUT

 

AS

SET NOCOUNT ON

--lokale Variablen
DECLARE @String VARCHAR(1024)


BEGIN TRY
  
    -- next line just for testing linebreak
    SET @mailBody = 'line one in mail ' + char(13) + char(10) + 'next line in mail'

    SET @String='dtexec /Ser <myServerName> /SQ DELELPLGDB01/DTS-Pakete/pkt_sendMail /Set \Package\task_sendMail.Variables[Benutzer::toAddress].Value;"'+@toAddress+'" /Set \Package\task_sendMail.Variables[Benutzer::subject].Value;"'+@subject+'" /Set \Package\task_sendMail.Variables[Benutzer::mailBody].Value;"'+@mailBody+'"'

    EXEC @exitcode = master.dbo.XP_CMDSHELL @String

    select @exitcode as exitcode
  
  
END TRY

 

 

 


Thanks for your Help.

MatDie

 

SSIS will not insert YYYYMMDD into Date field, SSMS will???

$
0
0

If someone can provide an answer to this it would be GREATLY appreciated as it is DRIVING ME INSANE.  i'm trying to insert a date format from SSIS into SQL table YYYYMMDD to DATE.  Please see attached screenshots.  SSIS doesn't work but same format does work in SSMS.  Any ideas???


[Execute SQL Task] Error: Failed to acquire connection "(local).DatabaseName". Connection may not be configured correctly or you may not have the right permissions on this connection.

$
0
0

Hi,

I am trying to set up dynamic connections with variables. I have created a package with an Execute SQL task to Truncate the table in which date will be migrated. The Execute SQL task is connected to  a sequence container with two data flow tasks.

I have an OLE DB connection set up in the connection manager and the same database is used in the package Data Source. The package with these settings executes without any problems.

To make it dynamic I made 3 variables:

  1.containing the Server name

  2.containing the Database name 

  3. containing the Connection String .

Then I enabled package configuration and created an xml configuration type with the first two variables added to the property attributes.

For the third variable, in properties I set Evaluate Expression = true and added to the expression the following:

"Data Source=" +@[User::Variable1]+"; Provider=SQLNCLI10.1;Initial Catalog="+@[User::Variable2]

Then I updated the connection manager by adding to the expression a connection string property. The connection string property is the third variable containing the variables with Server name and Database name.The connection is Windows Authentication.

The package not executing and the error message in the log is :

[Execute SQL Task] Error: Failed to acquire connection "(local).Database". Connection may not be configured correctly or you may not have the right permissions on this connection.

Task Execute SQL Task failed

[Connection manager "(local).Database"] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E4D.
An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80040E4D  Description: "Invalid authorization specification".

Can someone advise what can be the cause of this?

Thanks

Suhi



Difference between derived column and dataconversion transformations

$
0
0

I have a doubt about transformations in SSIS...

Please help me...

We are having dataconversion transformation in ssis to convert data...We can also do that in derived column transformation by using type cast..

Then what is the purpose of designing data conversion transformation...

Thanks in advance

BCP error message

$
0
0

I have a BCP Argument that is being passed in from an SSIS package and it is failing saying that I am missing either a -U or a -T but that is included in the statement.  Can someone please tell me why this is failing?

bcp.exe "SELECT (test_date ) FROM archive_test at1 WHERE at1.test_date <= CONVERT(VARCHAR(10), DATEADD(Day,( -1 ),GETDATE()), 120)" queryout "Z:\bcp_test\" -N -T -D "GGG" -S "BBZ600"

Unzipping a Winzip Archive Using BIS SQL Server 2008 R2

$
0
0
I would like to unzip a Winzip archive using SQL Server Business  Inteligence Development Studio, but can't seem to find the VB.net syntax or shell command to do this. I am currently unzipping in MS Access VBA, but I am new to BIS. Could someone provide the sytax or an example of how to unzip? Thanks.

SSIS Mysql best practices

$
0
0

We are in the process of moving our backend from ms sql server to mysql. Actually we currently use a couple mysql servers, but mostly ms sql server. I mention this because we are not totally new to mysql. Each day we do a lot of ETL to keep our backend in sync with a legacy system. We move a lot of data and working with sql server has been so much easier than working with mysql for ETL. I know SSIS is MS, but still it has been a headache.

We are using sql server 2012  64 bit and BIDS 2010 on windows 7 pro 64 bit. Most of the data that needs to be moved comes from out legacy backend via odbc. It has been a struggle to insert data into mysql at the same rate as ms sql data. We are mainly dealing with innodb tables in mysql. To summarize I have been using the mysql ODBC connector and the ODBC destination in SSIS. The first method is to turn autocommit off on imports. Even with that setting off I can see in package execution that the data source ends up waiting on the destination. It gets about 40,000 rows ahead and waits.

Second method I export the data to a text file and then import using a sql task and the INFILE command. This gives pretty good performance, but at the expense of more moving parts. I've had a couple issues with this approach, but it does work and perform well.

Lastly I tried a 3rd party SSIS component from Devart. It creates custom mysql source and destination components. The performance isn't as good as INFILE, but it's not bad and it makes the package simple like when dealing with sql server... a data source and a data destination. No messing with auto commits, exports, INFILE, etc. However I can't use the connections to do other tasks like truncate tables and stuff. So I still have my ODBC connection to do those tasks. I'm going to ask Devart about this.

Right now it looks like Devart is going to be a nice balance. If I absolutely need the performance I have the INFILE method. In a quick test I got 6,900 rows/sec using Devart mysql connection and destination vs. 1,700 rows/sec using mysql odbc connector and odbc destination.

I also tried the mysql net connector and could not get that to work at all. I'm running on Windows 7 64bit with Sql Server 2012 64bit. Basically everything I need in BIDS runs in 32bit so I'm guessing this part of issues.

My question is what are others doing when it comes to moving mysql data with SSIS? It has been such a hassle. It would be nice to get some input on what others are doing. What methods are you using? Are you using 3rd party components? Is there a better/dedicated place to discuss SSIS and mysql?


How to pass values from Custom UI in Custom Task in SSIS

$
0
0

Hi,

I have built successfully built a custom task in SSIS where I send a notification to an internal notification system. I have now also built a custom UI for this component so the user can add a custom message to this internal messaging system, however, I cannot figure out how to save the user's inputs in the custom UI and apply them to message that is being sent.

I have the following class titled 'InternalMessageTask' which currently sends a message: (this will send an internal message with the text "This Is a test message").

public class InternalMessageTask : Task { private string _Message = "This Is a test message"; public override DTSExecResult Validate(Connections connections, VariableDispenser variableDispenser, IDTSComponentEvents events, IDTSLogging log) { // Does some validating } public override DTSExecResult Execute(Connections cons, VariableDispenser vars, IDTSComponentEvents events, IDTSLogging log, Object txn) { // Send the message SendInternalMessage(_Message); // This is a method that takes a string as an input and sends it to an internal notification system }

public void SendInternalMessage(string MessageToSend)

{

// Some Code To Send a Message.

} public string Message { get { return this._Message; } set { this._Message = value; } } }


Now I have added the following:

class InternalMessageInterface : IDtsTaskUI
{
	private TaskHost _taskHost;
	private IServiceProvider _serviceProvider;
	private InternalMessageUI _editor;
	public void Initialize(TaskHost taskHost, IServiceProvider serviceProvider)
	{
		_taskHost = taskHost;
		_serviceProvider = serviceProvider;
		_editor = new InternalMessageUI(_taskHost);
	}

	public ContainerControl GetView()
	{
		return _editor;
	}

	public void New(IWin32Window parentWindow)
	{
		return;
	}

	public void Delete(IWin32Window parentWindow)
	{
		return;
	}
}

And I also have a form titled 'InternalMessageUI' with the following code:

public partial class InternalMessageUI : Form
{
	private TaskHost _taskHost;
	private string _MessageFromUI = "";

	public InternalMessageUI(TaskHost taskHost)
	{
		InitializeComponent();

		this._taskHost = taskHost;
	}

	private void _BtnSave_Click(object sender, EventArgs e)  // Save Button saves the message input by the user
	{
		_MessageFromUI = MessageTextBox.Text.Trim(); // MessageTextBox is a textbox on the form that a user will use to enter a message to send.
		this.Close();
	}
}

So basically I need to pass the value from _MessageFromUI in the InternalMessageUI class to the _Message variable in the InternalMessageTask class. How can I do this?

SSIS Package / Updating a Table with Dynamic Columns

$
0
0

Hi Everyone,

I have a SSIS Package that retrieves some tables from a SQL Server database and transfer it to a DB2/400 database.

However, there are two tables that I will need to handle a bit differently:

There will be certain fields, which I should use in case it is an "INSERT", but if it's an "UPDATE", few fields of that table should not be updated.

There's a table indicating to the SSIS Package which fields should not be updated.

Unfortunately I was not able to figure out a way how to do that. Do you have any advice for it?

I'm looking forward for your thoughts.

Thanks in advance, Rico

Data Flow Lookup Join on DT_I8 fails with invalid input parameters

$
0
0

I have a lookup transformation:

1)  no cache, OLE DB connection

2) connection is SQL query:   Select fld1, fld2, fld3 from table1  --fld1 and fld2 are datatypebigint, fld3 is n/a (it is the field i am adding to data flow

3) join columns:  

  • fld1 (which SSIS datatypes as DT_I8) joins to data flow IncomingField1 (which is a DT_I8
  • fld2  (which SSIS datatypes as DT_I8) joins to data flow IncomingField2 (which is DT_I8)
  • fld3 again irrelevant as it just becomes the returned field added to data flow.

4) I run it and it fails: 

Error: 0xC0202009 at Data Flow, Lookup [131]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E21. An OLE DB record is available.Source: "Microsoft SQL Server Native Client 11.0"Hresult: 0x80040E21 Description: "Invalid input parameter values. Check the status values for detail.". Error: 0xC0208253 at Data Flow, Lookup [131]: OLE DB error occurred while fetching parameterized rowset. Check SQLCommand and SqlCommandParam properties.  Error: 0xC0047022 at Data Flow, SSIS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Lookup" (131) failed with error code 0xC0208253 while processing input "Lookup Input" (145).

5) I have valid input parameters.  debugger shows 2 rows going down this path. 

  • Data Flow row 1, IncomingField1 has value '2', IncomingField2 has value '2688099'.  
  • Data Flow row 2, IncomingField1 has value '2',  IncomingField2 has value '2688103'. 
  • at this point in dataflow, i am assured not to have nulls because that has all been tested out and handled in prior steps.

6) at this point in data flow, i also know i have rcds in table1 that match the lookup because I am attempting to handle records that fail an insertion step due to duplicate key.

  • Table1, row n/a,  fld1 has value '2',  fld2 has value '2688099'.  
  • Table1, row n/a,  fld1 has value '2',  fld2 has value '2688103'.

7) why does the lookup fail?  everything i have found on the web so far points to datatype problems but i have DT_I8 on both sides of join.

8) I attempted to add a step prior to the lookup, a step to do data conversion or derived column to convert the IncomingField1 and IncomingFiled2 from DT_I8 to DT_WSTR(100) then use lookup SQL that casts fld1 & fld2 to NVARCHAR(100).  but then the data conversion / derived column step fails.  it would seem I can't convert a DT_I8 to a DT_WSTR?  I tried with length 100 and then again with length 4000.  i tried to convert to DT_STR and that fails as well.

9) so I have gone back to the original error and posted here for help.

please help.

Can I call a child package multiple times, synchronously, from a master package?

$
0
0

Hi All,

We need to download 5 files from an FTP server and import them daily.  If any of the 5 files is not available, we want to send an email.  Each file is in a different source folder on the FTP site.  We don't want the unexpected absence of any file to interrupt the download and import of any of the other files that should be available.

This seems like a good time to use a master package that calls a "check and see if the file's available and if so then download it" package for each of the 5 files.  I imagine making 5 simultaneous calls to this child package (by using 5 execute package tasks), passing the source folder name as a variable from the master package to each.

Is this feasible?  Are there any gotchas I need to be aware of?

Thanks,
Eric

Access file from Network drive in Data import and export wizards

$
0
0

Hi all

 I am having Microsoft Fox Pro data file(.dbf) file in network drive, how to access network drive file  in Data import and export wizards using Microsoft FoxPro Data provider.

 please help me out.

Thanks

Selvakumar


Thanks - SelvaKumarSubramaniam.Please MARK AS ANSWER, if my answer is useful to U.

SSIS package schedule

$
0
0
Does it is possible to schedule ssis package or task with in SSIS.

no

The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009

$
0
0

I have deployed my packages into Sql Server and I am using Configuration File. As my Data Source is Excel, I have changed the connection string during deployment with Server Path. But I am getting the following errors. Actually the File Exist in Path. May I know What is cause of the issue? Do I need to give any permission to execute the package.

 

SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009.  There may be error messages posted before this with more information on why the AcquireConnection method call failed. 

 

component "Excel Source Service Contract Upload" (1) failed validation and returned error code 0xC020801C. 

One or more component failed validation. 

 

There were errors during task validation. 

DTS_E_OLEDBERROR, Error Code: 0x80004005 Source: "MS JET DB Engine" Description : Path is not valid


 


SQL Agent Job error while trying to execute SSIS package

$
0
0
I keep getting the error "Executed as user: Domain\User. Unable to open Step output file. The step failed." while trying to execute a SSIS package as a SQL Agent Job. The error is thrown almost instantaneously.

I have created a proxy account for executing the job & this account has read/write permissions to the folder where the package is saved.

Also, there is nothing being written to the error output file.

Thanks Girija

Getting several error codes (0xC0202009,0xC020801C,0x80004005) when trying to deploy a SSIS-Package to SSMS

$
0
0

I have deployed my packages into Sql Server. As my Data Source is Excel and the connection manager is an OLE DB Connection Manager. In many other forums i've read that it's necessary to set the value of the Run64Runtime to "False" at the Debugging Section but I can't change the value as it's already set on False and it is fix. And is it necessary to create a configuration file?

So I am getting the following errors:

 

SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "Excel OLE DB " failed with error code 0xC0202009.  There may be error messages posted before this with more information on why the AcquireConnection method call failed. 

component "OLE DB SOURCE" failed validation and returned error code 0xC020801C. 

One or more component failed validation. 

 

There were errors during task validation. 

BOM-Import1: Error: SSIS-Error code 'DTS_E_OLEDBERROR'. OLE-DB-Error. Error Code: 0x80004005. A OLE DB-Dataset is existing. Source: '(null)' HRESULT: 0x80004005 Description : '(null)'

Integration Services - Deployment wizard & Project conversion wizard shortcut error

$
0
0

Hi,

I am trying create a package for my client. They request for SQL Server 2012 Express and SQL Management Studio.

I have installed both Express and Management studio. When i try the launch the shortcuts "Deployment Wizard" and "Project conversion wizard" under integration services, i am getting the below error .

Failed to Launch the wizard

"To launch the integration services deployment wizard, one of the components: Integration services, Management tools - Basic or Business Intellligence development studio has be installed by the SQL server 2012 Standard, Enterprise, Developer, or Evaluation edition. To install a component, run SQL Server Setup and select the component name."

but i have already installed the component Management tools-basic through management studio.But still getting this error.

The target OS are Win 7 32 bit and 64bit.

Can anyone help me on how to resolve this issue.

Error in Deploying SSIS Package

$
0
0

I tried to deploy an SSIS package I copied from a development server into production server and I got the following error message.

Please can someone help me out

===================================

An error occurred in the Microsoft .NET Framework while trying to load assembly id 65536. The server may be running out of resources, or the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE. Run the query again, or check documentation to see how to solve the assembly trust issues. For more information about this error:
System.IO.FileLoadException: Could not load file or assembly 'microsoft.sqlserver.integrationservices.server, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. An error relating to security occurred. (Exception from HRESULT: 0x8013150A)
System.IO.FileLoadException:
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.Load(String assemblyString)
 (.Net SqlClient Data Provider)

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

------------------------------
Server Name: BI-PDSQL-01\DB
Error Number: 10314
Severity: 16
State: 11
Procedure: deploy_project
Line Number: 22


------------------------------
Program Location:

   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Microsoft.SqlServer.IntegrationServices.Common.ObjectModel.SqlHelper.ExecuteSQLCommand(SqlStoreConnection storeConnection, CommandType cmdType, String cmdText, SqlParameter[] parameters, ExecuteType execType, Int32 commandTimeout)
   at Microsoft.SqlServer.Management.IntegrationServices.CatalogFolder.DeployProject(String projectName, Byte[] projectStream)
   at Microsoft.SqlServer.IntegrationServices.Wizard.Common.Model.DeployExportProjectHelper.DeployProject(CatalogFolder folder, Project project)
   at Microsoft.SqlServer.IntegrationServices.Wizard.Common.Model.DeploymentModel.Deploy(CatalogFolder folder, Project project)
   at Microsoft.SqlServer.IntegrationServices.Wizard.Common.Model.DeploymentModel.DeployProject()
   at Microsoft.SqlServer.IntegrationServices.Deployment.DeployProjectPage.DoWork(Object sender, DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

 


me

How to employ a transaction on flat file import? Occasional bad data rows cause only partial import

$
0
0

Hi All,

I'm creating a flat file import package in SSIS 2008.  We expect occasional row-level errors in the flat file, and when they do occur, we'll need our vendor to correct the file and send a new one, at which point somebody will start the Job to run the package again.  Because of this, I need to make sure that none of the "good" records were imported.  (Otherwise, when re-executing the package, we'll be creating duplicate rows.)

When I create a row-level error, for instance on line 20, the import fails, but not until the first 19 lines are imported.  How can I avoid this?  I assume the answer is to use a transaction, but I'm not sure which is the correct way to do so in SSIS.  Assuming the answer is somewhat in-depth, could somebody point me to a resource that explains it?

Thanks,
Eric

Viewing all 24688 articles
Browse latest View live


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