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

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

$
0
0

We are migrating from SSIS 2008 to SSIS2017. Most of the packages have script task and are failing. Below is the error message. 

 " Microsoft (R) SQL Server Execute Package Utility  Version 13.0.1601.5 for 64-bit  Copyright (C) 2016 Microsoft. All rights reserved.    Started:  12:16:12 PM  Error: 2019-03-11 12:16:14.09     Code: 0x00000003     Source: Script Task Script Task     Description: There was an exception while loading Script Task from XML: System.Exception: The Script Task "ST_fecc4ca978964f919844c9f7d5a2815e" 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.LoadFromXML(XmlElement elemProj, IDTSInfoEvents events)  End Error  Error: 2019-03-11 12:16:14.10     Code: 0x00000003     Source: SCR_SaveErrorDetails SCR_SaveErrorDetails     Description: There was an exception while loading Script Task from XML: System.Exception: The Script Task "ScriptTask_6156026deaf941cd980951732e82f9cb" 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.LoadFromXML(XmlElement elemProj, IDTSInfoEvents events)  End Error  Error: 2019-03-11 12:16:14.15     Code: 0x00000003     Source: SCR_DoWeHaveErrorInfo SCR_DoWeHaveErrorInfo     Description: There was an exception while loading Script Task from XML: System.Exception: The Script Task "ScriptTask_3f4582de521e47639ef766f957f95d38" 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.LoadFromXML(XmlElement elemProj, IDTSInfoEvents events)  End Error  Error: 2019-03-11 12:16:15.34     Code: 0x00000003     Source: Script Task      Description: The Script Task is corrupted.  End Error  Error: 2019-03-11 12:16:15.34     Code: 0xC0024107     Source: Script Task      Description: There were errors during task validation.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  12:16:12 PM  Finished: 12:16:15 PM  Elapsed:  2.906 seconds.  The package execution failed.  The step failed." 

