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

Test for the existence of a SharePoint list

$
0
0

I have a scenario where data is to be read from a SharePoint list but the name of the list is unknown. The name will always follow the format:

        List_XX_YY

with XX being a two-digit year and YY being the two-digit representation of the following year. However I won't know whether the current year is represented by the XX or the YY at design time.

For example, this year's list could be:

        List_15_16

or

        List_16_17

I know I can parameterise the name of the Collection to be used in an OData source but I either need a way to try one list and use the other if it isn't there or to get a list of all the lists from which I can select the appropriate one to use.

Has anyone had a similar situation and, if so, did they find a solution?

Thanks.


Error Redirect to SQL Server Table with Error Rows and Error Description

$
0
0

Hello Everyone

Can you please help me how can i redirect Error rows along with Error Description to a SQL Server Table. I have multiple source tables and i need to maintain a Single ErrorLog table.

My source is OLEDB and my Target is Oledb. 

Please note that the Source tables has different columns. 

I am planning to store the values as below , I need to Insert the Error Row in to one single Column as ErrorRow in the below table Description with datatype as XML.

CREATE TABLE [dbo].[ErrorLog](
[ErrorID] [int] IDENTITY(1,1) NOT NULL,
[ErrorRow] [xml] NULL,
[ErrorMessage] [varchar](1000) NULL,
[PackageName] [varchar](50) NULL,
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO


ssis package when run from sql agent shows issue

$
0
0

Issue : . Microsoft (R) SQL Server Execute Package Utility  Version 10.50.6000.34 for 64-bit  Copyright (C) Microsoft Corporation 2010. All rights reserved.    Started:  1:57:02 PM  Error: 2016-04-06 13:57:13.90     Code: 0xC0012024     Source: Delete the log files older than 7 days      Description: The task "Delete the log files older than 7 days" cannot run on installed  (64-bit) of Integration Services. It requires Standard Edition (64-bit) or higher.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  1:57:02 PM  Finished: 1:57:13 PM  Elapsed:  11 seconds.  The package execution failed.  The step failed.

 Environment - SQL sERVER  2008 R2.
 SSIS Package - package containsData flow task - gets the data from sql server database and stores in flat file.

Script task - Delete the log files older than 7 days -used to delete the log files that are older than 7 days
File system task - to create a folder
When I am running the package from Business development studio, the package runs fine without any issue but when I am running the package from sql agent as job it fails and shows me the error message.Could you please guide me?

SSIS 2014 - Slow when Master package Calls Many sub-packages

$
0
0

Hi,

I am using SQL Server 2014 / Visual Studio 2013 to develop SSIS packages, and I am using the project deployment model. I have a master package that acts as a control for each step in my ETL.  I followed the design pattern outlined here: http://sqlblog.com/blogs/jorg_klein/archive/2010/01/04/ssis-package-design-pattern-for-loading-a-data-warehouse.aspx.

This approach has great flexibility and overall we are very happy with it.  However, I now have 50+ sub-packages that are called from the parent package and things have become quite slow.  The bottleneck is with logging in SSISDB.  I have it set to "BASIC", but the process is constantly waiting on "SSIS ISServerExec".

The slowness disappears if I set the logging level to "NONE", but that isn't a realistic solution.  It would be ideal if I could set a custom logging level to only log errors and warnings, but unfortunately custom logging isn't available until SQL Server 2016.  Are there any other ideas on how to resolve this?

Thanks,
Chris

issue with send mail task or file system task?

$
0
0

Hello,

I am having issue with ssis send mail task. I am using an SSIS package with for each loop and data flow task and send email if dataflow task failes to process the csv file and send it as an attachment and then delete the file with file system task.  If the processing is done successfully then just delete the file. I am using visual studio 2008 and sql server 2008 R2. So the issue occurs when the dataflow task fails and that is I am getting my email with the attachment but the file system task doesnt delete the file which means the send mail task is not releasing the lock on the file.

Is there a way this can be handled with out code?

Thanks

Dynamic export to text files

$
0
0


I have a large table named Lines of the format:
Line VARCHAR(500)
File_ID VARCHAR(10)

And a table FileIDs of the format
FileID VARCHAR(10)

I want to export a text file for each value of FileID to C:\SPLIT\Lines_XXXXXXXXXX.txt
where XXXXXXXXXX is a file_ID. (e.g.. SELECT Line from Lines where FileID = ‘XXXXXXXXXX’)

I know that I can load a recordset destination with a list of FileIDs and cycle through
them with a Foreach Loop Container.  I’m having difficulty configuring the dynamic Data
Flow task for the export of the flat files.

Anyone have a good example for a dynamic export of text files such as this?

Thanks,
Jnana


Jnana Sivananda

Check for existence of file name in column in table in control flow

$
0
0

Hi,

We are maintaining a log of files imported in SQL Server database table. Columns are

1) ID 2) FileName 3)FileCreationDateTime 4)ImportedDateTime

