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

SSIS Custom Destination Component not showing in dtsx package

$
0
0

Hi All, I am trying to create a custom xml destination component by using this as a reference xml destination.Below are the steps I used for deploying

1)Build the class library(target framework 4.0)

2)Sign the assembly using strong name

 [DtsPipelineComponentAttribute(DisplayName = "XML Destination",
            ComponentType = ComponentType.DestinationAdapter,
            UITypeName = "Microsoft.SqlServer.Dts.XmlDestSample.XmlDestinationSampleUI, xmldest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=here I add the public token key")]

3)Install in GAC using gacutil \i "dll full path"

4) Copy the xml.dll in the following paths C:\Program Files (x86)\Microsoft SQL Server\110\DTS\PipelineComponents\xmldest.dll && C:\Program Files\Microsoft SQL Server\110\DTS\PipelineComponents\xmldest.dll

After this I open SSIS package and refresh the toolbox, but the custom xmldestination component is not showing in the toolbox.

Can someone please help me to identify  why its not showing in the toolbox?

Environment:

VS2010

.netframework 4.0

MS Windows 10 pro


Upgrade to 2016 edition

$
0
0

Hi morning, we will upgrade to 2016 a virtual machine running Integration Services and the SSISDB catalog active.

is there any risk? Or on the contrary it is just an automatic process?

Thanks for your comments and inputs,

Enric

How to insert alphanumeric column in SQL server using SSIS pacakge?

$
0
0

i have column like   also have some values like 45,510,340. i am trying to insert it using SSIS pacakge into sql server table? file is in.xls format.

even though i set a extended properties 

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\CT92018.xls;Extended Properties="EXCEL 8.0;HDR=YES;IMEX=1"; 

please help me? i don't know how to set row guess registry for all rows in column. thanks in advance.  

SSIS Configuration manager error - Database Connecting user pwd flushes automatically after everytime the VM reboots

$
0
0

I have an SSIS package. I'm able to import the package successfully and we have also turned the save password option "ON" in the configuration manager. The protection level set is "EncryptSensitiveWithUserKey". We have a requirement to reboot the VM every weekend. After the restart of the VM, when we try to import the package, the password is missing and we need to enter the password again manually. Please let me know how to have the password saved.

Thanks

Vignesh

calling data from webservice to sql server

$
0
0

Hi All,

How can i insert data from web services to sql server table by using ssis package.please help me to implement this process.

i am using sql server 2012

my source should be web services and   destination must be sql server 2012.

thanks in advance.

regards

Ganesh

Parameters cannot be extracted from the SQL command

$
0
0

Hi,

I'm trying to use SSIS OLE <acronym style="border-width:0px 0px 1px;border-bottom-style:dotted;border-bottom-color:#000000;cursor:help;color:#333333;font-family:Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif;font-size:13px;line-height:normal;" title="Database">DB</acronym> Source to get some data using a logical date filter such that it only returns the data that has been added into the the data source since after the last execute time of the SSIS package.

The problem is I have to use a parameter in the query, and it spits out an error as soon as i click on the Parameters to add parameter to it.

here's the error content:

Parameters cannot be extracted from the SQL command. The provider
might not help to parse parameter information from the command. In
that case, use the "SQL command from variable" access mode, in which
the entire SQL command is stored in a variable.

Please i need help on this ASAP.

Thanks.


me

String Variable is not populating with the value generated in a C# script.

$
0
0

Hi All,

I have a fairly simple requirement to read the filename from a location and populate a variable with the filename. I am using a script task for this task. No matter what I try, the value of the filename is not populating in the variable.

There is only one ReadWriteVariables which will hold the full name of the file.

Here is the script that I'm using:

namespace ST_f8fd828f11b64932b15f2681e86c8d94
{
    using System;
    using System.Data;
    using System.IO;
    using Microsoft.SqlServer.Dts.Runtime;

    [Microsoft.SqlServer.Dts.Tasks.ScriptTask.SSISScriptTaskEntryPointAttribute]
    public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
    {
         public void Main()
        {

            string p = "C:\\Users\\nthaku01\\Desktop\\NewEXPOLD.txt";

            FileInfo fi = new FileInfo(p);
            String fileName = fi.FullName;
            Dts.Variables["User::vLastFilename"].Value = fileName.ToString();
            MessageBox.Show(Dts.Variables["User::vLastFilename"].Value.ToString());

            Dts.TaskResult = (int)ScriptResults.Success;
        }

        enum ScriptResults
        {
            Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
            Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
        };
        #endregion

    }
}

