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

SSIS Package Protection Level -EncryptSensitiveWithPassword

$
0
0

Hi There: I have a SSIS package(VS.Net) that has different ADO.NET connection . These connect to SQL Server Data base from my package. Now by default the Package Protection level is set to EncryptSensitiveWithUserKey. Previously, I was only using Windows Authentication in my Package to connect to SQL Server DB. So when other users were using this package  they never had any issue to run the package. I also created a .Net Form Application. The users just Run/Click this application and this application then run  the package from a shared folder. We never had any issue. Next I had to add a new connection with SQL Server Authentication. This time the users were not able to run the package. They run the Click application and get the error. The error was"Don't have proper permission to access to MY_DB_TABLE".  Here "MY_DB_TABLE" is the table that I was connecting to from my package using SQL Server Authentication.

Solution: I changed the Package Protection level to EncryptSensitiveWithPassword. Then I entetred a Password(Say 3456) for the package and Build the package again. I added this Package level password to my Command line parameters in my .Net Click application. I built the Click application and run it. Everything looks fine. The users are also able to run it without worrying about the password. The Package password(Note: it is not the data base connection password), is visible in the Command line. Bu the users will only run this built application and will not see the code(If not necesary).

The Command Line application command:

String spath = "/FILE \\\\MyPackageServer100\\Projects\\Test\\DataTransfer.dtsx  /CHECKPOINTING OFF /DECRYPT 3456";                             

System.Diagnostics.

Process p =new System.Diagnostics.Process();

p.StartInfo.FileName =

@"C:\Program Files\Microsoft SQL Server\100\DTS\Binn\DTExec.exe";

p.StartInfo.Arguments = spath;

p.StartInfo.UseShellExecute =

false;

p.StartInfo.CreateNoWindow =

true;

p.StartInfo.RedirectStandardOutput =

true;

p.Start();

StreamReader reader = p.StandardOutput;

string sr = reader.ReadToEnd();

StreamWriter sw =File.CreateText(@"\\MyPackageServer100\\Projects\\Test\Output.txt");

sw.WriteLine(sr);

sw.Close();

reader.Close();

p.WaitForExit();    -----Thats it. Please comment if it helps you. Thanks.


Note: If you run the package from .Net or by clicking the .dtsx file(The executable file for the Package), it will ask you for the Password in a pop-up screen. Like I mentioned, my users will only run the Package via the Click application. So they never hava to enter the password.

ssis 2008r2: Ole db destination - fast load - Keep Nulls setting ignored

$
0
0

SQL db server is 2008R2

I have a table that has defaults on all the NOT NULL columns

I can't insert data into this table using SSIS because I get

[OLE DB Destination [47]] Error: There was an error with input column "description" (68) on input "OLE DB Destination Input" (60). The column status returned was: "The value violated the integrity constraints for the column.".

I have KEEP NULLS turned OFF

What gives? If my source column is NULL then the default should be used.

how to replicate:

create target table

Create table dbo.tst (Value int not null, description varchar(20) not null default(''))

create data flow
add ole db src as sql command "SELECT 1 and value, cast(null as varchar(20)) as description
add ole db dest. point it at the dbo.tst table
make sure KEEP NULLS is unchecked

If i change the description column to allow nulls then the default will fire, but i dont want to let nulls in at all

I tried adding the KEEPDEFAULTS keyword to the oledb dest fast row options section but I reckon the KEEP NULLS does the same thing under the hood


Adelaide, Australia

SQL Connection failing - SQL Authentication

$
0
0

Hi all,

I have a connection manager with provider - Native OLEDB\SQL Server Native Client 11.0.

The following properties on my connection manager are evaluated as expressions:

IntitialCatalog
Password
ServerName
UserName

I have used parameters to populate these values.

When I deploy and execute from the SSIS catalog with new parameters - the connection fails.

When I view the execution report, the reported connection string does not include the password. Is this a security feature? Or is my password not being used?

Thanks.

Should I use SSIS for my problem?

$
0
0

Hi,

I have to create a tool to load data from input file into SQL server. Input file is dynamic and data type of the column is unknown. Dynamic input file means, number of column,column data type, length of the column might chnange. Also, I do not have a static target table. I need to create table if the input file header does not match with existing table column name.

Could you please suggest if I should use SSIS to achieve this? Do you have any better solution?

Thank you


