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

SQL 2012 SSIS log provider. The connection "" is not found. This error is thrown by Connections collection when the specific connection element is not found.

$
0
0

SQL 2012 SSIS log provider. The connection "" is not found. This error is thrown by Connections collection when the specific connection element is not found.


Create SSIS 2012 project.
Create connection manager in "Package" for setting SSIS log provider.
[Start Debugging] is work fine.

Create "Project" connection manager.
And change "Project" connection manager from "Package" connection manager on SSIS log provider.
[Start Debugging] is looks fine. But there is error in [Execution Result] Tab.

--------
The connection "" is not found. This error is thrown by Connections collection when the specific connection element is not found.
--------

Error has occurred, but logging is done.

「The connection "" is not found.」are saying what not find?


SSIS:- How to create Slowly changing dimension component using c#.

$
0
0
How to Create Slowly changing dimension using c# Code?

Executing Oracle package with Script Component Task

$
0
0

Hi All,

I'm currently doing a SSIS package to migrate data from SQL Server 2012 to Oracle. 

I have an Oracle procedure within an Oracle Package. The procedure is as per below:

   PROCEDURE Get_Days_Limit(pMineCode IN VARCHAR2, rec_cursor OUT t_cursor) 
   IS
        
   BEGIN
   
   OPEN rec_cursor FOR
      SELECT MAX_LOAD_DAY 
          FROM SSIS_CONFIG
        WHERE MINE_CODE = pMineCode;
   END;

I have a script component which execute the above procedure. Below is the script for the script component. 

using System;
using System.Data;
using System.Data.OracleClient;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using Microsoft.SqlServer.Dts.Runtime.Wrapper;

[Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute]
public class ScriptMain : UserComponent
{
    private IDTSConnectionManager100 connMgr;
    private OracleConnection oracleConn;
    private OracleCommand oracleCmd;

    public override void AcquireConnections(object Transaction)
    {

        base.AcquireConnections(Transaction);

        connMgr = this.Connections.TSA;
        oracleConn = (OracleConnection)connMgr.AcquireConnection(Transaction);
    }

    public override void PreExecute()
    {
        string plsql;
        
        base.PreExecute();

        plsql = "BEGIN tsa_interface_mfl_pkg.Get_Days_Limit(pMineCode,rec_cursor);END;";
        oracleCmd = new OracleCommand(plsql, oracleConn);

        oracleCmd.CommandType = CommandType.Text;
        oracleCmd.Parameters.Add("pMineCode", OracleType.VarChar);
        oracleCmd.Parameters.Add("curMaxDays", OracleType.Cursor);
    }

    public override void PostExecute()
    {
        base.PostExecute();

        if (oracleCmd != null)
        {
            oracleCmd.Dispose();
        }
    }

    public override void ReleaseConnections()
    {
        base.ReleaseConnections();
        connMgr.ReleaseConnection(oracleConn);
    }

    public override void CreateNewOutputRows()
    {
        try
        {
            string mineCode = Variables.pMineCode;
            oracleCmd.Parameters["pMineCode"].Value = mineCode;

            OracleDataReader dr = oracleCmd.ExecuteReader();

            if (dr.HasRows)
            {
                Output0Buffer.AddRow();
                Output0Buffer.MaxLoadDays = dr[0].ToString();

                Variables.MaxDaysCount = Convert.ToInt32(dr[0].ToString());
            }

        }
        catch (Exception ex)
        {
            this.ComponentMetaData.FireInformation(-1, "Extract Data", ex.Message, string.Empty, 0, true);
        }

        Output0Buffer.SetEndOfRowset();
    }

}

The issue that I'm having is an exception is raised at the following line OracleDataReader dr = oracleCmd.ExecuteReader();.

The error is ORA-01036: illegal variable name/number\n.

Can anybody help me on the above issue? I've spent quite some time on the above and i can't figure out why the error is raised.

Initially, I tried using Execute SQL Task (without the cursor parameter in the procedure) and it was still failing. 

Any help or suggestions will be greatly appreciated.

Thanks

SSIS Execute SQL Task using sp_rename giving deadlock issues

$
0
0

All,

We have a job that has 2 steps and both of those steps call an SSIS package

1st package - Loads the data from a SQL server source, to a SQL Server destination tables, say, "TblHistory" is one of them

2nd package - It does a re-name from the History table to the Main table, so below, is how the code looks like in the execute SQL Task:

BEGIN TRANSACTION 

EXECUTE sp_rename 'dbo.Tbl', 'TblOld'
EXECUTE sp_rename N'dbo.TblOld.PK_TblId', N'PK_TblIdOld', N'INDEX'

