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

Populating Flat File Connection Manager Column Names - There Must Be An Easier Way

$
0
0

Good morning, all -

I have a flat file that is data only, no headers. The header names come from an extant table into which the data from the flat file will be inserted.

I can always map the raw column names - column 0, column 1, column 2, etc. - to the named headers, but I like the column names in the Connection Manager to match the destination. So, I use the Advanced tab in the Flat File Connection Manager to rename all the columns appropriately. But, there're a lot of names and it's tedious to hand-type them in - or, even, to use Copy and Paste the column names from the SQLCREATE TABLE query that was used to make the destination table. I've got 49 columns to name and, some time back, I had a Flat File with over 100 columns that had to be manually named.

There must be an easier way to enter these column names in the Advanced tab of the Editor than doing it manually.

Any ideas?


SSIS - Data Flow Task - OLED source Error Parameters

$
0
0

Hello, 

I am creating a ssis package that uses data flow task that has "OLED Source" and use SQL Command. The code looks similar to this and it has parameter

;With CTE as (select name from master.sys.databases where database_id>?)

Select name from CTE

this is not the actual code but similar.

when I click on parameter to assign, I get this . any thoughts what the error could be?




Hope it Helps!!

SQL Job Failed to run a SSIS Package

$
0
0

Description: ADO NET Source has failed to acquire the connection {FDB1257A-02F5-47DD-B2C5-9C85F4436FB8} with the following error message: "ORA-01005: null password given; logon denied".  

If anyone have solution to help to resolve the above issue. Tried looking all the links but nothing was clearly mentioned.

Request to please share the screen shots while explaining the solution.

Thank you in advance

Script Component - The value is too large to fit in the column data area of the buffer

$
0
0

Hi 

