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

SSIS: TransactionOption not support hangs

$
0
0

Hi

I want to do custom logging (not ssis logging from ssis > logging menu) but I obviously don't want the logging to participate in the main transaction otherwise i'll lose the log records.

DTC is set up. I've a parent (controller) package. The package TransactionOption property is required and the rest (except for logging 'execute sql' tasks) are set to 'not supported'. So it's a basic all or nothing affair except for the logging inserts.

When I try to insert into the logging table it hangs on that task. Ive used profiler and im getting insert locks with blocking session id -2.

It seems as though the transaction start (required) is locking the schema, but allows reads). I've gone through all the properties of the connection manager and execute sql task and nothing is shouting at me. The connections RetainSameConnection property is false so I assumed the connections would be pooled and thus can cope with a 'not supported' task. It doesn't. So I tried to create a new connection and assigned the sql task to this (as not supported) but this doesn't help either, still hangs.

It must be pretty common to log errors independently of a transaction within that package - in the same way as you can do it in a try / catch via sql. But none the wiser through ssis. Any ideas?

Thanks, Jon


How to avoid 'number stored as text' error when exporting data from SQL server to excel using SSIS DatFlowTask

$
0
0

I am using SSIS Data Flow Task to export data from Sql Server to Excel Destination, but while exporting it Convers int value to Numbers Stored As Text Excel Cell Error,every cell gets this error with a green tag.Can you please guide me how can I export my int value to number in Excel.

Thanks

Files moving

$
0
0

Hello

I want moving files to differrent Foldres.

I have a table with 2 columns. First the filename with path, what I want move and second the Destination Folder.

I read this columns with a Execute Sql Task. But how can I setup the result set control a foreach loop container with file system task?

I tried use object and string values like this, but I got error with result set.

Execute Sql Task:

Result Name Variable name

0                 user::moveFilenameObject

1                 user::DestinationFolderObject

0                 user::moveFilename

1                 user::DestinationFolder

Foreach Loop Container:

Enumerator: Foreach ADO Enumerator

ADO Object source variable: user::moveFilenameObject

Variable mappings:

Variable Index

user::moveFilename 0

user::DestinationFolder 1

The error:

[Execute SQL Task] Error: There is an invalid number of result bindings returned for the ResultSetType: "ResultSetType_Rowset".

How to store special characters in sql table?

$
0
0
I am trying to programmatically import data in my sql table(throu SSIS Package). My file Contains a column "Country" with value "HACKÅS" but it's getting inserted as "HACKÃ…S".

Tried with changing datatype from varchar(max) to nvarchar(max). No Success.

Please suggest.

Anyone notice how the designer jumps around when working on items inside a sequence container

$
0
0

I'm not sure where to post this, but anyone else notice how utterly unusable the SSIS designer is when you're working on an item inside a sequence container on SSDT - BI for VS2015? 

1) create a sequence container
2) create an object inside that container, could be an EXECUTE SQL task, could be EXECUTE PACKAGE task, doesn't matter
3) try to click on that execute SQL task or double click it.  

the designer will immediately fly off to some blank part of the canvas far away.  This makes it VERY VERY difficult to work on things.  One has to find the spot on the canvas again, right click on the task, click EDIT and then mess with it that way otherwise it will just keep flying off to an empty part of the canvas.  Trying to move things around inside of that sequence container?  Forget about it.  Does the same flying around crap.  

So, my questions...

1) is this a known problem?

2) is there a fix for this problem?

3) if not a known problem, where would one post this one?  Is it an SSIS thing?  A visual studio thing?  A tools thing?

4) anyone know of some crazy workaround like unchecking the "jerk the screen to center when clicking anything" checkbox or something obvious?

SSIS is pretty flipping hard to work with for my current project when there are dozens of sequence containers and the GUI keeps jerking my screen around for doing nothing other than clicking on a task inside a sequence container.


John Nelson #2

U2 Toolkit for .NET SSIS Provider

$
0
0

Hello All,