The MessageBox displays the name(and path) of the file. However, the variable in SSIS is empty

This issue has been discussed in detail previously as well and I tried every trick. However, it is just not working for me. Please help!!

Thanks,

Navneet


Job Agent error step 2 not exist

$
0
0

On job history show:

[000] JobManager tried to run a non-existent step (2)

But not exist step 2, and its ok OnSucess and On Failure (Quit the job reporting...)

[code]

USE [msdb]
GO

/****** Object:  Job [Carga DDU]    Script Date: 24/09/2018 10:49:49 ******/
BEGIN TRANSACTION
DECLARE @ReturnCode INT
SELECT @ReturnCode = 0
/****** Object:  JobCategory [[Uncategorized (Local)]]    Script Date: 24/09/2018 10:49:49 ******/
IF NOT EXISTS (SELECT name FROM msdb.dbo.syscategories WHERE name=N'[Uncategorized (Local)]' AND category_class=1)
BEGIN
EXEC @ReturnCode = msdb.dbo.sp_add_category @class=N'JOB', @type=N'LOCAL', @name=N'[Uncategorized (Local)]'
IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback

END

DECLARE @jobId BINARY(16)
EXEC @ReturnCode =  msdb.dbo.sp_add_job @job_name=N'Cube', 
@enabled=1, 
@notify_level_eventlog=0, 
@notify_level_email=3, 
@notify_level_netsend=0, 
@notify_level_page=0, 
@delete_level=0, 
@description=N'No description available.', 
@category_name=N'[Uncategorized (Local)]', 
@owner_login_name=N'CICI\adm', 
@notify_email_operator_name=N'Manutencao', @job_id = @jobId OUTPUT
IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
/****** Object:  Step [Cube]    Script Date: 24/09/2018 10:49:50 ******/
EXEC @ReturnCode = msdb.dbo.sp_add_jobstep @job_id=@jobId, @step_name=N'Cube', 
@step_id=1, 
@cmdexec_success_code=0, 
@on_success_action=1, 
@on_success_step_id=0, 
@on_fail_action=2, 
@on_fail_step_id=0, 
@retry_attempts=0, 
@retry_interval=0, 
@os_run_priority=0, @subsystem=N'SSIS', 
@command=N'/ISSERVER "\"\SSISDB\BI\Carga.dtsx\"" /SERVER SQLSERVER /Par "\"$ServerOption::LOGGING_LEVEL(Int16)\"";1 /Par "\"$ServerOption::SYNCHRONIZED(Boolean)\"";True /CALLERINFO SQLAGENT /REPORTING E', 
@database_name=N'master', 
@flags=0
IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
EXEC @ReturnCode = msdb.dbo.sp_update_job @job_id = @jobId, @start_step_id = 1
IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
EXEC @ReturnCode = msdb.dbo.sp_add_jobschedule @job_id=@jobId, @name=N'Diario', 
@enabled=1, 
@freq_type=4, 
@freq_interval=1, 
@freq_subday_type=1, 
@freq_subday_interval=0, 
@freq_relative_interval=0, 
@freq_recurrence_factor=0, 
@active_start_date=20180807, 
@active_end_date=99991231, 
@active_start_time=40000, 
@active_end_time=235959, 
@schedule_uid=N'188e2371-fdc6-4e32-2342f-aaasda431bb'
IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
EXEC @ReturnCode = msdb.dbo.sp_add_jobserver @job_id = @jobId, @server_name = N'(local)'
IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
COMMIT TRANSACTION
GOTO EndSave
QuitWithRollback:
    IF (@@TRANCOUNT > 0) ROLLBACK TRANSACTION
EndSave:
GO

[/code]


SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E21

$
0
0

Am importing data from execl using ssis package . 1st i got data type miss matching issue, that time am took a data conversion transformation. but again Am getting bellow error messages while executing the package.

[OLE DB Destination [495]] Error: 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: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.".

[OLE DB Destination [435]] Warning: Truncation may occur due to inserting data from data flow column "DOC_PRF" with a length of 50 to database column "DOC_PRF" with a length of 2.