The package runs successfully in Visual Studio 2017 and fails when run as a job in SSMS 2017 against database 2016.
I deleted the script task and recreated , but still no luck :(
SQL Agent job uses a proxy setting to run the job



Dataflowtask shows wrong entries from SAP - MBEW fields

$
0
0

Hello community,

I am fetching different tables from SAP via ODBC and everything works fine. But when I am touching MBEW or MBEWH with the fields LBKUM or SALK3 I am getting just 0.00 or completely wrong entries, and that in just those two fields. Same amount of rows which perfect match together, except those two fields.

Has anyone an idea?

Thanks

Mario

Select the LAST ROW of every ID

$
0
0

Greeting Guys

i have a table called PRODUCT_COST

PRODUCT _ ID |  PRODUCT_NAME  | COST | START DATE | END DATE |

 1                        CAR                        20        1/1/2010   | 1/1/2012

 1                        CAR                        30        1/2/2012   | 1/1/2013  

 2                        PEN                        10       1/1/2010    |  1/1/2012

 2                        PEN                        20       1/2/2012    | 1/1/2013

 3                        HOUSE                   40       1/1/2010    | 1/1/2013

i want to select  the last row of every product ! any tips 

So the result will be something like that  :

 1                        CAR                        30        1/2/2012   | 1/1/2013

2                        PEN                        20       1/2/2012    | 1/1/2013

3                        HOUSE                   40       1/1/2010    | 1/1/2013

SSIS package ran on 2010, fails on 2016 with Cannot open datafile. What am I missing?

$
0
0

I have a very simple Data Flow task that moves the results of a query to a *.csv file on a network drive.  It ran fine on SSIS 2010, but not now on SSIS 2016.  Note: I have another solution with over 100 packages that moved over fine (all are generated from BIML files), but it does not access a network drive.

When I run it on my desktop on VS 2017 it runs successfully.

Executing it manually in SSMS 2016 (as myself, Integration Services Catalog) it fails with Error: Cannot open the datafile "\\<server>\<root>\<dir>\<filename>.csv" and Warning: Access is denied. First line error is: 0xC020200E. Scheduled in Agent fails with same error.

I've done this:

deployed from VS 2017 with target server set to 2016

Re-configured the package's connection managers, tried various login ID's and two proxies, changed connection Managers from task level to package level.

The box itself has access to the drive and file.  Checked/re-set permissions to folder and file, Effective permissions are good.

Deleted existing output file.

Does Sql-Server 2016 have an off switch to access network drives?

Any thoughts will be gratefully appreciated.

Mac McCaskie

How to pass a variable value from a Script task (c#) to a variable in the package

$
0
0

Hello everybody,

I would greatly appreciate your help.

  

I am giving some interaction in a SSIS package. I have a C# code in a script task where I issue a message box to ask for Yes or No. If it is yes a variable defined in the C# code gets the value 0 otherwise it gets 1. I need to pass that value to a variable defined in the package to continue the flow.

I am not an expert in C#.

THANK YOU VERY MUCH IN ADVANCE FOR ANY SUPPORT!!!

This is my coding:

                               

 public void Main()
        {
            // TODO: Add your code here
            int xvar=3;
            var result = MessageBox.Show("Generate Template?", "CONFIRM",
                                                MessageBoxButtons.YesNo,
                                                MessageBoxIcon.Question);



            if (result == DialogResult.Yes)
            {
                xvar = 1;
            }
            else if (result == DialogResult.No)
            {
               xvar = 0;
            }
            MessageBox.Show(xvar.ToString());

           // V_door is the variable defined in my package. I need to pass the value from xvar to V_door

           // It is what I was trying to use:

            Dts.Variables["User::V_door"].Value.Equals(xvar);
            Dts.ExecutionValue = xvar;

            Dts.TaskResult = (int)ScriptResults.Success;

        }


Performance Improvement of In memory OLTP over disk based table while inserting data from oracle

$
0
0

Hi,

I was checking the performance of insert timing into In-memory table against disk based table. here are the details

Using SSIS I am pulling data from Oracle view which has about 800,000 records which takes about 03:30 minutes while loading into in-memory table and it takes about same time while inserting into disk based table.

Can anybody please let me know what am I missing here to make it run faster. It's just 1:1 from source to target.

Thanks

 

Sql server Agent job - All steps are starting at the same time even they are scheduled in sequence

$
0
0

Hi,

I have a sql server agent job which has 3 steps. All are Transact-SQL script (T-SQL) type. 

On step 1, I have set that Go to next step on success and quit on failure, same on Step 2 to Step 3 but somehow all steps are kicking off at the same time. not sure why?

Can anybody help me on this?

Thank you in advance

SSIS OLEDB - Receiving error ORA-01403 No Data Found when trying to load records into oracle GTT

$
0
0

I am trying to load records from one table, on a SQL Server, into a global temp table on a Oracle server. I'm able to load the records successfully if I set the dataflow task to a default table name, but it runs far to slow for what I need. It's when I set it to a FAST load, that I run into this error message. I am using the Native OLE DB\Oracle Provider for Oracle. Initially, I thought it was an issue with the oracle provider, but whenever I try this on a different table (permanent), on a different server, it runs fine. I tried switching with Microsoft's oracle provider, but that threw a different error message entirely.

Would there be a setting on the GTT that would block fast loads, or would it be something else entirely? I did not create the GTT. Here's the error output:

[GTT_Variable [2]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code:0x80004005.

An OLE DB record is available.  Source:"OraOLEDB"  Hresult:0x80004005  Description:"ORA-01403: no data found".[Facets GTT [2]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.
The "GTT_Variable.Inputs[OLE DB Destination Input]" failed because error code 0xC020907B occurred,and the error row disposition on"GTT_Variable.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 "GTT_Variable"(2) failed with error code 0xC0209029while processing input "OLE DB Destination Input"(15).
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


Lookup cache mode

$
0
0

Hi,

when adding a lookup there is an option to mark the cache mode.

Available options are: Full cashe , Partial cashe or No cashe.

I believe that whenever a table is extracted, joined with other tables , etc, the primary memory has to be used. So regardless of the option I specify, SSIS is going to use the cashe memory.

Thanks.

Obtain data from a device using SSIS package

$
0
0

Hi All,

I want to automate following task using an ETL package.

Right now we manually connect to a device using telnet: 

Run cmd

telnet some_ip_address port_#

Then we type command:

some_command

Then we get the response in cmd window.

What are my options in automating this process?

Thanks,


Remember to mark as an answer if this post has helped you.

Aggregation

$
0
0

Hi,

(My question is at the end)

SRC Table Description:

Orders (orderId, OrderDate), OrderDetails (OrderId, Quantity, ProductId),Products (ProductId, Price)

the join between Orders and OrderDetails will cause that every Order will have few OrderDetails rows with OrderID, ProductId, Quantity

If I want to present the Total Price Per order i would write an SQL statement:

select o.OrderDate, o.OrderID, SUM( p.Price*od.Quantity) as TotalOrderPrice
from OrderDetails od, Products p, Orders o
where od.ProductID=p.ProductID and o.OrderID=od.OrderID
group by o.OrderID, o.OrderDate
;

Moving to SSIS:

If i want to populate my target table with the above columns (Order Id,  OrderDate, TotalOrderPrice) i can just have a simple OLE DB source, use the above SQL as its input and then connect it to an OLE DB Destination populating my target table.

So far so good. My question is:

1. How do i do the above using SSIS controls, like Aggregate for example without using SQL as an input? 

I would need the ability to retrieve data from 3 tables (order, orderDetails, Product), should i use 3 different OLE DB Source controls? How do i merge their results? How do i perform the grouping?

How should the above be performed using SSIS controls without an SQL join query?

Thank you!


convert from varchar to decimal or numeric

$
0
0

hello , i have a problem dealing with convertion 

so i have a column that contain amount  with type varchar ( because i extract it from an excal so i came with varchar type ) 

example 234,32 / -6 / 1,234,213 so i have a problem when i try to convert it in decimal number  i first treat the null value by using this expression 

replace(REPLACE(ISNULL([CA CIF Net]) || [CA CIF Net] == "" ?"0" : [CA CIF Net]," ","")

 and after that i made a convertion using derived column 

but i doesn't work it gave me for example 23432 

i think that number like this one  1,234,213  causes me problem 

any idea please 

thank you 

the last row in the sampled data is incomplete the coulmn row delimeter may be missing or the text is incorrectly

$
0
0

In the exmple given for SSIS package building, the sample file SampleCurrencyData.txt is been used. In the MSDN, the data in the Flat File Connection manager shows 4 columns where as in my case, following ditto whats been told in MSDn , i get all the values in a single column when I do a preview in the Flat file connection

 

I am getting this error

"the last row in the sampled data is incomplete the coulmn row delimeter may be missing or the text is incorrectly"

please give me correct format of this file to work

Call the same PKG with different Param Value to run simoultanously - Good idea/locks or Create copies of PKG

$
0
0

Good day,

I have a PKG that generates xml files and uploads to FTP that loops for 5 facilities (1A,2A,3A,4A,5A) parameter values.

As the loop runs sequential on next facility the request is to run parallel simultaneously to improve upload times.

So the idea is to create additional 4 copies of the 1 package for each Facility and a 6th Package (calling package) to execute the 5 (facilities) packages simultaneously.

This 1 package reads separate oracle tables on different databases specific for its Facility and some areas the same linked server AS400 and SQL Tables, What is the best and fastest solution to attend to my scenario?

Do I duplicate the package 4 times to create a package for the 5 facilities which is executed by 6th package that only executes the 5 simultaneously OR what I would like to do is in the calling package (6th) execute the 1 (same) package 5 times simultaneously with different facility param value passed to each of the 5 pkgs?

Can this work, how would the performance be (locks etc) is it worth it or stick to having 5 of exactly same pkg with diff param facility ?

If I can execute the 5 simultaneously, how do I pass the Facility param value within the calling pkg (6th)?

Please Help, I don't want to do and its horrible performance - even if I create separate pkgs they still hit he same tables (sql, as400) oracle different tables

not sure what to do, or any other ideas?

Regards

Stored Procedure not giving correct result calling from SSIS

$
0
0

The below stored procedure is being called from SSIS Package. The result of stored procedure is stored in variable through resultset.

now the problem is it is not showing 'Running' in a resultset.

Do I need to change anything. Please help me to resolve the issue.

CREATE PROC  [dbo].[MASTER_STATUS]
AS
BEGIN

SET NOCOUNT ON; 
--Declare all variables 

--Define an infinite loop
WHILE 1 = 1
BEGIN

DECLARE @execution_result varchar (100) 

IF OBJECT_ID('tempdb..#MASTER_STATUS') IS NOT NULL
DROP TABLE #MASTER_STATUS

SELECT TOP 1  e.package_name ,
e.execution_id, 
e.[executable_name] , 
es.[execution_path] , 
es.[execution_duration] , 
es.start_time,
es.end_time,
[execution_result] = CASE ex.[status]
			   WHEN 1 THEN 'created' 
               WHEN 2 THEN 'Running' 
               WHEN 3 THEN 'canceled' 
               WHEN 4 THEN 'failed' 
               WHEN 5 THEN 'pending' 
               WHEN 6 THEN 'ended unexpectedly' 
               WHEN 7 THEN 'succeeded' 
               WHEN 8 THEN 'stopping' 
               WHEN 9 THEN 'completed' 

END 
INTO #MASTER_STATUS
FROM   SSISDB.[catalog].[executables] e 
INNER JOIN SSISDB.[catalog].[executable_statistics] es ON es.[executable_id] = e.[executable_id] 
INNER JOIN SSISDB.[catalog] .[executions] ex ON e.execution_id = ex.execution_id
where e.package_name = 'DMStables.dtsx' 
and  e.[executable_name] = 'MASTER_STATUS' 
and CONVERT (DATE, es.start_time) = CONVERT(Date,GETDATE())
order by es.start_time DESC


IF @execution_result IS NULL or @execution_result = ''
	SELECT 'failed' AS execution_result
ELSE
	SELECT @execution_result AS execution_result


IF  @execution_result = 'Running'
Begin
	WAITFOR DELAY '00:00:30'
	CONTINUE;
End
Else
Begin
	BREAK;
End

SELECT  @execution_result = execution_result from #MASTER_STATUS ORDER BY start_time DESC

END
END

Thanks a lot techie


For each loop editor - Filter files don't work fine.

$
0
0

Hi

I have the filter....

But I see that the package find not only files such as *.xls. In addition, it finds files as: *.xlsx, *.xlsm


How do I parameterize my query?

$
0
0

Hi,

I’m using SSIS ScriptTask for file transferring purposes and inside of the code I have a little query that inserts data into database table. The problem is that the query needs to be parameterized because of SQL injection. I’m not able to run the program if I don’t parameterize it.

My query is:

{

string query = “Insert into ” + SchemaName + “.” + TableName + ” (” + ColumnList + “) “;

query += “VALUES(‘” + line.Replace(FileDelimiter, “‘,'”) + “‘)”;

// MessageBox.Show(query.ToString());

SqlCommand myCommand1 = new SqlCommand(query, myADONETConnection);

myCommand1.ExecuteNonQuery();

}

counter++;

I have basic knowledge of sql and I tried to find some tutorials on this topic, but I was not able to understand it completely.

Any help is appreciated!!

SSIS package failed after test connection success

$
0
0

, Test Connection succesfull, can preview the sample data, destination connection succesfull, but getting the following error on execution

TITLE: Microsoft Visual Studio
------------------------------

Error at Load Data from Oracle to SQL Server [SQL Srvr 2008 R2  DB Destination [1896]]:
An error occurred due to no connection. A connection is required when requesting metadata.
If you are working offline, uncheck Work Offline on the SSIS menu to enable the connection.

 

------------------------------
ADDITIONAL INFORMATION:

Exception from HRESULT: 0xC0202022 (Microsoft.SqlServer.DTSPipelineWrap)

------------------------------
BUTTONS:

OK
------------------------------

error code 0xC0202009

$
0
0

Hi,

I've a weird issue, i've a package on SSIS 2017, the source is SQL 2017 DB,  the OLE DB source fails with that error when I run it locally or on the server.

but I can click on "Preview" from the OLE DBSource Editor and see the data.

I can edit the connection string and test the connection successfully.

but at run time it gives this error...have anyone encountered that before?

I tried delay validation True on the packge as search online suggested.

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


Please mark ANSWERED if my reply contributed to your solution.

Table or View -fast load is failing on SQL Server 2012 but working on SQL Server 2016.

$
0
0

Hi I am facing this issue where I am not able to use the Table or View -fast load to load into a Oracle Staging table.

The reason I am using the Fast Load is it is very very fast compared to the regular load and I am loading to a staging table only which is a truncate and load daily.

Our DEV Server is SQL Server 2016 and PROD is 2012.

I am loading data from Oracle to Oracle only.

When I run on my DEV machine, It is running fine but in Production I am getting the below error.

I tried to open the solution on my Visual studio on PROD server and see the error and below is what it says.

Any Help is Really Appreciated.

Viewing all 24688 articles
Browse latest View live


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