EXECUTE sp_rename 'dbo.TblHistory', 'Tbl'
EXECUTE sp_rename N'dbo.Tbl.PK_TblHistoryId', N'PK_TblId', N'INDEX'

EXECUTE sp_rename 'dbo.TblOld', 'TblHistory'
EXECUTE sp_rename N'dbo.TblHistory.PK_TblIdOld', N'PK_TblHistoryId', N'INDEX' 

COMMIT TRANSACTION

In package 1 there are multiple history tables that are being loaded and most of them get renamed in the 2nd package. There is a separate SQL task for each of the history tables. The problem that I am running in to are the deadlock issues. When the 2nd package runs, it throws this error:

"SQL - Table Rename & Swap for "Tbl" Execute SQL Task     Description: Executing the query "BEGIN TRANSACTION     EXECUTE sp_rename Tbl..." failed with the following error: "Transaction (Process ID 60) was deadlocked on lock resources with another process and has been chosen as the deadlock victim."

It's giving me a deadlock issue on the other tasks as well. So, when the job ran today, I am noticing 4 deadlock errors on the 4 different execute SQL tasks in the 2nd package (i.e. the job fails at 2nd step)

Has anyone faced this scenario before?


How to read 835 files using ssis

$
0
0

Hello Everyone,

It is possible read 835 files using ssis.

Please share your suggestions on this.

Regards,


Vaishu

SSIS 2012 Error - The SQL Server specified in Integration Services service configuration is not present or is not available..

$
0
0

hi Guys,

 working on below error if anyone has work around. 

It is on SQL Server 2012 cluster. 

The SQL Server specified in Integration Services service configuration is not present or is not available. This might occur when there is no default instance of SQL Server on the computer. For more information, see the topic "Configuring the Integration Services Service" in SQL Server 2012 Books Online.


Please Mark As Answer if it is helpful. \\Aim To Inspire Rather to Teach

How do I archive a processed file and move

$
0
0

This is not our standard. Our standard is to output the extract file, then
archive a copy. The reason is that a process usually comes along afterward and
moves the file to another location.

Also within scope of this item is the need to confirm that any successor
processes like copying the file actually move the file, when the successor(s)
are done, there should be no file left in the 817 folder so that we know the
processing happened.

SQL 2012 - SSIS Error -The step did not generate any output. The return value was unknown. The process exit code was -1073741819. The step failed.

$
0
0

Hi guys 

 Trying to run this package on SQL 2012 agent  and getting below error . No more details I could find so far.

The step did not generate any output.  The return value was unknown.  The process exit code was -1073741819.  The step failed.

About Package - Its connecting to different version (2000,2005,2008,2008R2,2012) servers and putting Jobs information into one Database table.  

Any workaround or fix ?

Thanks


Please Mark As Answer if it is helpful. \\Aim To Inspire Rather to Teach


SSIS Expression - evaluates really slowly.

$
0
0

Greetings all.

I have an expression used as a dynamic query. It's set prior to running the Data Flow Task it's used in. However, whenever I want to change or check on the value of it, it takes quite literally minutes to evaluate.

Here's the expression:

@[User::DynamicQuery] = "SELECT * FROM mytable
where someColumnName between '"+right("00"+(DT_WSTR,4)year(DATEADD("d",-8,getdate())),4)+"-"+
right("00"+
(DT_WSTR,2)month(DATEADD("d",(-7+2-datepart("weekday",getdate())),getdate())),2)+"-"+right("00"+(DT_WSTR,2)day(DATEADD("d",(-7+2-datepart("weekday",getdate())),getdate())),2)+"' and '"+right("00"+(DT_WSTR,4)year(DATEADD("d",-1+2-datepart("weekday",getdate()),getdate())),4)+"-"+
right("00"+(DT_WSTR,2)month(DATEADD("d",-1+2-datepart("weekday",getdate()),getdate())),2)+"-"+right("00"+(DT_WSTR,2)day(DATEADD("d",-1+2-datepart("weekday",getdate()),getdate())),2)+"'"

It's just a bunch of string concatenation, with a little date math thrown in really. The same date math is also used in other expressions to achieve the same ends, and those behave normally.

Does anyone have a good idea as to what might be causing this one to be such a slug?

Thanks

Inherits Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase is CLS non-compliant

$
0
0

I'm upgrading SSIS 2005 packages to SQL 2008 R2, and I'm running into a problem with VB.Net the Scripting Task.  In SQL 2005 SSIS VB.Net Scripting task the DTS object is instantiated implicitly at runtime and has global scope.  In SSIS 2008 VB.Net scripting task you need to add the reference: 

