I created a variable to store Flat Flat Destination path and name. First time when a i run with a particular flat file name in the variable, it works fine. If i try to run again with the same name in the variable. it throws error. please see the error below.
This is not my local folder, it is a shared folder.
Hi When i ran my SSIS job in Dev , it worked fine but when i ran the same job in Test, i got the below error:
Error: 2015-03-10 10:45:20.92 Code: 0xC0047062 Source: DF_Process SC_SelectRecords [34] Description: System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification
from a service application. at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.HandleUserException(Exception e) at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.PrimeOutput(Int32 outputs, Int32[] outputIDs, PipelineBuffer[] buffers) at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPrimeOutput(IDTSManagedComponentWrapper100 wrapper, Int32 outputs, Int32[] outputIDs, IDTSBuffer100[] buffers, IntPtr ppBufferWirePacket)
End Error
Error: 2015-03-10 10:45:21.02 Code: 0xC0047038 Source: DF_Process SSIS.Pipeline Description: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "SC_SelectRecords" (34) returned error code 0x80131509. 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.
End Error
We have scheduled job running a console application daily. For some reason on Sunday's only the scheduler says it ran successfully but no email confirmation, table entries and the normal processing occurs.
This happens only on a Sunday and for no explained reason. No problem on the day before or after...
I think this also happened with Daylight Savings adjustment. Has anyone else encountered this?
Any ideas or suggestions
Environment is:
Microsoft SQL Server 2008 R2 (SP2) - 10.50.4000.0 (X64)
Jun 28 2012 08:36:30Copyright (c) Microsoft CorporationEnterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)
I have an SSIS package that reads from an Access database (2010). This database has a linked table to another Access file (mdb) located in an sftp location, and our SSIS query is reading from local tables and to this linked table. The package
runs smoothly when both databases point to a local folder, however when trying to run the same package using test databases located in different servers/drives the package fails. The message that we get is " Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft Office Access Database Engine" Hresult: 0x80004005 Description: "Unrecognized \
database format". We have installed both ACE OLEDB drivers (32 and 64) but we still get the error. Has anybody seen something like this before?
I'm trying to pull data from an Oracle database using SSIS. When I try to select a few fields from the source table, it returns the following error message:
[OLE DB Source [47]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E14. An OLE DB record is available. Source: "OraOLEDB" Hresult: 0x80040E14 Description: "ORA-01858: a non-numeric character was found where a numeric was expected". An OLE DB record is available. Source: "OraOLEDB" Hresult: 0x80004005 Description: "ORA-01858: a non-numeric character was found where a numeric was expected".
The source columns are a combination of numeric and texts, and I've also tried selecting one of them, which didn't work. I'm using the Oracle client 11.2.0.1, and it works fine with any other data sources I have connected to so far. How can I resolve this
error?
I`m getting an error on one of my packages. The Pakcage contains a For each loop which fetches flat files and dumps into a SQL server.
When i checked the error messages, The package crashes on the destination tables.
This is the entire message.
[OLE DB Destination [8500]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E21.
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80040E21
Description: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.".
[OLE DB Destination [8500]] Error: Cannot create an OLE DB accessor. Verify that the column metadata is valid.
I'm trying to set up a script task in SSIS (my first attempt at doing so, so bear with me). Part of this is code I have pulled from other examples I found on the internet.
Dts.TaskResult = Dts.Results.Success
on the above line, I'm getting error
'Results' is not a member of 'Microsoft.SqlServer.Dts.Tasks.ScriptTask.ScriptObjectModel'
Hi all
I am developing a SSIS package to add data from thousands of XML files to an existing SQL Server table.
And I get the error message:
The XML Source was unable to process the XML data. “”hexadecimal value 0x01 , is an invalid character.
I know that these XML files are not well-formed (and hence not really an XML file).
So, How to use the SSIS package to solve this problem without using the other editor?
I have a query and would appreciate your response / guidance.
I have a CDC package which when I execute manually takes around 1 sec to finish but when I execute the same package via a SQL job it takes around 24 seconds.
I am trying to Inner Join between two tables of employee details. The Join will be done Employee ID, DOB and on name. We will have a constraint to check the first 5 characters of their name (substring). This works and get the exact count on SQL query.
But when I translate this to SSIS, where I have done a substring with derived column and Merge Join, the count is wrong.
Join with the employee number and dob - count is same for SQL query and in SSIS
But when we join with name, its not equal.
The Issue is with the name, when an employee has 3 or 4 characters of name like 'abc', join is getting ignored in SSIS. Any help to fix this.
In the northern hemisphere at least, Spring is here! (apparently)
And at TechNet Wiki, we're hoping you're all hatching new ideas for this month's TechNet Guru competition!
We're looking for more shoots and leaves of wisdom to sprout forth from the great tree of MSDN/TechNet life.
We're also hoping some of our old Guru winners will be coming back out of hibernation and flexing their grey matter!
So, pick up your pen and MARCH into TechNet History! This could truly be the start of something BEAUTIFUL!
What delightful new arrival will YOU be bringing into this world?
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.
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.
#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 toTechNet Wiki, for future generations to benefit from! You'll never get archived again, and
you could win weekly awards!
Have you got what it takes o become this month's
TechNet Technical Guru? Join a long list of well known community big hitters, show your knowledge and prowess in your favoured technologies!
I'm facing weird issue in SSIS 2008 version. In one SSIS package, whenever I open the connection manager and point the DEV server abd test the connection it is working. When I open again, it is throwing the below error eventhough I have access to the database.
"Test connection failed because of an error in initializing provider. Login failed for user"
It's with Windows Authentication.
Additional Details:
Package configuration is disabled.
Connection manager has expression which is gettiing the details from variables that has DEV server details.
Can anyone please get me through the solution for the below scenario:
- I have multiple XML files existing in the source system from where I need to read the data from each XML, validate and pull to staging database.
- So, to read the XML files from source, I have a foreach loop which will get the XML files from the source folder one by one and executes.
- There are multiple data flow tasks, script tasks, SQL tasks etc in the foreach loop to validate the business requirements.
Question: If there is an error in any of the component in foreach loop, it should log the error, come out of the loop from that point and pick up the next file with out stopping the execution. How can I achieve this?
Ive got a WMI Data Reader task that is using a query like this, which is set in a script task. "SELECT * FROM Win32_NtLogEvent WHERE Logfile='Application' AND Type='error' AND TimeGenerated > '3/10/2015'"
If I take off the TimeGenerated part, the DataReader task succeeds, but with it I get an error
"Operation is not valid due to the current state of the object"
Ive had issues with time formats before when dealing with WMI, is this a case where the time format comes into question?
I tried with UTC time format and still get the same error. I really need to be able to filter based on date/time. Since Im filling in a DataTable with the WMI results, I suppose I could filter the DT for the date...
The WQL statement Im using is being built like this (using UTC time)
Dts.Variables["User::wmi_query_string"].Value = "SELECT * FROM Win32_NtLogEvent WHERE Logfile='Application' AND Type='error' AND TimeGenerated > '" + DateTime.Now.AddDays(-1).ToUniversalTime() + "'";
I'm attempting to write a SSIS package that loops through a list of databases on different servers and returns a list of users for each database, including their roles. The following code runs successfully when executed in SSMS against databases on SQL 2005,
2008/R2, and 2012.
/******************************************************
Declare variables to work with
******************************************************/
DECLARE @U1 as table
([principal_id] int
,[RowNo] int
)
DECLARE @R2 as table
([principal_id] int
,[db_Role] nvarchar(128)
,[RowNo] int
)
DECLARE @T3 as table
([ServerName] nvarchar(128)
,[db_Name] nvarchar(128)
,[User_Name] nvarchar(128)
,[User_Type] nvarchar(60)
,[db_Roles] nvarchar(128)
)
DECLARE @roles as nvarchar(128)
DECLARE @principal_id as int
DECLARE @I as int
DECLARE @MaxI as int
DECLARE @J as int
DECLARE @MaxJ as int
/******************************************************
Insert users into table variable
******************************************************/
INSERT INTO @U1
SELECT principal_id,
ROW_NUMBER() OVER(ORDER BY principal_id) AS RowNo
FROM sys.database_principals AS U
WHERE U.[type] IN ('S','U')
AND U.[name] NOT IN ('dbo','guest','INFORMATION_SCHEMA','sys')
/******************************************************
Insert roles into table variable
******************************************************/
INSERT INTO @R2
SELECT M.member_principal_id AS principal_id,
R.[name] AS [db_Role],
ROW_NUMBER() OVER(PARTITION BY M.member_principal_id ORDER BY R.[name]) AS RowNo
FROM sys.database_role_members AS M
INNER JOIN sys.database_principals AS R ON M.role_principal_id = R.principal_id
/******************************************************
Need to start looping through each role
******************************************************/
SET @I = 1
SELECT @MaxI = MAX([RowNo]) FROM @U1
WHILE @I <= @MaxI
BEGIN
/******************************************************
Get all of the roles and put them into a variable
******************************************************/
SET @J = 1
SELECT @principal_id = [principal_id] FROM @U1 WHERE RowNo = @I
SELECT @MaxJ = MAX([RowNo]) FROM @R2 WHERE [principal_id] = @principal_id
SELECT @roles = ''
WHILE @J <= @MaxJ
BEGIN
SELECT @roles = @roles + [db_Role] + '; '
FROM @R2 AS R
WHERE principal_id = @principal_id
AND RowNo = @J
SET @J = @J+1
PRINT @Roles
END
/******************************************************
Put the results into the user table
******************************************************/
INSERT INTO @T3
SELECT CONVERT(nvarchar(128),@@SERVERNAME) AS [ServerName],
CONVERT(nvarchar(128),DB_NAME()) AS [db_Name],
CONVERT(nvarchar(128),P.[name]) AS [User_Name],
CONVERT(nvarchar(60),P.[type_desc]) AS [User_Type],
CONVERT(nvarchar(128),@roles) AS [db_Roles]
FROM @U1 AS U
INNER JOIN sys.database_principals AS P ON U.principal_id = P.principal_id
WHERE U.principal_id = @principal_id
SET @I = @I+1
END
SELECT * FROM @T3 ORDER BY [User_Name]
It all starts falling down when I try and put this into a data flow task as a source. The connection manager for the OLE DB Source is dynamically changed and this code called for each new connection by placing the data flow task within a loop. The connection
string for the connection manager is an expression defined as follows:
As I said, the code runs fine when executed in SSMS, but when run through SSIS only works for SQL 2012 servers. If I try to return information from a SQL 2005 (or other) server I get the following message and the packages refuses to run:
"no column information was returned by the sql command"
After exploring this issue I've attempted a few solutions (including prefixing my code with SET FMTONLY OFF and ensuring that the final result always returns a value), but to no avail.
I'm at the point that the only solution I can think of is to create this as a stored procedure / table-values function on every database (or at least every server), but this strikes me as impractical.
While migrating DTS package to SSIS package, I came across one which had multiple OLE DB connection managers all connecting to the same Oracle schema in the same instance.
There are that many execute SQL task corresponding to each of these connection managers.
Each of these SQL task call different Oracle stored procedures and executes them in the same schema in the same instance.
My question is, is there any particular reason or advantage in having multiple connection managers?
Can't we have one single connection manager and use the same in all of these SQL tasks?
Does multiple connection managers provide any added advantage like parallelism or something?
In this particular case, there are no actual workflows, rather each of these SQL tasks are stand alones. But there are other packages which has SQL tasks in workflow but still each of them calling separate connection managers all calling the same schema
in the same instance.
So on a weekly basis, I have to sweep a sub-set of our Member data. So my query is built to produce this result set. I then have to take that result set and compare it to a data table which contains all that same information that I have provided to a 3rd
party vendor. So I need to take into account the following scenarios...
Obviously, if the Member is new, then I have to Insert its row to what we'll call table 3rdPartyMember and create a row out on a 3rdPartyMemberAuditTrail Table
Individually, I also have to manage if any of the following data fields have changed: Name, Birth Date, Addressing Information, Member Plan, Member Termination...and by Individually what I mean is that if the Last Name has changed, then update its row in
3rdPartyMember and Insert a row to 3rdPartyMemberAuditTrail indicating "Last Name Change"...and similarly if Address Line 1 has changed..."Address Line 1 Change"
So I guess my question is this. Should this be done in one whole Stored Procedure invoked by my SSIS Package or should it be done in pieces?
Create the Temporary Table to house our weekly Member subset extract and result set
Determine if the row exists on 3rdPartyMember Table and if it does not, Insert it
If the row exists, determine if there is a First Name Change...Last Name Change...BirthDate change...Address Line 1 change...etc... If there is a change, Update 3rdPartyMember Table and also Insert a row to 3rdPartyMemberAuditTrail indicating the change
Based on all this, I'm just not sure the right way to approach this...meaning should we create one big Stored Procedure to handle everything or each individual data point in my SSIS as an UpSert based on its lookup. I am new to the SSIS World and don't really
know what the generally accepted practice is per se of creating and running an SSIS Package with multiple data point update steps or doing so in one big Stored Procedure.
Also....if anyone know of some good YouTubes or web sites that would instruct me as to how to go about doing this, I'd GREATLY appreciate it.
Thanks for your review and am hopeful for a reply.
Here's the challenge that I'm presented with. I've created a SSIS package that loops through a directory and reads multiple flat files loading all records to a single SQL table. What I would like to do is load a separate SQL table from each flat file read. BTW, the SQL table name can be the same as the flat file name.
I would rate myself an advanced beginner with SSIS, so please consider that when replying.
I would like to execute SSIS package from stored procedure. Therefore, I implemented sp which exec SSISDB.CATALOG.CREATE_EXECUTION method. When I try to test it from SSMS on remote server, I got error that
I was able to solve by adding “WITH EXECUTE AS …”. Then I got another error: The server principal "Domain\user" is not able to access the database "SSISDB" under the current security context. On Internet, I found a couple post that describe
how to access SSIS catalog (one of them by Ke Yang -
http://blogs.msdn.com/b/mattm/archive/2012/03/20/ssis-catalog-access-control-tips.aspx). It didn’t help. I’m still getting the error message.