I am attempting to migrate a UniVerse database into SQL Server 2014. I have downloaded and installed the U2 toolkit for .net from Rocket software. The U2 provider is displayed in the dropdown list and I have entered all the required info in the Connection Manager window. Once I have entered the info, I test the connection and it connects successfully. But when I try to access the dropdown to view the available tables within the UniVerse database, the tables fail to load. Also when I try to use an SQL command instead, I receive and error that states that the table I selected in my query does not exist. 

I logged to HS.ADMIN on my UniVerse database to configure for odbc access, but I still have not had any success. I am new to UniVerse/UniData databases so it could be that I am just doing something flat out wrong. Any guidance/resources would be greatly appreciated.

Has anyone out there been able to connect to a U2 provider source with SSIS?

How can I script this action inside Data Flow section?

$
0
0

Hi there,

I would need script the action when you change the code page on File destination connection

I want to execute this action automatically

A picture worth a thousand words:

Any ideas?

Thanks in advance,

Setup a proxy account use SQL agent service account - lost permissions to local dbs.

$
0
0
We have some SSIS packages and SQL agent job to run these packages.
one of the developer created the packages and she tried to run it, then get the following message.

No-Sysadmins have been denied permission to run DTS exectution job steps without a proxy account.

The job was run using SQL agent service account.

So I use the same SQL service account ( the reason is so far we only have this service account to be used), and created a credential and a proxy account and granted permission to SQl service etc. And modify the job using proxy account

Then the developer ran it again, he got error: cannot open a database ... by requested login, login failed.

I supposed this proxy account since it is also SQL service account, it should have all permissions on the local databases, but for some reason it no longer so.

Is it because once it is setup as a proxy account, it lost all sysadmin permissions to the local db?

Thanks
                

SQLFriend


SSIS Conditional Split for no row

$
0
0

I am currently implementing a check on the number of records in a control file and actual source file. After this check is done, i basically use a conditional split to identify if the checksum is equal (success) and if it is not equal (be in greater than or lesser than), i will fail the job. There will only be one row record being passed through the conditional split. As shown in the image below:



Right now, i have a problem. Somehow this conditional split task will allow all the 3 splits to be executed despite the condition. With the given scenario above, there will be one record being flow into the 'checksum equal'. how can i not allow the other 2 splits to not even execute at all? Any option for "If no record, don't execute?"

Fetching data WIth Dynamic views of last 4 quarters in ssis

$
0
0

Hello All,

Greetings. I am in India and working in Start-up company as sql developer

I have created 2 views which calculates sales for last 4 quarters. Then In Sql , I am refering to both views and getting my data.

Each Quarter has all tables(same names) and specific Schema say 201601 /201604.

CREATE VIEW1 ABC AS

( SELECT sales from [database_Name].[ABC_201510].[sales]

UNION ALL

SELECT SALES FROM [database_Name].[ABC_201507].[sales] )

I need to create a ssis package in which if I pass 201610 then it fetch last 4 quarters and then need to pass those values in views(Dynamically) to calculate sales. Need to Automate with minimal manual work.

Please help me doing this. So that if i create a ssis package and pass 201510 then it pass [database_Name].[ABC_201510].[sales],[database_Name].[ABC_201507].[sales],[database_Name].[ABC_201501].[sales],[database_Name].[ABC_201410].[sales] to views and then i can use execute sql task and do my things.... Everything is same in tables except schemas which are quarters.

Schemas are like 201604 -> 1,2,3 month data  201607-4,5,6 month data

Please let me know in case of any clarity..


Shakyy


Test connection failed while connecting to oracle DB

$
0
0

Hi,

We tried to establish a connection between SQL Server DB to Oracle DB by creating SSIS package. But we are unable to configuring Oracle DB connection!

Kindly check the below errors and let me know how to configure between them.

# Error 

As we checked the oracle client tools are already installed in the client machine please check below screenshot!

Kindly check whether we installed suitable client tools or do we need any other tools required to install in the client machine..

Thanks,

DBA