Inherits Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase

Unfortunately this creates an error message that I don't understand:  

'ScriptMain' is not CLS-compliant because it derives from 'VSTARTScriptObjectModelBase', which is not CLS-compliant. The module won't build the binary with this error.  

I'm sure that this problem has plagued legions of other SSIS developers, so hopefully someone has the fix that is less than rebuilding each VB.Net tasks from scratch in SQL 2008.

Cheers!

Brandon_Forest@calquake.com

SSIS proxy account fails "the user name or password is incorrect'"

$
0
0

details. and this one really has me stumped. I have tried various logins and so forth.

SQL Server 2014 Standard, 64 bit, running on up to date Windows Server 2012 R2 standard 64 bit.

goals: give a domain user the ability only to execute SSIS job(s) that he is allowed to.

1. add user's domain userid to logins on server

2. add user to MSDB, add user to SQLAgentUserRole

3. add job to sql server agent, set user (above to owner)

4. create credentials for proxy account

CREATE CREDENTIAL [SSISProxyCredentials]
WITH IDENTITY = '<domain>\<domain userid that runs sql server agent>', -- not user that owns the job
SECRET = <domain userids password>'
GO

the domain account is a sysadmin, the password does not expire and i have verified that i can connect to SSMS and the server using the same domain userid.

..how i set up proxy...

EXEC msdb.dbo.sp_add_proxy
@proxy_name = N'SSISProxyDemo',
@credential_name=N'SSISProxyCredentials',
@enabled=1
GO

.. next

EXEC msdb.dbo.sp_grant_proxy_to_subsystem
@proxy_name=N'SSISProxyDemo',
@subsystem_id=11 --subsystem 11 is for SSIS as you can see in the above image
GO

.. next

EXEC msdb.dbo.sp_grant_login_to_proxy
@proxy_name=N'SSISProxyDemo'
,@login_name=N'<domain\userid>' -- of user that owns the job and should be able to execute the job
GO

.. next (dont know if this is necessary)

ALTER LOGIN [<domain>\<userid>] -- of user that owns the job
WITH CREDENTIAL = SSISProxyCredentials
GO

then i connect SSMS to server using the above domain\userid and only see the one job that is owned by the user. I execute the job and get the error:

Message
Unable to start execution of step 1 (reason: Error authenticating proxy <domain>\<userid>, system error: The user name or password is incorrect.).  The step failed.

the 'domain\userid' above is the same as the credentials so it appears to be using and finding the credentials correctly.

SSIS on this server runs as NT Service\MsDtsServer120 (thats what it default to on installation)

forgot to add, on the job step 1 (only step) the type is SQL Server Integration Services Package adn the 'Run as" is SSISProxyDemo.

The package being run shows up under integration.. stored Packages.. MSDB

thanks for any info. This has been a killer.




Importing Flat File Question - Dynamic Format

$
0
0

Greetings!

A SSIS package that I'm modifying reads in flat files and imports the data into a MSSQL database.

I have learned that sometimes technicians that use the equipment that is collecting this data will add fields so the resulting files have more or less columns.  It is unpredictable when or how often this will happen.  However, it's a requirement to be able to handle these formatting changes.

Is it possible for our SSIS package to handle changing file formats automatically?  If so, I would appreciate any information for how to prepare this. I'm a bit new to SSIS and have been learning as I get acquainted with this package we have.

Any help would be greatly appreciated.  Thanks!

SSIS FTP task - folder is not showing in the development environment

$
0
0
I need to automate an excelsheet transformation process. for that I need to take the file from a ftp location. I can see all folders and the required folder "xyz" in the ftp location when we browse it within the SSIS 2005 FTP task from my laptop. I also can see all the folders except "xyz" folders when I broswed it within the FTP task in ssis 2005 in the development environment same behaviour in the production.

This is not a User name and Password issue since we can clearly see rest of the folders in production , dev  except the required folder.
This can not be a permission issue since i managed to locate the "xyz" folder within the dev and prod servers using winscp.
The follwoing are the .net versions in my laptop and in the Dev and Prod environments.

VS 2005 Version in my laptop
-Is 8.0.50727.42(Premier Partner ENU)   .net framework is 4.5.1

VS 2005 Version in development server
-Is 8.0.50728 (Premier Partner ENU)   .net framework is 2.0 Service pack 2.0

Could this be a version issue???

thanks

C# Insert line

$
0
0