I got a new requirement from management to import new csv files from another directory into same database but different table. I am planning to use same log file table when I import data.

My requirement is,

  • Get latest file name from directory. I am doing this using script task and storing it in variable. Done in Control flow
  • Using that latest file name, need to check in log table whether the file is already imported or not. - I need to do it control flow because based on result,

       if it exists in log table, I need to quit the process Else continue with the process

I see that I can use Look Up task in Dataflow, but I don't want to use data flow until above decision is made. Other alternate is to use Execute SQL Task and output parameter and assign output parameter value to variable and use that variable in constraints and do the flow of process.

Please let me what are the best options to achieve this.

Thanks,

Spunny

Referencing shell32.dll in a script task

$
0
0

I have a package with a script task that needs to use shell32.dll. So in the task I added a reference to the dll. It builds fine. However when I try to run the package (or just the task) I get this error:

Error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Interop.Shell32, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'Interop.Shell32, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
   at ST_f6fc9387cbce4d7780ba4248547a4e6e.csproj.ScriptMain.Main()

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle 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 System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture)
   at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()

What should I do?


Time stamp data issue using SSIS

$
0
0

I'm trying to pull the data into the .csv file but the data looks weird. I tried to be fix but not helped much.

 This  is what is supposed to looks like the data.

Warehouse Cutoff time         Added to Scheduler           Order Marked Ready

2016-04-08 14:00:00        2016-04-08 09:30:51        2016-04-08 08:14:20.167

This is how is looks after exported to .csv file

Warehouse Cutoff time         Added to Scheduler            Order Marked Ready

00:00.0                     4/7/2016 9:49         48:43.4

Is there anyway to fix it?


Issue with Dynamic excel files

$
0
0

Hi All,

In the past i have created an SSIS package which looks for the .csv files and loads the data is they exist at a particular location. For this package i used Script Task, Foreach loop container and File system task. In the connection manager properties for the source file, under the expressions i have the following expression (@[User::SourceFileLocation] + "\\" + @[User::CurrentFile]) and that is how i was loading the files.

The problem now is, when i approach the EXCEL files in the same way its not working. Does EXCEL file need some different approach? Please advice.

Thanks

A connection cannot be made. Ensure that the server is running error when process SSAs cube from SQL server Agent using SSIS Analysis services processing task

$
0
0


I am processing a cube from SQL server Agent using SSIS analysis services processing task  but I get below error:

connection can not be made. ensure server is running.

Any suggestion please



Trying to store SQL Azure connection string in SSIS SQL server configurations.

$
0
0

Hi All,

I am trying to configure the Connection string of SQL Azure database through SQL sever configurations or XML configurations. But for some reason it is not reading the azure sql connection. Here is the error message. Can anyone help me out in this?

[Execute SQL Task] Error: Failed to acquire connection "Data Conversion Azure Dev". Connection may not be configured correctly or you may not have the right permissions on this connection.

Is it because it is a SQL Aure connection, it is not reading the connection?? All other variables are being read fine from the SQL Server configurations..



Need to use SSIS object variable more than once(using Visual Studio 2013 and SQL Server 2014)

$
0
0
I have a requirement in which I need to use an SSIS object variable more than once.
But the object variable becomes empty after the first use. I can't be accessed later.
Any ideas how can I do this?

Thanks in advance.

The number in the cell is formatted as Text or preceded by an apostrophe

$
0
0

I am having a excel destination to output some calculation. The whole job completes successfully but the format seems to be incorrect. The number fields are displayed as text with a leading apostrophe. As a result, i am not able to calculate the sum based on dragging of the cells on excel.

Is there any solution for this? 

Sample of the file now:

Any help will be greatly appreciated. Thank you!

SQL agent job fails to run the package - Oracle connection manager

$
0
0