DBA

Reading Json file using scrip component in SSIS

$
0
0

I have a Jason file(as shown below) which I stored in certain folder. I only have to read data from "files" not from "paging".

{"files": [
    {"dataset": "EOD","yyyymmdd": "20161101","url": "https://cme.com/cme/api/v/download?fid=20161101-EOD_xnym_rb_fut_0-eth_p","productcode": "rb",
    },
    {"dataset": "EOD","yyyymmdd": "20161101","url": "https://cme.com/cme/api/v/download?fid=20161101-EOD_xnym_rb_fut_0-eth_f","productcode": "rb",
    }
  ],"paging": {"previous": "","next": ""
  }
}

I want output as 

Dataset	yyyymmdd	url														productcode
EOD		20161101	https://cme.com/cme/api/v/download?fid=20161101-EOD_xnym_rb_fut_0-eth_p	rb
EOD		20161101	https://cme.com/cme/api/v/download?fid=20161101-EOD_xnym_rb_fut_0-eth_f	rb

1. I added flat file source and created a new flat file connection manager which has json file.

2. Dragged scrip component from toolbox, used it as transformation and added output columns as shown in the attached picture.

3. I wrote code like this:

public override void Input0_ProcessInputRow(Input0Buffer Row)
    {
JavaScriptSerializer js = new JavaScriptSerializer();

        BlobColumn combinedColumn = Row.Column0;

        string reviewConverted = System.Text.Encoding.ASCII.GetString(combinedColumn.GetBlobData(0, Convert.ToInt32(combinedColumn.Length)));

        // Deserialize the string
        jData jdata = js.Deserialize<jData>(reviewConverted);

        Row.dataset = string.IsNullOrEmpty(jdata.dataset) ? "0" :jdata.dataset.ToString();
        Row.yyyymmdd = string.IsNullOrEmpty(jdata.yyyymmdd) ? "0" : jdata.yyyymmdd.ToString();
        Row.url = string.IsNullOrEmpty(jdata.url) ? "0" : jdata.url.ToString();
        Row.productcode = string.IsNullOrEmpty(jdata.productcode) ? "0" : jdata.productcode.ToString();
}

I added jData class as shown below

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SC_60f54fd494dd4203a385fb38e2084fd1
{
    class jData
    {
        public string dataset { get; set; }
        public string yyyymmdd { get; set; }
        public string url { get; set; }
        public string productcode { get; set; }

    }
}

But I am not getting the desired output. Where am I going wrong?





FLATFILE Connection Type not recognized

$
0
0


I am occasionally getting the following errors.  My searches have not yielded anything helpful yet.

I am using SQL Server 2014 Integration Services with SSISDB Catalog loading data to another SQL server.

The SSIS Package is executed in a loop from the parent package 10.000+ times during a typical load.

The error typically occurs early on, usually with in the 3-6 iteration through the loop. I have not seen it happen the on the first or second iteration.

Rerunning the package once or twice seems to resolve the issue for a while.

Error : -1073676264 : Error loading value "<DTS:ConnectionManagers xmlns:DTS="www.microsoft.com/SqlServer/Dts"><DTS:ConnectionManager DTS:refId="Package.ConnectionManagers[ABC Flat File]" DTS:CreationName="FLATFILE" DTS:DelayValidation="True" DTS:DTSID="{AC6FBA97-8F7F-410A-9A58-61A7BDF93566}" DTS" from node "DTS:ConnectionManagers".

Error : -1073659899 : The connection type "FLATFILE" specified for connection manager "ABC Flat File" is not recognized as a valid connection manager type. This error is returned when an attempt is made to create a connection manager for an unknown connection type. Check the spelling in the connection type name.

The odd thing is it works 99% of the time.  When it does fail, it did work in the previous iteration just a few seconds earlier. 

At the same level there are 3 other FLATFILE connections defined the same way, they have not encountered this error, but I am assuming that may due to this connection comes first alphabetically.

The ConnectionString property is determined by a expression containing a variable @[User::ABCFlatFile]