Hi,

   i am new to C# and i need to insert a line in a flat file using ssis script component. I have to insert "***" after every 3 line. i need some help and i dont know how to start.

Thank

How to move from one SQL Server table to another

$
0
0

Suppose I have two tables:

Employee1:

EmpName varchar(100)

EmpAddress varchar(200)

And

Employee2:

EmpID int,

EmpName varchar(100),

EmpAddress varchar(200)

Note: EmpID is not an identity field

How to move all the data from Employee1 table to Employee2 table with values of EmpID as 1, 2, 3, ....so on.

Can anyone have any idea?


Web Service Task in SSIS 2012

$
0
0

Hello,

I have a web service task that worked fine prior to upgrading from SQL Server 2005, but in 2012 fails with an error saying the "wsdl file is invalid".  I am using the same wsdl file as I was using in 2005.  Connectivity tests for the web service connection manager in 2012 worked fine. Any ideas on why I would be getting a failed wsdl file when it worked ok on the 2005 platform?  Below is the specific error:

[Web Service Task] Error: An error occurred with the following error message: "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: Could not read the Web Services Description Language (WSDL) file. The input WSDL file is not valid. The following error occurred while reading the file. There is an error in XML document (3, 2)..
   at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTaskUtil..ctor(Object connection, String downloadedWSDL)
   at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()".

Thanks for any help or suggestions,

Pat   

SSIS column marker problem for flat file ragged right

$
0
0

In Oct 2008, Ken Powers asked why he couldn't add more column markers on a flat file with ragged right after going to the advanced tab.  Matt David responded that that's by design but could be submitted as bug / enhancement.  So, what are my alternatives using SQL Server 2008 R2 if I've created a flat file connection and later need to go back and add more columns or markers?  Is my only course to recreate the whole thing (crazy) or use the advanced tab and create one at a time?


Dale Krabill 216-252-7300 x6484 American Greetings

Fail to start project

$
0
0

Hi, everyone

When I click start to run the project, there is a error message: 

Failed to start project

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

Method not found: 'Boolean Microsoft.SqlServer.Dts.Design.VisualStudio2012Utils.IsVisualStudio2012ProInstalled()'. (Microsoft.DataTransformationServices.VsIntegration)

I installed vs2012 iso and integrated, my version is 11.0.5058.0.

Any help appreciate.

how to create .ctl (control file) to calide excel rows in ssis ?

$
0
0
In my package i have a requirement to use .ctl control file to valide excel rows. can anyone tell me how to create a .ctl file which will have all of this information. 

August SSIS Guru - Festival of the Awesome SSIS

$
0
0

It's here at last!

The August round of the TechNet Technical Guru Competition!

The quality and quantity of entries has been beyond our wildest expectations lately, with epic posts and useful snippets BURSTING out of the seams of TechNet Wiki.

So please come forth once again, oh mighty techie, and shower us with insight!

Join us in the August Festival of TechNet Guru!

Open up your heart and help us feed so many hungry minds!

For THIS is THE month, when heroes are cut from leather, chiselled from stone, forged in the fire of knowledge. The month when legends are born, and epics are scripted.

All you have to do is add an article to TechNet Wiki from your own specialist field. Something that fits into one of the categories listed on the submissions page. Copy in your own blog posts, a forum solution, a white paper, or just something you had to solve for your own day's work today.

Drop us some nifty knowledge, or superb snippets, and become MICROSOFT TECHNOLOGY GURU OF THE MONTH!

This is an official Microsoft TechNet recognition, where people such as yourselves can truly get noticed!

HOW TO WIN

1) Please copy over your Microsoft technical solutions and revelations toTechNet Wiki.

2) Add a link to it on THIS WIKI COMPETITION PAGE (so we know you've contributed)

3) Every month, we will highlight your contributions, and select a "Guru of the Month" in each technology.

If you win, we will sing your praises in blogs and forums, similar to the weekly contributor awards. Once "on our radar" and making your mark, you will probably be interviewed for your greatness, and maybe eventually even invited into other inner TechNet/MSDN circles!

Winning this award in your favoured technology will help us learn the active members in each community.

Feel free to ask any questions below.

More about TechNet Guru Awards

Thanks in advance!
Pete Laker


#PEJL

Got any nice code? If you invest time in coding an elegant, novel or impressive answer on MSDN forums, why not copy it over to the one and onlyTechNet Wiki, for future generations to benefit from! You'll never get archived again!

If you are a member of any user groups, please make sure you list them in the Microsoft User Groups Portal. Microsoft are trying to help promote your groups, and collating them here is the first step.

Viewing all 24688 articles
Browse latest View live


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