I am trying to connect to Oracle using SSIS package (SQL Server 2008 R2) and loads data to my SQL Server table.

  1. Runs in a 64bit 2008 R2 machine
  2. Did Setup the TNS:Listner for Oracle client. I have both 32bit and 64bit Oracle client installed.
  3. Set environment variable path (TNS_ADMIN) pointing the TNSNAMES.ora directory of 64bit oracle client
  4. Created a registry entry "TNS_ADMIN" in HKEY_LOCAL_MACHINE-->SOFTWARE-->ORACLE

Everything works well when running in BIDS. I used Attunity connector and Native Oracle Provider for OLEDB. Both works in BIDS.

As soon as I schedule it in an SQL agent job and runs the same package, I get following error:

Message Executed as user: AMERICAS\ssisdata. Microsoft (R) SQL Server Execute Package Utility Version 10.50.1600.1 for 32-bit Copyright (C) Microsoft Corporation 2010. All rights reserved. Started: 3:17:23 PM Error: 2016-04-08 15:17:32.76 Code: 0xC0202009 Source: ORA OLEDB TEST Connection manager "OLEDB ORA CONN MGR" Description: 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-12541: TNS:no listener". End Error Error: 2016-04-08 15:17:32.76 Code: 0xC020801C Source: Data Flow Task OLE DB Source [209] Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "OLEDB ORA CONN MGR" failed with error code 0xC0202009.

I have tried in different machines. But same is the case. Breaking my head on this since 2 days. Any help would be appreciated.


Hi how to use Audit Transform and advantage of Audit Transform in SSIS 2008

$
0
0

Hi all,

I am working with SSIS 2008 i want know how to use  Audit Transform and advantage of Audit Transform in SSIS 2008

please provide me an example or link.

please help thanks in advance

Regards

Sunil Yoganna

 

SSIS Script Task not working

$
0
0

Hi,

I created one simple SSIS package with script task. I am running this package using windows Task scheduler. It is working fine in Local system, but it is not working in server (Windows Server 2012 R2).

Note  : If I create sample package with out script task it is working fine in both local and server.

Do I need to do any settings to run script task in server or in package ?

Thanks,

Ram

DTSX Package is not executing successfully in other servers when we configure it in SQL Agent Job

$
0
0

Hi All,

I am working with SSIS Package - Analysis Services processing Task.

Here I have configured Analysis Services Processing task to run the AS database(Here AS DB Name - PhoenixPolice) in my machine.

It was executed successfully. I have copied that DTSX package and configured in SQL Agent job. that is also executed successfully.

what issue I am facing is,

I have copied the same DTSX package in other server/machine and configured SQL job in that server/machine to run the AS database (HereAS DB Name - TosaPolice). job is getting fail by throwing error like "database does not exists in this server".

Please suggest me that weather I need to change any SSIS package properties or any other changes/options I need to do?

Thanks,

Supraja.


SUPRAJA'S

Project Name edit - Script Component

$
0
0

I am trying to find a way to edit the project name in script component, but not sure how to .I have 4 data flow tasks running parallel which has script component as source and oledb destination. Rather than creating 4 new data flow tasks with these components, I just copied and change the variable names in each script component.

While running the package only one data flow task is running rest failed with  below error.

[Script Component [2]] Error: System.Runtime.InteropServices.COMException (0xC0010009): Exception from HRESULT: 0xC0010009
   at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.HandleUserException(Exception e)
   at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.PostExecute()
   at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPostExecute(IDTSManagedComponentWrapper100 wrapper)

when checking the project name inside the script component, the names are same in every script component.

I am using SQL Server Data tools for visual studio 2013


Sarvan

issue with eventviewer xml and ssis import

$
0
0

hello,

Since several weeks, I 'm tried to solve this issue :

I export the security eventviewer with this command line :

wevtutil qe Security /c:20 > c:\evtdump.xml

I create xml task source on SSIS and try to generate XSD.

Until here, I have only warning because of the number of caracter on some data imported.

My really issue is SSIS find only 1 record on my file whereas I have 20.

If I open my file on IE I see only 1

If I open my file with an editor , I can see 20 lines.

If I use this command line to export eventviewer log :

wevtutil qe Security /c:20 /e:root > c:\evtdump.xml

I can see my 20 lines on IE but I can't generate XSD with SSIS because of several namespaces.

What I have to do to solve this problem ?

Thanks


Viewing all 24688 articles
Browse latest View live


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