SSIS Oracle 32 bit error "Invalid access to memory location." - sql-server

My SSIS extracts data from Oracle DB and loads into the excel file. I am running this package via SQL Job. Now to use Excel providers I have to use 32 bit environment. So I've changed the SQL JOB execution to "Use 32bit runtime".
But now my oracle task is failing with error "Invalid access to memory location."
When I don't use 32bit runtime in job, the oracle task works but the excel task fails.
We have both 32bit and 64bit Oracle installed on the server. So not sure why oracle task is failing in 32bit environment.
Any help will be appreciated. Thanks in advance.
Detailed error message..
Error code: 0x800703E6. An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x800703E6 Description: "Invalid access to memory location.". End Error Error: 2017-05-09 08:45:31.48 Code: 0xC00291EC Description: Failed to acquire connection. Connection may not be configured correctly or you may not have the right permissions on this connection. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 8:45:30 AM Finished: 8:45:31 AM Elapsed: 1.435 seconds. The package execution failed. The step failed.

I always use TOAD "export to excel" [no coding] option

Related

Jobs failed with the following errors

this is the first time I've tried to schedule a job and I keep getting the error message below. I am using the admin account and checking the 32 bit box. Any ideas on how to remedy? Thanks.
Executed as user: NT Service\SQLAgent$BZMSSQLSERVER. Microsoft (R) SQL
Server Execute Package Utility Version 14.0.2014.14 for 32-bit
Copyright (C) 2017 Microsoft. All rights reserved.
Started: 9:48:28 AM Error: 2019-12-02 09:48:29.50
Code: 0xC0202009
Source: TEST Connection manager "DestinationConnectionExcel"
Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has
occurred.
Error code: 0x80004005. An OLE DB record is available.
Source: "Microsoft JET Database Engine"
Hresult: 0x80004005 Description: "The Microsoft Jet database engine
cannot open the file ''. It is already opened exclusively by another
user or you need permission to view its data.". End Error
Error: 2019-12-02 09:48:29.50
Code: 0xC00291EC
Source: Preparation SQL Task 1 Execute SQL Task
Description: Failed to acquire connection
"DestinationConnectionExcel". Connection may not be configured
correctly or you may not have the right permissions on this
connection. End Error
DTExec: The package execution returned DTSER_FAILURE (1).
Started: 9:48:28 AM
Finished: 9:48:29 AM Elapsed: 0.641 seconds. The package execution
failed. The step failed.
It may be a permission issue. If you can, change the Agent service account to a Windows AD account with local admin privileges.

Oracle connection issues from SSIS

Getting connection error on oledb source from the SSIS package to import the data from oracle to sql server. It is failing after deploying to server but runs fine when being run from BIDS from local machine. The package is developed in 2008.
Is there any installation needed on server for oracle?
The following error is being displayed
Source: Connection manager Description: SSIS Error Code
DTS_E_OLEDB_NOPROVIDER_64BIT_ERROR. The requested OLE DB provider
MSDAORA.1 is not registered -- perhaps no 64-bit provider is
available. Error code: 0x00000000. An OLE DB record is available.
Source: "Microsoft OLE DB Service Components" Hresult: 0x80040154
Description: "Class not registered". Code: 0xC020801C OLE DB
Source [1] Description: SSIS Error Code
DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The
AcquireConnection method call to the connection manager failed with
error code 0xC0209303. There may be error messages posted before this
with more information on why the AcquireConnection method call failed.
Code: 0xC0047017 Source: SSIS.Pipeline Description: component
"OLE DB Source" (1) failed validation and returned error code
0xC020801C. End Error Error: 2019-06-18 22:54:18.99 Code:
0xC004700C Source: Pipeline Description: One or more component
failed validation.
When I am validating the package, there it is giving ORA-01017: invalid username/password; but the same credentials are used while running from local machine.
I am running it in 32 bit but still the error persists
Also tried with ProtectionLevel as Dontsavesensitive but no luck
Yes, you need to install an Oracle client. The bare Instant Client should be sufficient as you use the deprecated MSDAORA OLE DB provider from Microsoft.
If you like to use the Oracle Provider for OLE DB (OraOLEDB.Oracle) then you must install the provider. It is not included in the Instant Client.
Ensure that the architecture (i.e. 32-bit or 64-bit) is the same as your application. Your question is not clear in that. You write "I am running it in 32 bit" but the error message "The requested OLE DB provider MSDAORA.1 is not registered -- perhaps no 64-bit provider is available." indicates 64-bit.
Note, old MSDAORA provider from Microsoft exist only for 32-bit. If you need a 64-bit version then you must take the provider from Oracle.
32-bit drivers can be downloaded from 32-bit Oracle Data Access Components, the 64-bit drives are available at 64-bit Oracle Data Access Components
You need to install Oracle drivers on the production machine. If I remember one way to do it is to install the x64 Oracle client software for Windows. Its enormous but it seems to work. This has worked for me.
According to this stackoverflow answer you can manually install the drivers but its a lot of steps:
https://serverfault.com/questions/175257/how-to-install-oracle-ole-drivers-for-use-in-sql-server-2008-r2-x64