SSIS Package Configuration

$
0
0

Hello,

As per following article, "You cannot use the /Set or the/Connection option to override single values that are also set by a configuration". Can you elaborate on this with example?


msdn.microsoft.com/en-us/library/ms141682.aspx

My other question is if we want to schedule an SSIS package, can I schedule the package without running the BUILD command and preparing a DeploymentManifest. If not why?

Thanks

Insert data into a XML Template

$
0
0

Hi Friends.. I was assigned a task where I was given a XML template and I will  have to insert data from a table into the corresponding tag. I have not worked on either creating a XML file or inserting data into one. Can anyone please help me on this task. Help will be greatly appreciated. Please let me know what more information is needed for me to be more clear.

Thanks in Advance!!

Gopu


Gopal


Problem with SQL 2008R2 and SQL 2012

$
0
0

Hello,

We have writting C# programma in framework 3.5(2008R2) and converted it to 4.0(2012).

Now we have a problem using the Analysis and Intergation references.

We build a SSIS package from code but it doesn't work on the SQL 2012 server.

Can somebody help us with possible differnces between the references and mostly concerning Microsoft.SqlServer.DTSPipelineWrap/Microsoft.SqlServer.DTSRuntimeWrap?

*Edite*

We found problem lokation in this piece of the code:

 
        IDTSComponentMetaData100 componentSource = dataFlowTask.ComponentMetaDataCollection.New();
        componentSource.Name = "FlatFileSource";
        componentSource.ComponentClassID = "DTSAdapter.FlatFileSource.2";
        componentSource.LocaleID = 1033;


        // Get source design-time instance, and initialise component
        CManagedComponentWrapper instanceSource = componentSource.Instantiate();
        instanceSource.ProvideComponentProperties();

Thx

Matthias


Slowly Changing Dimension error code 0xC020803C

$
0
0

Hello

Can anyone shed some light on this problem: the sameSSIS package is run on 3 different servers (all SQL Server 2008 R2) and on one of the servers, we get the error below for the same data. The server that is failing is our DEV server; the other two are UAT and PROD (both ok).  

Any ideas on what to try? If change the value ofFailOnFixedAttributeChange then DEV works but the package is no longer the same as what's on UAT and PROD.

Slowly Changing Dimension [1190]: If the FailOnFixedAttributeChange property is set to TRUE, the transformation will fail when a fixed attribute change is detected. To send rows to the Fixed Attribute output, set the FailOnFixedAttributeChange property to FALSE


Amir




Problem with row containing Line Feeds

$
0
0

Hi all

I have a simple SSIS package which extracts data from a number of tables using an SP and then outputs the results into a .txt file.  My problem is that in one row of about 20000, one column contains line feeds (LFs) in it's contents.  If I take a look at the preview of the data, it displays correctly.  However upon running the package, the export file contains line feed returns - thereby screwing the layout of the text file and column output in the destination system.

How can I get rid of these line feeds please?  I have tried using CR only delimiters but to no success.

Many thanks in advance.

Cannot Show Visual Studio Tools For Application Editor

$
0
0
Hi All,
I was wondering if someone would be kind enough to assist me with the following issue?
Using Visual Studio 2008 and editing an SSIS project. 
Using a data flow task, create a script component, when I attempt to edit the script I get the following error

Cannot show Visual Studio Tools for Applications Editor
Additional Information:
The System Cannot Find The File Specified (Exception from HRESULT: 0x80070002) (EnvDTE80)

I've gone through the following article
http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=367845

with no success and I also reinstalled SQL Server 2008 and VS 2008 still with no success
Running on Windows XP SP 2
SQL Server 2008 SP 1
VS 2008 SP 1

Any ideas would be greatly appreciated

Regards
John

Output parameters in OLEDB Command component - SSIS 2008

$
0
0

I have a package that I developed in SSIS 2005 and recently ported to 2008. Everything runs great except an OLE DB Command component that calls a stored procedure that uses output parameters.

When I try to run this, I get this error:

Error: 0xC0202009 at Data Flow Task, OLE DB Command [100]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80004005 Description: "Syntax error, permission violation, or other nonspecific error".
Error: 0xC004701A at Data Flow Task, SSIS.Pipeline: component "OLE DB Command" (100) failed the pre-execute phase and returned error code 0xC0202009.

When I do the same thing in SSIS2005, it works fine.

