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

Get FileName, Actual File Created date and Filesize in to sql table

$
0
0

Hi All

I have a scenario where I need capture FileName, File Created Date and file size in to a sql table. I was able to use a script component. But unfortunately the file creation time is not the actual file created date but its capturing the modified date.

Consider a file was created on source folder at 2.30 PM and I copied the file to target folder at 2.45 Pm , My code is pulling up the copied timestamp not the actual file created time stamp. Below is the code , Can you please how do I capture the actual creation date

  public void Main()
  {

            SqlConnection myADONETConnection = new SqlConnection();
            myADONETConnection = (SqlConnection)(Dts.Connections["GetFileInfo_Target"].AcquireConnection(Dts.Transaction) as SqlConnection);
            //MessageBox.Show(myADONETConnection.ConnectionString, "ADO.NET Connection");
            string DirPath = Dts.Variables["User::VarDirectoryPath"].Value.ToString();
            //get all files from directory
            string[] files = Directory.GetFiles(DirPath);
            SqlCommand sqlCmd= new SqlCommand();
            sqlCmd.Connection = myADONETConnection;
            //loop through files
            foreach (string filename in files)
            {
                FileInfo file = new FileInfo(filename);
                sqlCmd.CommandText = "INSERT INTO [dbo].[FileAttributes] ([Filename],[FileCreatedDateTime],[FileSize]) Values('" +
                file.Name + "','" + file.CreationTime + "','" + file.Length + "')";
                //MessageBox.Show(sqlCmd.CommandText);
                sqlCmd.ExecuteNonQuery();
              }

   Dts.TaskResult = (int)ScriptResults.Success;



FTP File Properties

$
0
0
I'm using a script task. How do you connect the FTP site to loop through the files to get the most current file by the LastModifiedDate?

SSIS

$
0
0

Hi Team,

Iam having source data in MSAccess like seperate folder as jan,feb,march,april etc.By using ssis iam loading data like like jan,feb,march etc. one by one manually.Is there any option to load jan,feb,march etc at a time to load in future into destniation folder?

How i did like this,

Digital Cert

$
0
0

Hi,

What is the use of digital signing of SSIS package? and how it can be done?

is it just to identify its source and encrypt at issuing end that can be de-crypted at using end?

Is it good to use encrypt all with user key or encrypt all with password, instead to securing it using digital signing and encryption..

Or

Can create the pkg normally with DontSaveSensitive and ask at receiving end to open the package and change the property to EncryptAllWithUserKey and use the package with that user only. In this way I do not need to take a path for digital signature.  Here my requirement is simple I want to secure entire package being shipped to receiving server (at customer end) for their use.  


Neil



SSIS where is the login on execution coming from?

$
0
0

Hi there. I have a project deployed SSIS project. When I deploy to the server and run the project, in the activity monitor I see the name of the previous guy as the "login_name" who worked on it (he's now left). Where is this coming from? I'm looking at the job and its configurations, he's not there. I've been looking all around the SSIS package and connections and he's not there. There's nothing on the project options and the deployment wizard doesn't elude either. Need to change him as he doesn't have permissions on certain things. Where is he?!

Thanks in advance....

Executing SSIS package from C# - getting an error 'To run a SSIS package outside of SQL Server Data Tools you must install Standard Edition of Integration Services or higher.'

$
0
0

Hi,

I am trying to execute SSIS package from C# code but  getting an error 'To run a SSIS package outside of SQL Server Data Tools you must install Standard Edition of Integration Services or higher.; SSIS package contains fileSource, file destination and scriptComponent. 

It is working without script component. I have installed SQL server 2017 developer edition and SSDT.

Unable to read the XML files using SSIS XML Source

$
0
0

Hi
Can someone help me with why I am not able to load the XML file using SSIS?
When I tried to read using XML Source, I am not seeing any columns.

Below is the path for the file:
https://drive.google.com/file/d/1jyw9Q-K6RHs4wrqIl73aGG2bDBQaKTny/view?usp=sharing

I want to load many files like above that I am getting from the below link and I am having the same issue for all the files.
I am getting the files from the below-shared link.
ftp://164.64.106.6/Public/OCD/OCD%20Interface%20v1.1/core/ 

Thank you for your help.


Can't able to deploy .ispac from Integration Service Catalog 2017

$
0
0

Hi Folks,

I am getting below error while try to deploy a simple ssis project that is developed using 2015 vs and converted to 2017 deployment model , I am trying to deploy it through Integration Service catalog on SQL server v17. Error as follows

TITLE: SQL Server Integration Services

A .NET Framework error occurred during execution of user-defined routine or aggregate "deploy_project_internal":
System.ComponentModel.Win32Exception: A required privilege is not held by the client
System.ComponentModel.Win32Exception:
   at Microsoft.SqlServer.IntegrationServices.Server.ISServerProcess.StartProcess(Boolean bSuspendThread)
   at Microsoft.SqlServer.IntegrationServices.Server.ServerApi.DeployProjectInternal(SqlInt64 deployId, SqlInt64 versionId, SqlInt64 projectId, SqlString projectName)
. (Microsoft SQL Server, Error: 6522)

I am trying to deploy windows authentication mode, I have admin rights on the machine. I've tried suggestions posted https://blogs.msdn.microsoft.com/dataaccesstechnologies/2013/08/20/system-componentmodel-win32exception-a-required-privilege-is-not-held-by-the-client-while-deploying-ssis-project/ to change DCOM config , but that doesn't help.

Other suggestions to change Log On As a Service seems to be outdated , I didn't find similar settings on my local pc windows10. Please share if you have any work around to solve this.


SQL Job Failed after SSIS Package imported in MSDB

$
0
0

Tried following the below process to import the package and when ran the SQL Job got the error log as below.

1.  Updated the SSIS package with minor modification.

2. Generated the Build files

3. Connected to Integration Services and navigated to MSDB and respective package 

4. Right click on the package name and selected Import Package.

5. Selected the Package file and imported the latest package.

6. After successfully imported. Tried running the SQL Job but gives below error.

About the SSIS package, It connects to multiple databases and pulls data to write in Excel file which later gets copied into a PRODUCTION path.

Log Message

Executed as user: \SVC_RSIS. Microsoft (R) SQL Server Execute Package Utility  Version 11.0.7001.0 for 32-bit  Copyright (C) Microsoft Corporation. All rights reserved.    Started:  4:05:30 PM  Error: 2018-12-26 16:13:42.96     Code: 0xC0202009     Source: Data Flow Task Excel Destination [2]     Description: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x00040EDA.  An OLE DB record is available.  Source: "Microsoft JET Database Engine"  Hresult: 0x80040E21  Description: "Numeric field overflow.".  An OLE DB record is available.  Source: "Microsoft JET Database Engine"  Hresult: 0x80040E21  Description: "Numeric field overflow.".  End Error  Error: 2018-12-26 16:13:42.96     Code: 0xC0209029     Source: Data Flow Task Excel Destination [2]     Description: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "Excel Destination.Inputs[Excel Destination Input]" failed because error code 0xC020907B occurred, and the error row disposition on "Excel Destination.Inputs[Excel 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.  End Error  Error: 2018-12-26 16:13:42.96     Code: 0xC0047022     Source: Data Flow Task SSIS.Pipeline     Description:SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "Excel Destination" (2) failed with error code 0xC0209029 while processing input "Excel Destination Input" (13). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.  There may be error messages posted before this with more information about the failure.  End Error  Error: 2018-12-26 16:14:53.49     Code: 0xC02020C4     Source: Data Flow Task OLE DB Source [49]     Description: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020.  End Error  Error: 2018-12-26 16:14:53.49     Code: 0xC0047038     Source: Data Flow Task SSIS.Pipeline     Description: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on OLE DB Source 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.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  4:05:30 PM  Finished: 4:20:56 PM  Elapsed:  925.782 seconds.  The package execution failed.  The step failed.

Quick response will help me fixing the issue.

Thanks in Advance.

Regards,

Aiyaz


Aiyaz

Recommended SSIS service account ?

$
0
0

Hello, is it still best practice to create a separate new Local User account (not Domain User) when installing/adding SQL Server Integration Services 2016?

I notice some examples out on the web uses the default [NT Service\MsDtsServer130] account but just wanted hear feed back.

Thanks in advance.

Trying to create ETL process such that it copies multiple CSV files inside a folder which resides inside a azure blob (there are multiple folders and each folder have multiple files)

$
0
0

- I have a data flow ready which copies data from one CSV file to destination DB 
- Kind of stuck with the next steps trying to use for each loop 
- my folder structure:  Azure storeage account-- Container-- folder(Date)--folder(VenueName)[multiple venue folders for that date]--multiple .csv files

Thank you in advance for help!

Exception deserializing the package "Value does not fall within the expected range.

$
0
0

Visual Studio 2015 Integration Services

Whenever I try to Execute a package I get the error below. The connection managers all look good and I can preview any dataset that I am sourcing or writing to (Ole DB and odata). In addition I created an empty package and tried to execute it and still got the error .. so I assume it's something at the solution level.

Some background. I am moving many packages over from an existing solution into a new solution. (the old solution and it's packages work fine) I have copied over many of the package components into new packages in the new solution. I made sure to update connection managers, etc. I have already verified I can preview source data and that fields match up in data types, etc.

FULL ERRROR:

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

Exception deserializing the package "Value does not fall within the expected range.". (Microsoft Visual Studio)

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

   at Microsoft.DataTransformationServices.Project.DataTransformationsPackageDebugger.LaunchVsDebugger(IVsDebugger iVsDebugger, DataTransformationsProjectConfigurationOptions options)
   at Microsoft.DataTransformationServices.Project.DataTransformationsPackageDebugger.ValidateAndRunDebugger(Int32 flags, IOutputWindow outputWindow, DataTransformationsProjectConfigurationOptions options)
   at Microsoft.DataTransformationServices.Project.DtsPackagesFolderProjectFeature.ExecuteTaskOrPackage(ProjectItem prjItem, String taskPath)

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

Value does not fall within the expected range. (Microsoft.SqlServer.ManagedDTS)

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

   at Microsoft.SqlServer.Dts.Runtime.Interop.ProjectInterop.GetPackageByName(String bstrPackageStreamName)
   at Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSProject100.GetPackageByName(String bstrPackageStreamName)
   at Microsoft.DataTransformationServices.Project.DebugEngine.DtsProgramNode.CreateRuntimePackageInternal(IDtsHost& host, Process& process, Package& dtsPackage)

SSIS Deployment Target Server Version to SQL Server 2017

$
0
0

Hi Team,

I am facing the issue while changing the deployment target version sql server 2017 to 2016.

Package get failed showing below two errors.

We are using oracle attunity.

Error: The result of the expression "@[User::XX]" on property "\Package\DFT InvoiceBatches Extract.Properties[[Oracle Source].[SqlCommand]]" cannot be written to the property. The expression was evaluated, but cannot be set on the property.

[SSIS.Pipeline] Error: Cannot find the connection manager with ID "{E584DFA6-BBB3-4F6D-B0F2-1B48E3784905}" in the connection manager collection due to error code 0xC0010009. That connection manager is needed by "Oracle Source.Connections[MSOraConnection]" in the connection manager collection of "Oracle Source". Verify that a connection manager in the connection manager collection, Connections, has been created with that ID.

error while executing SSIS package with Script component using custom dll

$
0
0

HI,

I am getting an error while executing SSIS package with Script component using reference to project in my solution. I don't want to add that dll in GAC, also AssemblyResolver uses dll path which i can not give. Is there any other way to fix it?

how to read the value of an object variable in script task

$
0
0

Hi guys,

I have an object variable in my SSIS package that I will like to convert the value into a string.

I tried this:

string data = Dts.Variables["Name"].Value.ToString(); and got the following response.

system __ comobject

Can someone assist, thanks


me


SSIS package execution error- on server

$
0
0

Hi,

I have created package with one flat file source and two destination , valid data goes to sqlserver destination using oledb provider and bad data goes to another flat file.

This package executes locally fine, but it failed to execute from server.

What it should do – when it get executed on server it should read file from network and load data to remote machine (no worries here -with configuration, this works fine with other packages I have created.)

Below is the error - after I deply and execute same package on server.

the oledb provider used by the oledb adaptor cannot convert between types DT_DBTIME2 and DT_WSTR for blabla..….field.

Thank you.


chipsy


SSIS - SharePoint List Multiple Lines of Text column to Oracle

$
0
0

I created an SSIS package to export SharePoint list items to an Oracle database table.

I can export all column values except for columns that are Multiple Lines of Text. The column data type in Oracle is VARCHAR2(4000 BYTE). I tried with CLOB and it did not work either.

Does anybody know a way to import Multiple Lines of Text columns to Oracle using SSIS?

Thanks!




How to Multithread/parallel run SSIS in a Round Robin order

$
0
0

Hi,

I need to run SSIS package to load about 20 entities at the same time. However, it needs to make sure that the packages do not step each other, e.g. not try to execute the same load by multiple processes.

The environment is Azure SQL Managed instance and I have configured Integration run time and deployed SSIS packages to the Integration Serviced catalog.

I have a driver table where the SSIS package queries to load the data. From the driver table, the package then extracts and loads data for each corresponding plants.

Here is the table structure

So, The SSIS package needs to load all of the plants at the same time. Once a load is done then the completion value changes to 1 (complete). Load status 'N (not run) to 'R' (Running) and' L' (loaded).

I'm trying to make it dynamic without the processes interfering (i.e. not two or more process starts the load same plant).


M. Chowdhury

Merge PDF files into one file

$
0
0
Is there a way in SSIS where we can merge multiple PDF files into one PDF file? Not sure if this is achievable using SSIS. Let me know if not using SSIS what are the other ways to achieve this? Any help much appreciated.

Import data from Oracle to SQL Server.

$
0
0

I have a table in Oracle (12g) with 193M rows that I am trying to import into a SQL Server database. I am trying to use the SQL Server Import/Export Wizard but the option to import the entire table is unavailable. I am also thinking about using SSIS. Has anyone else had any experience with this process?

Viewing all 24688 articles
Browse latest View live


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