I have been trying to resolve an error message ("The value is too large to fit in the column data area of the buffer") I am getting from a Script Component (C#) that decrypts GPG encrypted column from VARBINARY(MAX) datatype to VARCAHR(MAX) datatype. It has been working fine until the past few days. Here are the Data Flow Task steps:

  1. OLE DB Source - Gets the data from a SQL Server table, which is VARBINARY(MAX) datatype. 
  2. Script Component - dectypts from gpg incrypted column using C#. OutPut Columns is set to DT_STR(8000), which fails if I try to increase the column size above 8000.
  3. OLE DB Destination - Destination table has a VARCHAR(MAX) datatype column size. 

Here is the C# script for step #2:

 int length = (Int32)Row.MyColumnName.Length;
            if (length == 0)
            {
                Row.DecryptMyColumnName = null;
            }
            else
            {
                byte[] bytes = Row.MyColumnName.GetBlobData(0, length);
                String keyString = System.Text.Encoding.ASCII.GetString(bytes);
                if (keyString.Contains("\\r\\n"))
                {
                    keyString = keyString.Replace("\\r", "\r");
                    keyString = keyString.Replace("\\n", "\n");
                }
                else
                {
                    keyString = keyString.Replace("\\n", "\r\n");
                }

                Stream stream = new MemoryStream(System.Text.Encoding.ASCII.GetBytes(keyString));
                Row.DecryptMyColumnName = getDecryptedData(stream, keyString);
            }

I have tried the following links but to no avail:

Any help is greatly appreciated!


IN~

To run a SSIS package outside of SQL Server Data Tools you must install Standard Edition of Integration Services or higher.

$
0
0

Hi,

May be this issue already raised on this forum but am facing following error. 

To run a SSIS package outside of SQL Server Data Tools you must install Standard Edition of Integration Services or higher.

As package build using Microsoft Visual Studio 2015 Shell (Integrated) and T-SQL job created for execution in SQL Server 2016. Following T-SQL command used in SQL Agent job for package execution.

D:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\dtexec.exe /F D:\Packages\MyTest.dtsx /Conf D:\Config\Config.dtsconfig

Read on some threads advising to install Integration services on SQL Server but my colleagues packages built on same Visual Studio working fine.

Many Thanks,
Muhammad Yasir



Many Thanks, Muhammad Yasir

Cannot bulk load because the file "name.json" could not be opened. Operating system error code 12007(Reason: 317).

$
0
0

Can anyone explane me what have I done wrong? I\m just trying execute simple procedures (EXEC[dbo].[PR_MigrateGeometryAttributes_Heating])

Msg 4861, Level 16, State 1, Procedure dbo.PR_MigrateGeometryAttributes_Heating, Line 23 [Batch Start Line 2]

Cannot bulk load because the file "heating/heating_Trimble/Kulvert_Element.data.json" could not be opened. Operating system error code 12007(failed to retrieve text for this error. Reason: 317). 

And I event coudn't find what this error means

Embed HTML code in body email along with multiple attachments

$
0
0

Hi Experts,

as per the title I'm trying to have an email with a body in HTML and multiple attachments.

I've created an SSIS package with the Send Email Task that sends me an email with the attachments but I'm having problems with the body, that has to be an HTML. The email I receive contains the HTML code in it but not the rendered format.

None of Direct Imput (attaching the file) or Variable (with the code in it) for the property Message Source is working. Could you help me out?

Thanks in advance,

Giovanni

Adding CRLF to file with no delimiters

$
0
0
I've got a flat file that I need to add a CRLF to after each 129 chars. This is so a Unix program can run against it, which needs/uses CRLF as a delimiter.  I've tried to use a derived column but since I'm adding 2 chars the next 129 char are off by two. I think i need to use a script task and just create a new file from the original and add the CRLF after each 129 chars. Any other ideas? I'm fairly new to SSIS. I'm using VS 2017

SSIS Data Flow - Automatic updating table whenever a different table is updated.

$
0
0

I need to update Table Parent, whenever there is a new set of records added to Child. There are about 6 Child tables and whenever there is a update in any of the table, I need to kick out the existing rows for that child in parent table and add new records in child to parent. The whole process should be automated, i.e., whenever there is a notification of new rows in child, it should trigger the above mentioned operation.

I am very new to SSIS, so any kind of ideas to start and fulfill this task will be very helpful.

SSIS Packacge not loading data when ran from SQL Server Job

$
0
0

Hi Guys,

I have an issue that I am yet to understand. I have an SSIS package that loads data from cdc.fn_cdc_get_net_changes function using OLE DB Source.

The last time I ran the package was 2 months ago and it worked fine.

Funny though, I tried running it today and I noticed some wierd behavior:

The package runs and loads data to the target table if I run it from Visual Studio, but once I deploy the package to SSISDB and try running it from SQL Server Agent Job, the package runs successfully but then no data is loaded to the target table when even the cdc function query is returning data when I run the same query using SSMS. Any idea why I am having this?

Thanks 


me

SSDT Visual studio data tool 2015 Access Oracle DB through 32 driver

$
0
0

Hi I am creating an packages to connect to oracle and  output write to excel file. I am using SSDT 2015 version . On this task "OLD DB source" task I create a connection to oracle database using 32 bit driver(ODTwithODAC121010). connection has tested and working. But when I place just simple sql on "OLE DB Source" and click "preview" I am getting following error

The system cannot find message text for message number 0x80040e51 in the message file for OraOLEDB.
(OraOLEDB)

Note: I configure 32 bit ODBC driver to connect to the Oracle DB and its connecting.  Not sure why "preview" get error. any one seen this before


CDC Implementation using Flat File

$
0
0

Hi,

Is there a way to implement CDC by using flat file as source?

Thank you,

Dimitris

SSIS transfer sql server objects task RUNS more than TWICE AS SLOW AS A SQL AGENT JOB AS OPPOSED RUN FROM BIDS/SSDT

$
0
0

Hi

I have a dev and live server and I created a transfer sql server objects task in ssis that pull tables from a source server to the dev (destination) server and saved it as a package. I have then copied this package and changed the destination server to the LIVE server.

When I run the package in dev and live they both run successfully. Both servers have identical spec. But when run as  SQL AGENT JOB  from both servers, it takes more than twice as much time on the LIVE server than the dev server. I have traced the job on both servers and the actual copying of data seems to be pretty much the same but the LIVE server spends half of its time trying to get the connection or validation...….all I can say is that it works on both servers but more than twice as slow in the LIVE server. The 2 ssis jobs are exactly the same except that the smo connection for destination on both are different (each pointing to its own server).

So if I run the task from integrated services on the live server, it still takes nearly 3 times longer.....

While monitoring the LIVE server I can see the sql activity monitor showing the ssisdb database as a suspended task state with a wait type of sleep_task……..I can see this in the DEV server also, but in the dev server it begins the transfer object task  after seconds and it takes about 4 minutes before it kicks into action on the LIVE server

No other jobs are running against either servers while I am doing this.

Both servers are windows server 2012 R2 and sql server 2016

Can anyone help me understand why its much slower in one than the other...…and maybe suggest where I can go to resolve the issue...

Thanks for any help....


Regards David McGarry




Rename file using File System Task Editor

$
0
0
Could someone please instruct me on how to use the File System Task Editor to rename a file?  I place control on control flow tab, change the operation to rename, from there I am not sure what to do.

Running a package for each file

$
0
0

Right now, I have an SSIS package that will run daily. Each day, a new file comes in that has the current date stamp (i.e New_file_YYYMMDD) on it and the SSIS package grabs this flat file and merges it with a table in the database. So basically, I keep track of the file name depending on what the current date is. 

However, instead of running the package once for the new file, I want it to run for every file that's been missed. For example say on Jan 1st, the package was run successfully and on Jan 2nd the SSIS was offline. On Jan 3rd it comes back online and I want it to process the file from Jan 2nd and 3rd...so not just 3rd which is what it does right now. So far, I keep track of the latest file that has been processed. So I can determine that the latest file that's been proccessed came from Jan 1st.

I want to know what the best is to accomplish what I'm trying to do. Is it best to use a normal for loop container? I'm new to SSIS so any help is much appreciated!


How to append local variable to global variable in ssis?

$
0
0

Hi,

I have created global connection manager for my Packages and I have variable call filePath , file is on netwrok drive.

for example T:\\testConn\\testProject\\*.txt  is my full file path.

file path (T:\\testConn\\testProject\\) var is created under project.params

and file name is local variable.

How should I append both this values in all my packages(they are all independent packages) in SSIS?

Thank you.


chipsy

Need to learn how to migrate ETL projects/packages from SQL Server 2008 R2 to SQL Server 2014

$
0
0

I Need to learn how to migrate ETL projects/packages from SQL Server 2008 R2 to SQL Server 2014. Can you direct me to where I can read up on how to do this or maybe a class that I can take?

I am in dire need to learn this.

SSIS For Loop Container logic for multiple conditions

$
0
0

I'm having a little trouble with the logic in SSIS For Loop Container

Variables:

  • @FileModDt - The modified date of a file (read by a Task Factory step in the loop)
  • @OldestDateAllowed - Oldest date allowed for a file
  • @Loops
  • @LoopCounter

If I use this expression it works well looking for a file newer than @OldestDateAllowed.  If the file is newer than @OldestDateAllowed, it will proceed:
   @FileModDt <= @OldestDateAllowed

If I use this expression it will loop the number of times as the value of @Loops and finish:
    @LoopCounter < @Loops

The issue is I want to combine them.  I'm trying to do this:  If the file is too old, loop back through, BUT after 5 loops, quit andsomething (throw an error or send an email).

I can't figure out how to set that in the container's EvalExpression logic. 
Neither of these work.
(@FileModDt <= @OldestDateAllowed || @LoopCounter < @Loops)(@FileModDt <= @OldestDateAllowed && @LoopCounter < @Loops)


-Al H


The Script Task uses version 15.0 script that is not supported in this release of Integration Services

$
0
0

Hi All,

We are migrating an SSIS project from SQL 2012 to SQL 2016. The project upgraded successfully without any issues and able to run few packages without any errors. But there are few packages which has got the script task and they are failing. The error message is as below: -

Error: There was an exception while loading Script Task from XML: System.Exception: The Script Task "ST_bb19096e98ab45d2a2d6132b995cd509" uses version 15.0 script that is not supported in this release
of Integration Services. To run the package, use the Script Task to create a new VSTA script. In most cases, scripts
are converted automatically to use a supported version, when you open a SQL Server Integration Services package
in %SQL_PRODUCT_SHORT_NAME% Integration Services. at
Microsoft.SqlServer.Dts.Tasks.ScriptTask.ScriptTask.Load
FromXML(XmlElement elemProj, IDTSInfoEvents events)

This runs fine when run from BIDS (VS2015). It also runs fine if the project is deployed from BIDS and run through agent job. But when the deployment happens through .ispac (deployment) file, this error occurs. Can somebody suggest how to get past this error?

Is it any known issues with migration or with SSIS 2016?

Thanks.


SSIS To import Emails into a SQL Server Table

$
0
0

Hello forum

is it possible to create an SSIS Package to import Emails (title, date sent and body text) into a SQL Server Table?

We are getting over a thousand emails a day from our SQL Sentry so we need a way to analyse these emails better.


Please click "Mark As Answer" if my post helped. Tony C.

Viewing all 24688 articles
Browse latest View live


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