As a developer I want to have a template for SSIS that has event handlers using parameters not expression builder
Acceptance Criteria:
- Event handlers are dynamic using parameters
Please ideas and assist.
Thanks
As a developer I want to have a template for SSIS that has event handlers using parameters not expression builder
Acceptance Criteria:
- Event handlers are dynamic using parameters
Please ideas and assist.
Thanks
I have a simple package which loads data from one table to other using oledb.
I am dynamically constructing the connecting string using script task, package variables ( servername databasename, CM_ConnString) and xml pkg config file.
everything looks good, but when I run I am getting below error.
script task content: is
Dts.Variables["User::CM_ConnString"].Value = "Data Source=" + Dts.Variables["User::ServerName"].Value.ToString() + ";Initial Catalog=" + Dts.Variables["User::DatabaseName"].Value.ToString()+";Provider=SQLNCLI10.1;Integrated Security=SSPI;Auto Translate=False";
xml file content is as below
...
</DTSConfigurationHeading>-<Configuration ValueType="String" Path="\Package.Variables[User::CM_ConnString].Properties[Value]" ConfiguredType="Property"><ConfiguredValue>Data Source=localhost;Initial Catalog=TesT;Provider=SQLNCLI10.1;Integrated Security=SSPI;Application Name=SSIS-Package-{4F3FC20B-334F-4DEB-92A7-14AEB3A2178C}</ConfiguredValue></Configuration>-<Configuration ValueType="String" Path="\Package.Variables[User::DatabaseName].Properties[Value]" ConfiguredType="Property"><ConfiguredValue>TesT</ConfiguredValue>
...
[Connection manager "ConnManager_TesT"] Error: 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: "Login timeout expired".
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80004005 Description: "A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server
is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.".
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80004005 Description: "Named Pipes Provider: Could not open a connection to SQL Server [53]. ".
Neil
SQLServer 2014 - Running AMR tool on SQLServer 2008 - getting SSIS errors on Collection
Hi,
We are exploring the migration of a SQLServer 2008 instance to SQLServer 2014. As part of this we want to run the AMR tool. I set up the warehouse and collection sets on our 2008 SQLServer per several articles including the below. The collection step is consistently failing with what appears to be an error in the SSIS package generated to do the work.
To get more information I increased the logging level of the data collector. Below I have put the information from the Log Viewer for the failing step.
I have been searching but have been unable to find anything on the topic. I did find a posting (http://support.microsoft.com/kb/2923838) which referenced an AMR related OLE DB error in SQLServer 2012. But I couldn't find anything specifically suggesting a corrective update for 2008.
I have also found the AMR works correctly on a 2014 SQLServer instance. With the increased logging level I used the Log Viewer to compare the details of Collection steps on 2008 and 2014. They initially execute the same steps but then diverge. I don't know if this is simply due to running them on 2014 vs 2008 or if it suggests something is 'older' on 2008 and that is a problem.
Any help or experience anybody can share would be greatly appreciated,
Mike O
-----
Article on Setup
http://blogs.technet.com/b/dataplatforminsider/archive/2013/09/17/new-amr-tool-simplifying-the-migration-to-in-memory-oltp.aspx
Increased Logging Level
UPDATE msdb.dbo.syscollector_collection_sets
SET logging_level = 2
WHERE collection_set_id IN (11,12);
Log Viewer Information
Date10/20/2014 11:11:57 AMSQLServer 2008 Version
(Microsoft SQL Server 2008 (SP3) - 10.0.5835.0 (X64) Mar 1 2013 22:17:38 Copyright (c) 1988-2008 Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 5.2 <X64> (Build 3790: Service Pack 2)
SSMS 2014 Version - used to set-up collection on 2008 and 2014
Microsoft SQL Server Management Studio12.0.2000.8
Microsoft Analysis Services Client Tools12.0.2000.8
Microsoft Data Access Components (MDAC)6.1.7601.17514
Microsoft MSXML3.0 4.0 6.0
Microsoft Internet Explorer8.0.7601.17514
Microsoft .NET Framework4.0.30319.18444
Operating System6.1.7601
I successfully registered det.dll with "regsvr32 dts.dll" at the cmd prompt at C:\Program Files\Microsoft SQL Server\110\DTS\Binn according to recommendations from my research to fix an issue with SSDT 2012 (Microsoft Visual Studio 2010 Version 10.0.40219.1 SP1)
I spite of this fix I still receive the following error when I open an SSIS Project on my newly installed Windows 7 development machine:
TITLE: Microsoft Visual Studio
------------------------------
Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSObject100'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{203E24BD-5203-4C76-AFC7-7C8545EBA1A0}'
failed due to the following error: The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)).
------------------------------
BUTTONS: OK
------------------------------
This error message locks up SSDT and it can only be shut down by killing the process in Task Manager. It is completely unresponsive otherwise.
Here is the order in which I have installed development tools on this machine;
1.) SSDT (SQL Server 2012 with SP2) (which installs Visual Studion 2010 shell described above)
2.) SharePointListAdapterSetup_x64.msi <required for SharePoint List ETL
3.) Visual Studio Professional 2012 <Installed because it was the only way I could get a scriptong component to work on a similar machine. VS is updated to update 4 as described below.
With some research I found and followed the recommendations to perform the following two tasks. After each the behavior described above is the same
4.) Registered "regsvr32 dts.dll"
5.) Installed Viusal Studio Update 4
Please, what remedy will fix this?
--Douglas Buchanan
More...
Facts surrounding the newly installed Windows 7 computer
* Windows 7 Enterprise SP1
* 64-bit
* 8 GB RAM
* 2.6 GHz processor
Details of SharePointListAdapterSetup_x64.msi installation
* The adpater has been
Details of SSDT installation (SQL Server 2012 with SP2)
* Engine
* SSDT
* Client Tools Connectivity
* Integration Services
* Client Tools Backwards Compatibility
* Client Tools SDK
* Management Tools - Basic & Complete
Details of Visual Studio installation
* Microsoft Foundation Classes for C++
* Microsoft Office Developer Tools
* Microsoft SharePoint Developer Tools
* Microsoft SQL Sercer Data Tools
Facts surrounding the other computer where the prject works.
* Project opens and works on SQL Server server where SSDT is installed. Should not work on the server.
I am using Visual Studio 2012 Ultimate and SQL Server 2012 Enterprise.
Whilst using windows service to execute an SSIS package I receive the following error:
"The Execute method on the task returned error code 0x80131621 (Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.). The Execute method must succeed, and indicate the result using an \"out\" parameter.\r\n"
Here is my App.config file
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>
Firstly, why does this happen?
I have seen various workarounds but this just occurred today and I did not make any changes.
Hi, All
Thanks a lot for your kind attention.
a problem troubled me few days when i tried to bulk import data from excel to database by SSIS.
My office version: 2013 plus,
SSIS version: 2012
OS version: win7 64bit
Everything is good if i import one file to DB, but a problem comes out when i tried to use ' for each loop contrainer' to do bulk import:
SSIS Error Code DTS_E_OLEDBERROR, An OLEDB error has occurred.Error code:0x80004005.
An OLE DB record is available. source:"Microsoft access Database Engine" Hresult:0x80004005 Description:"Invalid argument".
......
my steps:
(1) create a new variable: user:filePath in foreach loop container
(2) use variable for excel file path in excel connection manager
Does anyone have anysolution for this? Thanks a lot! :)
I have tried the following methods for importing .csv files to SQL Server:
SSIS - flat file source to destination
Bulk Insert (SSIS)
Bulk Insert (TSQL) using xp_dirtree and format file (bcp)
Although with these methods, most records are imported, records are always missing!
Some records of my csv files contain quotations "" which I have read causes problemS with Bulk Insert.
I have run out of ideas although I have read also that I could read all data into a single column and then process using a script or stored proc.
Can anyone confirm this or recommend an alternative?
Help appreciated.
I have a Visual Studio 2010 solution (TxMExtractLoad) with two SSIS projects: TxMExtractLoad.Discovery and TxMExtractLoad.Contract1. The project name (in project properties) is set to the proper two-part name in each project. However, when I do a "Build", the generated .ispac file loses the second part of the project name: both projects build to "TxMExtractLoad.ispac" (in different directories, fortunately).
I can see where I can change the output *path* for the build, but not the output *filename*.
Any help, anyone?
Thanks in advance...
Hi,
I need to extract data from SQL Server (varchar(255) in codepage 1252) to Sybase ASE 12.5.1 (varchar(255) in codepage 850).
I tried converting the data directly from the OLE DB Source to codepage 850. E.g:
However, I was not able to set the OLE DB Source Error Output to codepage 850.
Then I tried the Data Conversion task, but I get the following message:
Do you have any suggestion?
Thanks in advance,
Tiago.
I need to insert some date retrieved from an OLE DB source (sql server) and insert to a table in an ado.net destination (teradata). The destination table name is dynamically generated and passed to the the package. I have problem passing this table name to the ado.net destination.
In the package I create the table in the destination db using the table name passed to the package. Then I set up a data flow, with OLE DB source and ado.net destination. In the destination, I am not able to choose the table/view from the dropdown list and
cannot map the columns, since it will be dynamically determined. In the Expression of the dataflow property, I add a property for
[ADO NET Destination].[TableOrViewName] as @[User::UserID]. I also set ValidateExternalMetadata to false and delayedValidation to true. However, it still does not work. Please help.
Good day,
I am currently working on a SSIS package that had been built by a previous user. That Package allows me to import data from an excel source to a SQL table. The excel sheet holds multiple columns, However I am having difficulty with one column when running the package.
The column rows hold a character and an integer (eg: N2). The data types are as follows:
SQL– varchar(3),NULL
SSIS - double-precision float [DT_R8]
I then inserted a data conversion task to change the data type. The task holds the following properties:
Input column – F6
Output Alias – Copy of F6
Data Type – string[DT_STR]
Length– 50
When I execute the package I receive the following error:”
[Excel Source Data [76]] Error: There was an error with output column "F6" (91) on output "Excel Source Output" (85). The column status returned was: "The value could not be converted because of a potential loss of data.".
I do know that usually the message "The value could not be converted because of a potential loss of data." refers to a data type or length problem.
Further insight to this problem will be much appreciated.
hi we run 2012 std. I have an ssis var of type object that is hydrated from a dynamic query in an execute sql task. I can count on one thing in this object and that is that ID will always be the first "col" on each "row". Otherwise, resultset can contain a variety of things based on params passed to this sub pkg.
I'd like to introduce a for each loop on this object and tap into index 0, ie the id column.
The first question is "will I be able to parse this object's id in a for each component?".
In the for each loop container properties, I c an item enumerator, ado enumerator, ado.net schema rowset and variable enumerator as enumerator choices. Which do I want if the answer to the 1st question is yes?
My SSIS package loads data from access database to SQL Server database.
It's a straight copy. It fails with the below warnings and error message as shown below:
Error messages:
[OLE DB Source [113]] Error: There was an error with OLE DB Source.Outputs[OLE DB Source Output].Columns[RetentionID] on OLE DB Source.Outputs[OLE DB Source Output]. The column status returned was: "Text was truncated or one or more characters had no
match in the target code page.".
[OLE DB Source [113]] Error: The "OLE DB Source.Outputs[OLE DB Source Output].Columns[RetentionID]" failed because truncation occurred, and the truncation row disposition on "OLE DB Source.Outputs[OLE DB Source Output].Columns[RetentionID]"
specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on OLE DB Source returned error code 0xC020902A. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure
code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.
There are 3 warning messages even before I run the package. Warnings are all about the mismatch between the source and destination column sizes.
I cross checked the source and destination column sizes. The destination column sizes are fairly high than the source column sizes.
It worked well all the while and when we are going to pre-prod it is throwing errors. Any help is highly appreciated.
Thank you.
Hi All,
I am migrating a DTS package to SSIS 2008R2 and I have a situation where i have to iterate through a table and have to load data from a single source table, into multiple Server-DB combinations.
The Server-DB combination is picked up from a table.
The table looks something like,
Name of Table: TABLE_A
____________________________
ID Server-DB Combination
_______________________________
1 SERVER1.DB1
2 SERVER2.DB2
3 SERVER3.DB3
4 SERVER4.DB4
5 SERVER5.DB5
6 SERVER6.DB6
7 SERVER7.DB7
8 SERVER8.DB8
9 SERVER9.DB9
Here is my insert statement in SQL 2000 database:
set @dbname = (SELECT [Server-DB Combination] FROM dbo.TABLE_A)
set @sql =
'INSERT INTO '+@dbname+'.dbo.DESTINATION_TABLE '
+'Select * '
+'from SOURCE_SERVER.SOURCE_DB.DBO.SOURCETABLE '
+'where COLUMN1 > GETDATE() -15 '
+'and COLUMN2 = 'INR'
+'and COLUMN3+COLUMN4+cast(COLUMN1 as varchar(10)) NOT IN
(SELECT COLUMN3+COLUMN4+cast(COLUMN1 as varchar(10)) FROM '+@dbname+'.DBO.SOURCETABLE)'
EXEC(@sql)
Note: The table dbo.DESTINATION_TABLE is available in all the Server-DB combinations and the METADATA of source and destination are exactly the same.
I am assuming a For loop and configure that to iterate a data flow task that has an OLE DB Source with SQL command as a source with the select query from above mentioned query.
But my concern is about the destination coz it is changing dynamically based on the Server_DB Combinations which is also making things complex while mapping source to destination.
Any suggestions please?
Thank you.
I've been tasked with converting several existing SQL scripts into SSIS packages. While some of the scripts are fairly straightforward, some of the scripts contain multiple JOIN's across multiple tables. While I have always just used a simple Execute SQL Task or an OLE DB source with a script, I've been asked to do away with any references to any other tables/databases in the source. Here is an example of one of the scripts:
INSERT INTO [dbo].[DimEngagementVehicle] ([EngagementVehicleSourceKey] ,[EngagementVehicleCode] ,[EngagementVehicleDesc] ,[EngagementVehicleCategorySourceKey] ,[EngagementVehicleCategoryCode] ,[EngagementVehicleCategoryDesc] ,[EngagementVehicleTypeSourceKey] ,[EngagementVehicleTypeCode] ,[EngagementVehicleTypeDesc] ,[GlobalEngagementVehicleKey] ,[GlobalEngagementVehicleDesc] ,[GlobalEngagementVehicleTypeKey] ,[GlobalEngagementVehicleTypeDesc] ,[RowIsCurrent] ,[RowStartDate] ,[RowEndDate] ,[RowChangeReason] ,[InsertAuditKey] ,[UpdateAuditKey] ) SELECT hs.health_screening_key ,hs.source_key ,hs.health_screening_desc ,s.source_key ,s.source_code ,s.source_desc ,v.rbh_vendor_key ,v.rbh_vendor_code ,v.rbh_vendor_name ,3 AS [GlobalEngagementVehicleKey] -- 'Health Screening ' ,'Health Screening ' AS [GlobalEngagementVehicleDesc] -- 'Health Screening ' ,2 AS [GlobalEngagementVehicleTypeKey] -- 'Active Engagement' ,'Active Engagement' AS [GlobalEngagementVehicleTypeDesc] ,'Y' AS [row_is_current] ,getdate() AS [row_start_date] ,'12/31/9999' AS [row_end_date] ,'N/A' AS [row_change_reason] ,-1 AS [insert_audit_key] ,-1 AS [insert_audit_key] FROM [RBH_DW_STAGE].[dbo].health_screening hs INNER JOIN [RBH_DW_STAGE].[dbo].[source] s on hs.source_key = s.source_key LEFT JOIN [RBH_DW_STAGE].[dbo].[rbh_vendor] v ON v.rbh_vendor_code = hs.vendor_screening_id WHERE NOT EXISTS (SELECT 1 FROM [DimEngagementVehicle] WHERE [GlobalEngagementVehicleTypeKey] = 2 AND [GlobalEngagementVehicleKey] = 3 AND [EngagementVehicleSourceKey] = hs.health_screening_key) GO
I know that either LOOKUP or MERGE JOIN could be used here, but not quite sure how to implement it in a package.
Any insight or assistance would be greatly appreciated!
Thanks!
A. M. Robinson
Hi Everybody,
This question was asked in an interview to me. Suppose there is a table for login credential. I want to create the table whenever I create a new database in sql server 2008. How can I achieve this?
Have anybody any idea?
Thanks and Regards,
Anujit Karmakar
Anujit Karmakar Sr. Software Engineer
hi
I have added a script Component (transformation) I have configured both the input and output columns.
In the script i have the overide input section but it will not let me create a CreateNewOutputRows section or add an OutputBuffer.addrows statement?
Can anyone help?
Kind Regards,
Paul
So we are running Microsoft Office Professional Plus 2010, Version 14.0.7015.1000(32-bit)
This is what is installed via our Network and Network licensing.
I am trying, in vain, to read and write a .xlsx file via a C# Edit Script in a SSIS Package. And I have tried using...
string StringConnection = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + sourceFile + ";Extended Properties=\"Excel 12.0;HDR=Yes;IMEX=1\"";
And this tells me that this has not been installed. So when I go and try and get the Microsoft Access Database Engine 2010 64-bit, which would allow me to use Microsoft.ACE.OLEDB.12.0 and allow me to read, write, and process this .xlsx file, it tells me I cannot install it because I already have 32-bit installed and it wants me to un-install Microsoft Office 2010. Why? Because it is 32-bit? And I can't do that because this is what we have and what we're licensed for and from what I've read seems to be the industry standard because most software vendors are ill equipped to process 64-bit right now.
So my question is this...How can I use a C# Edit Script to read and process a .xlsx file? Because if I try using...
string StringConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + sourceFile + ";Extended Properties=\"Excel 8.0;HDR=Yes;IMEX=1\"";
It then tells me that the file is not in that format.
Please excuse me for asking this question in a couple of different ways out here but I cannot for the life of me seem to be able to get an answer as to how I can process a .xlsx file with a C# script and which driver to use that will make this work.
Thanks for your review and am hopeful for a reply.
ITBobbyP85
Hi,
I have a situation where i have to load data from one server/database table to multiple servers/databases.
Example:
I need to load data from dbo.TABLE_A (on Server: Server_A & Database: Database_A) to the same table on the list of server databases like
Server: Server_B , Database: Database_B
Server: Server_C , Database: Database_C
Server: Server_D , Database: Database_D
Server: Server_E , Database: Database_E
Server: Server_F , Database: Database_F
Server: Server_G , Database: Database_G
Server: Server_H , Database: Database_H
so on and so forth on 250 such server database combinations.
The table structure is the same on all the servers.
If i make the source or destination dynamic, it throws an error while mapping ?
I cannot get Linked server permissions and SQL Server Config thing doesn't work as well.
Please suggest on how to load data from one source to multiple server/databases.
Thank you.