So I setup a new package with 1 data flow. In that data flow, I added a source component, an OLE DB Command, and a destination.  I then tested this with a stored procedure that took no parameters. It worked fine.

I then tested it with a stored procedure with 1 parameter defined as OUTPUT. This generated the error.

 

Is there an issue with output parameters in an OLE DB Command in SSIS 2008?

 

Thanks!


http://bobp1339.blogspot.com

Debugging and data flow row counts incorrect

$
0
0

I've recently upgraded several packages to SSIS 2012, and I'm finding that the row counts shown in the data flow while debugging are entirely nonsensical. My data flow goes something like this at the moment:

OLE DB Source - 138,292 rows

RowCount - 325,974 rows

Lookup - 730,972 rows

Derived Column - 9,878 rows

Lookup - 29,634 rows

RowCount - 148,170 rows

OLEDB Destination

This is very different from what I saw in 2008 R2. The first row count and lookup should most certainly not exceed the number of rows that have been read from the source at any given time. Are these counts being displayed counting something different in 2012 than what they counted in 2008 R2?

I can also see when it goes into post execution that in both the output windows/progress the number of rows that have been actually been written to the OLEDB Destination is an entirely different number than what is shown flowing through the data flow pipeline while debugging (251,1095).

Another oddity - the data flow tasks never turn green, even after the control flow shows that the data flow task has completed successfully.

Error Creating Integration Services Catalog

$
0
0

For a SQL Server 11.0.2218 database, I am attempting to create a catalog under the Integration Folders Catalog folder. The folder is empty, this will be the first catalog. In the Create Catalog Dialogue, I type and retype the password into the appropriate text boxes, and click OK. An Execution Error states: 'Invalid length parameter passed to the LEFT or SUBSTRING function. (Microsoft SQL Server, Error: 537)'.  I have tried passwords of various lengths with the same results. 

I am using MS SQL Server Management Studio:

Microsoft SQL Server Management Studio11.0.2100.60
Microsoft Analysis Services Client Tools11.0.2218.0
Microsoft Data Access Components (MDAC)6.1.7601.17514
Microsoft MSXML3.0 4.0 5.0 6.0 
Microsoft Internet Explorer9.0.8112.16421
Microsoft .NET Framework4.0.30319.296
Operating System6.1.7601

Thanks for any help with this.

Error with lineageid when running SSIS 2012 package through the SQL Server Agent but not through Visual Studio

$
0
0

I face a problem running a SSIS 2012 package with a custom control through the SQL Server Agent.  It comes up with a lineage id problem.  See error from SQL Agent History...

Microsoft (R) SQL Server Execute Package Utility  Version 11.0.2100.60 for 64-bit  Copyright (C) Microsoft Corporation. All rights reserved.    Started:  1:13:00 PM  Error: 2013-02-05 13:13:27.27     Code: 0xC0047062     Source: QCR TableDifference [380]     Description: System.ArgumentException: Value does not fall within the expected range.     at Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSBufferManager100.FindColumnByLineageID(Int32 hBufferType, Int32 nLineageID)     at SqlBi.SSIS.Components.TableDifference.OutputInformation..ctor(TableDifference container, OutputType type, OutputFlow output)     at SqlBi.SSIS.Components.TableDifference.PreExecute()     at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPreExecute(IDTSManagedComponentWrapper100 wrapper)  End Error  Error: 2013-02-05 13:13:27.27     Code: 0xC004701A     Source: QCR SSIS.Pipeline     Description: TableDifference failed the pre-execute phase and returned error code 0x80070057.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  1:13:00 PM  Finished: 1:13:29 PM  Elapsed:  28.72 seconds.  The package execution failed.  The step failed.

I don't receive this error when I run the package in Visual Studio, so I am not sure what I am doing wrong.  Does anyone have any ideas?

Thanks,

Steve

ssis error when downloading excel files from sharepoint using ssis 2010

$
0
0
 

Hi,

I created an ssis package to download excel files from sharepoint to a dir, but I am very new with sharepoint connections and website authentication issues, so I ran into the error message below.

Can anyone help me to identify the source of the problem here? Here is the code I use in my script task. Any help would be greatly appreciated.

Thank you!

Script Task Code:

 

PublicSub Main()

'

' Add your code here

'

' Get the unmanaged connection object, from the connection manager called "HTTP Connection Manager"