Why is my SQL Server job using an SSIS package failing but that same SSIS package is running successfully in Visual Studio?

I have created an SSIS package in Visual Studio using the SSIS Import and Export Wizard and when I run it there, it runs successfully. Basically, the SSIS package runs a sql query on my SQL Server database and exports the results into an Excel file.
I have wrapped that package into a SQL Server job and scheduled it to run at a specific time. I noticed that it failed and the log file shows the following error messages:
Microsoft (R) SQL Server Execute Package Utility Version 12.0.5000.0 for 64-bit Copyright (C) Microsoft Corporation. All rights reserved. Started: 4:44:00 PM Error: 2017-10-12 16:44:00.59 Code: 0xC0016016 Source: ExpExcel Description: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available. End Error Error: 2017-10-12 16:44:00.68 Code: 0xC0209303 Source: ExpExcel Connection manager "DestinationConnectionExcel" Description: The requested OLE DB provider Microsoft.Jet.OLEDB.4.0 is not registered. If the 64-bit driver is not installed run the package in 32-bit mode. Error code: 0x00000000. An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040154 Description: "Class not registered". End Error Error: 2017-10-12 16:44:00.68 Code: 0xC00291EC Source: Drop table(s) SQL Task 1 Execute SQL Task Description: Failed to acquire connection "DestinationConnectionExcel". Connection may not be configured correctly or you may not have the right permissions on this connection. End Error Error: 2017-10-12 16:44:00.68 Code: 0xC0209303 Source: ExpExcel Connection manager "DestinationConnectionExcel" Description: The requested OLE DB provider Microsoft.Jet.OLEDB.4.0 is not registered. If the 64-bit driver is not installed run the package in 32-bit mode. Error code: 0x00000000. An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040154 Description: "Class not registered". End Error Error: 2017-10-12 16:44:00.68 Code: 0xC00291EC Source: Preparation SQL Task 1 Execute SQL Task Description: Failed to acquire connection "DestinationConnectionExcel". Connection may not be configured correctly or you may not have the right permissions on this connection. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 4:44:00 PM Finished: 4:44:00 PM Elapsed: 0.219 seconds. The package execution failed. The step failed.,00:00:00,0,0,,,,0
I am having a hard time trying to figure out how to debug these errors and finding the solution. If my SSIS package is running fine in Visual Studio (installed on that same machine as SQL Server), then why is it failing as a SQL Server job?
I must also add that Microsoft Office is not installed on that machine. Could that possibly be the cause?
You need to enable 32bit on your SQL Job agent step - And if that doesnt work you need to install OLDB ACE Driver for EXCEL
Driver link:
Microsoft ACE Driver
And as others point out. Your project protection level needs to be the same as the package protection level. You can change that under properties of the package and project.
How to set 32bit on step in SQL Job Agent on step
When you created the package it probably got set up with a User Key protection level. Meaning that any sensitive information (passwords) get encrypted with your user key. By extension, this means only you can really open/run the package. Your best bet (requiring the least amount of effort in my opinion) is to encrypt the package with a password and then you can specific that password as you are creating your SQL Agent job.

BIDS 2008 SSIS Package Data Flow Task fails validation and returns "VS_ISBROKEN" Error