[OLE DB Destination [495]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "OLE DB Destination.Inputs[OLE DB Destination Input]" failed because error code 0xC020907B occurred, and the error row disposition on "OLE DB Destination.Inputs[OLE DB Destination Input]" 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" (495) failed with error code 0xC0209029 while processing input "OLE DB Destination Input" (508). 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.



Thanks Bala Narasimha

How to password protect a csv file in ssis

$
0
0

Hi guys,

I need help with a code that will enable me to password protect a csv file using ssis.

Thanks


me

PerformUpgrade method is not working on Custom Pipeline Component

$
0
0

I have created a custom Pipeline component that implements the PerformUpgrade method as found on Microsoft's site (code snippet and link below). I have successfully deployed the assembly to the GAC as well as the two Program Files folder for both x86 and x64. For some reason, the package is not being upgraded.

Please note that I have only changed one line of code in the ProcessInput method where the incoming value of a row is checked for the text "nil" and converts it to NULL if true. I  initially performed this check using the StringComparison.Ordinal, but due to a change by the data vendor, I needed to change the check to StringComparison.IgnoreCase. This component previously updated successfully on an older version of SSDT 15.x.x.

In the code below, the FireInformation section is not executed and I do not see any information outputted to either the Errors List or the the Execution results tab. So, this tells me that the PeformUpgrade method is not being called. I have set the CurrentVersion from 0 to 1. It is my understanding that when SSIS loads, it checks the CurrentVersion value of the component that is in a given SSIS package with the CurrentVersion value of the component that is contained in the GAC. If the values are different then SSIS calls the PerformUpgrade method.

    [DtsPipelineComponent(
        ComponentType = ComponentType.Transform,
        CurrentVersion = 1, // from 0
        DisplayName = "Nil to Null",
        Description = "Convert all text values of \'nil\' within the Data Flow pipeline to NULL.",
        // Identifies the icon file that is embedded within the assembly. This is required in order to have the custom icon be displayed within the SSIS Designer.
        IconResource = "SSIS.NilToNull.NullIcon.ico"
     )]

public override void PerformUpgrade(int pipelineVersion)

{
// Execute the base class method.
base.PerformUpgrade(pipelineVersion);

// Obtain the current component version from the attribute. 
DtsPipelineComponentAttribute componentAttribute = (DtsPipelineComponentAttribute)Attribute.GetCustomAttribute(this.GetType(), typeof(DtsPipelineComponentAttribute), false);
int currentVersion = componentAttribute.CurrentVersion;

bool bolCancel = false;
this.ComponentMetaData.FireInformation(0, ComponentMetaData.Name, "The current version is " + currentVersion, "", 0, ref bolCancel);

// If the component version saved in the package is less than the current version (i.e., v1 vs v2), perform the upgrade. 

if (ComponentMetaData.Version < currentVersion)
{
// Update the saved component version metadata to the current version. 
ComponentMetaData.Version = currentVersion;
}
}

https://docs.microsoft.com/en-us/sql/integration-services/extending-packages-custom-objects/data-flow/upgrading-the-version-of-a-data-flow-component?view=sql-server-2017


required files are exist then move in to archive folder in ssis

$
0
0
Hi ,I have one doubt in ssis

how to check all specific files exist or not in the source folder.
if all specific files are exist then process to archive folder in ssis.
source folder :  c:\sourcepath\
in the source path have files like : a.txt,b.txt,c.csv ,d.csv,e.txt
here I need to move files  a.txt,b.txt,c.csv ,d.csv only , no need to process e.txt file.

if this files(all  required files) are exist in the source path then move this files into archive  folder path.
if any one (required )file is not exist then no need to move this files into archive folder.

examples: if source path have only a.txt and b.txt files and not have c.csv and d.csv then no need to process. 
similarly all cases(a.txt exist not exist b.txt or other files then stop)

I design package like below:

declare variables:

sourcepath : c:\sourcepath\
filename   : a.txt
sourcefullpath: c:\sourcepath\a.txt( expression sourcepath + filename)
archivepath :  c:\archivepath\
archivefullpath:  c:\archivepath\a.txt ( archivepath + filename) 

after that drag and drop foreachloop container:type is : foreach fileenumerator ...>directory..>sourcepath variable
file type :*.*

inside foreachloop drag and drop filesystem task ..> then  operation : move files ....>source connection >is sourcepathvariable >true..>source connection>sourcefullpath variable > is destinationpath variable>true >destination connectin >archivefullpath variable.

here I am unable to implement script for all files checking condition that  all are exist or not.

please tell me how  implement to write/check all required files are exist or not before move to archive folder  using ssis package. 




PerformUpgrade method is not working on Custom Pipeline Component in Visual Studio 2017 15.7

$
0
0

I have created a custom Pipeline component that implements the PerformUpgrade method as found on Microsoft's site (code snippet and link below). I have successfully deployed the assembly to the GAC as well as the two Program Files folder for both x86 and x64. For some reason, the package is not being upgraded.

Please note that I have only changed one line of code in the ProcessInput method where the incoming value of a row is checked for the text "nil" and converts it to NULL if true. I  initially performed this check using the StringComparison.Ordinal, but due to a change by the data vendor, I needed to change the check to StringComparison.IgnoreCase. This component previously updated successfully on an older version of SSDT 15.x.x.

In the code below, the FireInformation section is not executed and I do not see any information outputted to either the Errors List or the the Execution results tab. So, this tells me that the PeformUpgrade method is not being called. I have set the CurrentVersion from 0 to 1. It is my understanding that when SSIS loads, it checks the CurrentVersion value of the component that is in a given SSIS package with the CurrentVersion value of the component that is contained in the GAC. If the values are different then SSIS calls the PerformUpgrade method.

    [DtsPipelineComponent(
        ComponentType = ComponentType.Transform,
        CurrentVersion = 1, // from 0
        DisplayName = "Nil to Null",
        Description = "Convert all text values of \'nil\' within the Data Flow pipeline to NULL.",
        // Identifies the icon file that is embedded within the assembly. This is required in order to have the custom icon be displayed within the SSIS Designer.
        IconResource = "SSIS.NilToNull.NullIcon.ico"
     )]

public override void PerformUpgrade(int pipelineVersion)

{
// Execute the base class method.
base.PerformUpgrade(pipelineVersion);

// Obtain the current component version from the attribute. 
DtsPipelineComponentAttribute componentAttribute = (DtsPipelineComponentAttribute)Attribute.GetCustomAttribute(this.GetType(), typeof(DtsPipelineComponentAttribute), false);
int currentVersion = componentAttribute.CurrentVersion;

bool bolCancel = false;
this.ComponentMetaData.FireInformation(0, ComponentMetaData.Name, "The current version is " + currentVersion, "", 0, ref bolCancel);

// If the component version saved in the package is less than the current version (i.e., v1 vs v2), perform the upgrade. 

if (ComponentMetaData.Version < currentVersion)
{
// Update the saved component version metadata to the current version. 
ComponentMetaData.Version = currentVersion;
}
}

https://docs.microsoft.com/en-us/sql/integration-services/extending-packages-custom-objects/data-flow/upgrading-the-version-of-a-data-flow-component?view=sql-server-2017

If I keep the CurrentVersion = 0, which is the original version number, then the error is not thrown until I try to execute the package. So, the error does not show up in the Errors List when the package is validated when I first open the solution. I am able to open the package's existing component.

If I set the CurrentVersion = 1 then the error shows immediately in the Errors List. I am unable to open the package's existing component.

Additionally, if I re-build the original version that has been deployed to production, with no code changes, I am getting this error. Something appears to be broken in Visual Studio 2017.

I have included a FireInformation to display the CurrentVersion in the Execution Result tab, but no value is ever outputted to the Execution Results tab, which tells me that SSIS is not calling the PerformUpgrade method.

"[SSIS.Pipeline] Error: The component metadata for "Nil to Null, clsid {33D831DE-5DCF-48F0-B431-4D327B9E785D}" could not be upgraded to the newer version of the component. The PerformUpgrade method failed."





SSIS 2014 : data conversion failed, the data conversion for column 'amount' returned status 2 and status text 'the value could not be converted because of potential loss of data"'

$
0
0

Hello everyone,

Please help me in this error. I have amount coming from .CSV file and the DT_NUMECI (25,8) , I am converting to this,.

The strange thing is , when i am executing the Data-flow task -- Its RUNNING WELL :(.

When i am ruining the whole package, Its giving an above error (error given  in subject line )

i have tried 'delay validation to false/trun both'

Please help.

Regards and thanks in advance.

PC


pc

SSMS - Duplicating a Database on a Different Server

$
0
0

Good morning, all -

I've been tasked to migrate a number of databases to a new server.

In some cases, the database is on the new server in name only; in others, it is partially populated with some tables, tables that may or may not be in the current state.

However, in some other cases, the database may be completely new on the new server. This is the scenario I have a question about.

In doing some online searches, I have seen that the method to move a database from one server to another, without deleting it from the original server, is to do aBackup/Restore.

So, okay, fine. In the past, when I've r-clicked on a database to perform some task - say, to import data or script it for something - I've seen the "Restore" option. But, I've never seen a "Backup." Even so, I went ahead an r-clicked my destination server's Databases folder and selected "Restore Database."

I get a popup dialog with Source and Destination fields, but it has an error line at the top saying "No backupset selected to be restored." Well, alright, I figure that's because the Source fields are still blank. So, I see Source and Destination dialog fields, but they go no higher than Databases; i.e., I see no field into which I enter a server name. So, the dialog is obviously only for the current server only and not for cross-server copying.

I also see an option list on the left, Select a page, that has "Files" as an option. I clicked on that and see two fields to fill out;Data file folder and Log file folder. However, they're greyed out and I see no way to get them to accept input. All of the input devices on this page are greyed out; the little ellipsis button for browsing, theRelocate all files to folder radio button, everything.

So, that brings me back to the "Backup" part. How do I create a backup of a database? And, since the "Restore" dialog that I saw has, what I presume to be, the page to select a file greyed out, how do I then restore the backup that I need to make?

Thanx for any assistance!


Execute SP in batches

$
0
0

Hi All,

I have couple of Store Procedures in SQL Server. 

Mostly a simple insert with selecting millions of rows from the base tables, and it is running daily in ware house.

How can i make this insert to work in batches, like dividing into chunks and then insert.

Select Many fields

from Mytable

Where  createdWhen >=DATEADD(month, -24, GETDATE());

My querry looks something like this. and it is used to truncate and insert everyday.

Please help me on this 

   


Dilip Patil..

SSIS

$
0
0

Hi All,

Please suggest to the below question.

I did not get good quality of work in SSIS in my current project.because of that I am not more confident on that,But I want some good exposure, I need some hands on experience.In the future if i will get any project so i can work independently.

Please suggest me how to achieve this.

Thanks

Load Pipe delimited data with other special characters

$
0
0

Hello SSIS experts,

I am trying to import a Flat File (Pipe delimited) to SQL Server 2016 database table and getting the following error. I tried using the Import/Export wizard as well as a SSIS package. But, I couldn't figure out the issue.

The "Source - data_txt.Outputs[Flat File Source Output].Columns[CODE_DESC]" failed because truncation occurred, and the truncation row disposition on "Source - data_txt.Outputs[Flat File Source Output].Columns[CODE_DESC]" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.

Upon trying to check the length of this particular column record in the flat file, its length is only 106 characters followed by another column with the pipe delimiter. And this particular column in my database table has a datatype of VARCHAR(255). Could someone please help me with what else should be looked at?

Just an FYI, this particular CODE_DESC column has other characters like " (double quotes). So, I specified the same in the Text Qualifier in case if you're wondering. 

Please let me know if you need more information on this to help me.

Thanks!


Known is a DROP, Unknown is an OCEAN.

SSIS--How to check if the file exists in the destination using any method other than ScriptTask

$
0
0

Hello

I wanted to check if the file Exists,Earlier i use Script Task (C#) to Check if the file exists.Later we some Got permission issues while using Script Task,So i can't use Script Task now.My question is there any other way we can use in ssis to check if the file Exists in the destination.

Any Help!!

Thank you


pkd

Class Not Registered Error

$
0
0

Hi 

I'm trying to run a package as a SQL job, but I'm getting the following error:

The requested <g class="gr_ gr_672 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="672" id="672">OLEDB</g> provider SQLNCLI.1 is not registered. If the <g class="gr_ gr_13 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling multiReplace" data-gr-id="13" id="13">64 bit</g> driver is not installed, run the package in 32-bit mode. Class not registered. Consider changing the provider in the connection string to SQLNCLI11 or visit microsoft.com/downloads.

In my package, one of the connection string has SQLNCLI.1 provider. Our SSIS server is 2012 but the SQL box is 2016. We have the Microsoft SQL server native client 2012 installed. I have also changed the SQL job properties to 32 bit. But still, it's not working. Is there any other way that we can solve this issue without changing the connection string on the package level?. Please let me know.

Thanks,


Viewing all 24688 articles
Browse latest View live


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