Dim nativeObjectAsObject = Dts.Connections("HTTP_ConnectionManager").AcquireConnection(Nothing)

' Create a new HTTP client connection

Dim passedFileNameAsString = Me.Dts.Variables.Item(0).Value.ToString

passedFileName = Replace(passedFileName,

":","_") & ".xlsx"

Dim connectionAsNew HttpClientConnection(nativeObject)

connection.ServerURL =

"https://www.mywebsite.com/wo/Part1%20Reporting%20Task%20Item%20File%20Upload/"& passedFileName& "?noredirect=true"

'Dim file As String = Me.Dts.Variables.Item

' Download the file #1

' Save the file from the connection manager to the local path specified

'https://www.mywebsite.com/wo/Part1%20Reporting%20Task%20Item%20File%20Upload/Forms/AllItems""

Dim pathAsString = connection.ServerURL.ToString

Dim filenameAsString = Right(path, Len(path) - InStrRev(path,"/"))

filename = Left(filename, InStr(filename,"?") - 1)

filename = Replace(filename,"%20", " ")

filename = passedFileName

Dim directoryAsString = "C:\SSIS\Test\"

Dim pathandfileAsString = directory & filename connection.DownloadFile(pathandfile,True)

' Confirm file is there

IfFile.Exists(pathandfile) Then

' MessageBox.Show(String.Format("File {0} has been downloaded.", pathandfile))

EndIf

' Download the file #2

' Read the text file straight into memory

Dim bufferAsByte() = connection.DownloadData()

Dim dataAsString = Encoding.ASCII.GetString(buffer)

' Display the file contents' MessageBox.Show(data)

Dts.TaskResult =

ScriptResults.Success

EndSub

End Close

 

This is the error message:

 

at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)


at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()

Error: 0xC001600E at WorkOrderPayItems, Connection manager "HTTP_ConnectionManager":
Server returned status code - 404 : NOT FOUND. This error occurs when the server is experiencing problems.
Error: 0x1 at Script Task 1: Exception has been thrown by the target of an invocation.
Task failed: Script Task 1


creating 50 folders within a root folder on a nas drive

$
0
0

Hi All

how do i accomplish a task to create 50 folders on a nas drive using SSIS.The names of each folder are unique and are in a spreadsheet in 50 rows

how do i proceed?


Vamsi

SSIS Problems with 7zip when run using SQL Agent Job

$
0
0

Hi,

I have a peculiar problem involving 7zip and SSIS.  The SSIS package loops through several files and adds them to a zip file using 7zip (through the Execute Process Task).  If I run the package manually in BIDS, it works fine.  If it runs through a SQL Agent Job, it successfully creates the zip file, adds the first file, but then fails on any subsequent files.

This seems different than all other posts that I have found regarding permission issues, since it does run the 7zip executable correctly and adds the first file.  Why would it have a problem adding a 2nd file, only when it is run through the SQL Agent job?  

One more thing to note: I compared the commands that are being sent to the "Execute Process Task" when I run manually vs. when it runs as a SQL agent job, and they are the exact same.

Thanks for your help!


How to pass system variables to event hander ?

$
0
0

hi there:

  On Event handers in SSIS , I've creaed a Execute SQL task to send out email alert when the event is OnError.

In the alert, I'd like to pass the package name  ( System::PackageName) to the msdb..sp_send_dbmail    .

On Execute SQL task, I've added a varaible System::PackageName as Input Direction and datatype is NVARCHAR, parameter name is 0.

Now, how to pass it to the SQLStatement?

Thanks

Hui


--Currently using Reporting Service 2000; Visual Studio .NET 2003; Visual Source Safe SSIS 2008 SSAS 2008, SVN --

How does one code a Data Transormation Services project in Visual Studio?

SSIS DATAMIGRATION ON DIFFERENT SERVERS

$
0
0

Hi All,

Am new to SSIS...i created ADO NET Source, it takes value from one table on SERVER A.Then i have derived column control to add one extra column, finally i haveADO NET Destination it insert values on Server B. Till now every thing works fine but according to my requirement i want to change my source(ADO NET Source) table name dynamically, and also destination table name dynamically,derived column expression also dynamically. Can any guide me on this.


Thanks SABARINATHAN87

Viewing all 24688 articles
Browse latest View live


Latest Images

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