A BIDS 2008 SSIS package that I am working is failing validation when it reaches any Data Flow Task in the package. I am able to run the SSIS package within BIDS 2008 on my computer locally. When I run the SSIS package through an SQL Agent Job, the package fails with the error message below. I have researched error code 0x80004005 and error code 0xC004706B through Google searches, but have not found anything that is of use.
The SSIS package in question is one of several SSIS packages that run together in the same SQL Agent Job. The other SSIS packages in the original SQL Agent Job all are able to run successfully. This leads me to believe that the SQL Agent Service Account and Proxy Account are configured with the appropriate permissions. A DBA was able to confirm that the Service Account and Proxy Account do have the appropriate permissions.
The SQL Agent Job runs the SSIS package using the Operating System (CmdExec) type and the SSIS package has Run64BitRuntime set to FALSE so the SSIS Package is running under the 32-bit runtime.
For debugging purposes, I recreated the Data Flow Task, Database Connections, and related source and destination tasks in a new SSIS Package from the original SSIS package. The debugging SSIS package is able to run locally on my computer, but fails when I try to run using a new SQL Agent Job setup exactly like the original SQL Agent Job.
I have also use different Database Connections such as Native OLE DB\SQL Server Native Client 10.0, 10.1, 11.1, and Native OLE DB\Microsoft OLE DB Provider for SQL Server. All of which have failed when I test the debugging SSIS package
I have verified that the metadata for the OLE DB Source and Destinations match the datatypes and lengths in the SQL Server Database tables. I have verified that the stored procedure used by the OLE DB Source task in the Data Flow Task work when ran on SQL Server Management Studio and the Service Account has permissions to run the stored procedure.
I think that is every bit of information that I can recall from working on troubleshooting this issue.
Has anyone else come across this error before? Any possible solutions to attempt?
Any help is welcomed!
Error Message:
Executed as user: domain\SQLAgentServiceAccount. Microsoft (R) SQL Server Execute Package Utility Version 10.50.2500.0 for 64-bit
Copyright (C) Microsoft Corporation 2010. All rights reserved.
Started: 1:37:09 PM
Error: 2014-08-14 13:37:09.94 Code: 0xC0202009 Source: Data Flow Task - OLEDB Source [1]
Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred.
Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft OLE DB Provider for SQL Server" Hresult: 0x80004005
Description: "Syntax error or access violation".
End Error
Error: 2014-08-14 13:37:09.94 Code: 0xC004706B Source: Data Flow Task SSIS.Pipeline
Description: "component "OLEDB Source" (1)" failed validation and returned validation status "VS_ISBROKEN".
End Error
Error: 2014-08-14 13:37:09.94 Code: 0xC004700C Source: Data Flow Task SSIS.Pipeline
Description: One or more component failed validation.
End Error
Error: 2014-08-14 13:37:09.94 Code: 0xC0024107 Source: Data Flow task
Description: There were errors during task validation.
End Error
DTExec: The package execution returned DTSER_FAILURE (1).
Started: 1:37:09 PM Finished: 1:37:09 PM Elapsed: 0.219 seconds. Process Exit Code 1.
The step failed.
I found the this solution :
Ensure that the connection string in Connection Manager has "Provider=SQLNCLI11.1; Persist Security Info=True; Auto Translate=False;"
I did it and it worked for me on Hyperscale / SQL Server.
This is kind of strange error that I got a while ago and I used the following to resolve the problem:
Run command prompt as Administrator
Type the following command and hit Enter: regsvr32 jscript.dll
Type the following command and hit Enter: regsvr32 vbscript.dll
The solution to the problem was that the service account that is running the SQL Agent job did not have execute permissions on the stored procedure being executed through the Data Flow Task. Gave the service account execute permissions and the SSIS package was able to successfully execute.

Oracle Transaction under MS SSIS

I'm trying to get transactions working under SSIS (SQL Server Integration Services 2005) and Oracle with no luck. I'm using Oracle 10g.
I have created a Sequence Container, set its TransactionOption to "Required" and put inside it a DataFlow Task with TransactionOption = "Supported".
The server running SSIS has the MSDTC service running.
The DataFlow Task has, as source, a SQL Server OLEDB connection and as target an Oracle OLEDB connection.
When trying to execute it, I get the following errors:
Error: 0xC001402C at MediaMarketAnnullamento, Connection manager "ITMASORASVIL:1521/SVILUPPO.EDP": The SSIS Runtime has failed to enlist the OLE DB connection in a distributed transaction with error 0x8004D01B "The Transaction Manager is not available.".
Error: 0xC0202009 at MediaMarketAnnullamento, Connection manager "ITMASORASVIL:1521/SVILUPPO.EDP": SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x8004D01B.
Error: 0xC020801C at 9999 - Insert_MAGAZZZINO_MM_SHOW, MAGAZZINO_MM_SHOW_SSIS [2187]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "ITMASORASVIL:1521/SVILUPPO.EDP" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
Error: 0xC004701A at 9999 - Insert_MAGAZZZINO_MM_SHOW, DTS.Pipeline: component "MAGAZZINO_MM_SHOW_SSIS" (2187) failed the pre-execute phase and returned error code 0xC020801C.
Information: 0x40043009 at 9999 - Insert_MAGAZZZINO_MM_SHOW, DTS.Pipeline: Cleanup phase is beginning.
Information: 0x4004300B at 9999 - Insert_MAGAZZZINO_MM_SHOW, DTS.Pipeline: "component "MAGAZZINO_MM_SHOW_SSIS" (2187)" wrote 0 rows.
Task failed: 9999 - Insert_MAGAZZZINO_MM_SHOW
Information: 0x4001100C at 9999 - Insert_MAGAZZZINO_MM_SHOW: Aborting the current distributed transaction.
Information: 0x4001100C at Insert su Oracle: Aborting the current distributed transaction.
SSIS package "MediaMarketAnnullamento.dtsx" finished: Failure.
Any help?
Thanks
EDIT:
I just discovered that the server running Oracle is not, as I thought, Windows based but IBM ICS. I don't know if this is relevant.
Looks like it may be a problem with MSDTC permissions this MS blog post might help to debug it. Also I'm assuming that the permissions on the Oracle server are set correctly see this MS kb article for help with this.
Is this doc of any use?
http://msdn.microsoft.com/en-us/library/aa344212.aspx

Resources