Any thoughts on Troubleshooting this issue?

Thanks much,

EXEC SP in OLE DB source never outputs

$
0
0

Hello!

I have a stored proc that outputs around 40,000 records in around 50 minutes when executed from SSMS. The intent is to load these records to a table after subjecting them to a few transformations. Hence, I have a package where the same EXEC statement is run in an OLEDB Source (using WITH RESULT SETS). But the source data from the stored proc never gets generated despite running the package for hours. Why is there a difference in time consumption between running the SP in SSIS v/s SSMS?! Please share your thoughts on this.

As an alternative I am considering altering the SP to load the data to a table in the staging area and referencing that in the OLEDB source instead of the exec SP call.

Thank you.

sysssislog nice OnError message column name and row number

$
0
0

Hi,

I am currently logging error from my flat file source to standard sysssislog table.

The logging is very nice. It includes the column name and row number on which the error occurred, for example An error occurred while processing file "c:\test1.csv" on data row 3. 

Am I able to log the same information when using row redirect?

Thanks,

Ben


Mr Shaw... One day I might know a thing or two about SQL Server!


Create a empty text file using script task C#

$
0
0

Hi All,

I have a small requirement , I want to create one trigger flat file  with the massage inside file like "Extract generated successfully"

Trigger filename will be like Extract_YYYYMMDD_HHMMSS_trigger.txt

This task will be last step of the package.

do we have any c# script which can be used to achieve above requirement.

Thanks in Advance


Thankx &amp; regards, Vipin jha MCP

Loading data from SSIS to Excel gives error 'number stored as text'

$
0
0

I am using SSIS Data Flow Task to export data from Sql Server to Excel Destination, but while exporting it Converts int value to Numbers Stored As Text Excel Cell Error. When i researched about this issue there are solutions that it works if we write the data to a template file with one row of dummy data, but it is not working for me. Here is what i did.

 I created an Excel template file.I am using script task to copy template excel file from Source folder to destination folder and I created a variable to hold the destination file path. I then changed my excel connection string expression to use the variable for path.

I can write the data from SSIS to template file(if there is no dummy data/row in the template file) but it gives me same error in excel cell number stored as text. If i add a dummy row to my template file data flow task is not able to write the data to that file and it is giving me below error. Please help me with this one.

[Excel Destination [351]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "input "Excel Destination Input" (362)" failed because error code 0xC020907B occurred, and the error row disposition on "input "Excel Destination Input" (362)" 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 Package Connection Manager issue when run from Integration Services

$
0
0

Hello,

I am new to SSIS and i have been trying to figure out what could be the issue with the connection manager ID as the Connection manager ID displayed in SSIS package is same as the one that throws error while running the package from SQL Server integration services from SSMS.

MASTER_Tables is the package imported


Error after running the package even though the ID is same as the SQL server connection manager

Oledb connection manager ID same as above

{8A6D415C-A395-4A76-A342-464BB97832A7}

please advice what could be the problem when the SSIS package runs okay but not from integerations services

Thanks

Senthil

Services Problem in SSIS

$
0
0

In my machine two versions (2012 and 2014) of SQL servers installed. (SQL Server Integration Services 11.0  & SQL Server Integration Services 12.0)

I developed a package by using 'SQL Data Tool for SQL Server 2014',  But I am trying to deployment it always using SQL Server Integration Services 11.0.

and I'm trying to connect integration service through SSMS by default it takes SQL Server Integration Services 11.0.

Is it possible to use two integration services in same machine?

How can I use  SQL Server Integration Services 12.0 instead ofSQL Server Integration Services 11.0.??


Srinivas Ch



get the package execution status - Flag like

$
0
0

hello ,

I want to check if the package is running or not, if it is running already i need to send email.

else go ahead with the execution step 1

can anyone help me on this, is there any flag or system variable to check so, just checking in precedence line i can achieve that .

thanks,   


Dilip Patil..

Viewing all 24688 articles
Browse latest View live


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