OLE DB or ODBC error. The current operation was cancelled because another operation in the transaction failed - sql

OLE DB or ODBC error.
An error occurred while processing table 'Query 1'.
The current operation was cancelled because another operation in the transaction failed.
Out of line object 'DataSourceView', referring to ID(s) 'Temp_DSV', has been specified but has not been used.
I got the above error when i ran a query in Power Pivot for excel. Can somebody tell me , what might be the reason?

i got this message error too in mylast 7 days.
My solution is running first in example select top 10 * in sql server management studio, then go to excel, running query in power pivot again.
I dont know why this is solve, but it save me, in many times.

Maybe your query exceeds the memory limitations of 32bit Excel. Try to limit your query with a WHERE clause.
Also see this related question:
How to debug OLE DB or ODBC error (import data from MySql to Excel)

Related

SSIS Error: Invalid object name - but object exists and query runs in SSMS

I'm currently updating all of our ETLs using Visual Studio 2015 (made in BIDS 2008) and redeploying them to a new reporting server running on SQL Server 2016 (originally 2008R2).
While updating one of the ETLs I got this error:
Exception from HRESULT: 0xC0202009 Error at Load Staging Table [OLE DB
Source [129]]: 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: "Invalid object name 'dbo.TimeSheets'.".
Here's what I've tried:
Checked my connection strings to make sure they were correct.
Checked the schema to make sure it existed and was correct.
Ran query from SSMS and it worked.
Ctrl + Shift + R to refresh intellisense.
Checked to see if another table exists with the same name.
Restarted Visual Studio and SSMS.
I got a successful fix from the comments of the question "The other option would be to fully qualify the table name {database}.{schema}.{table} to ensure that, regardless of the default catalog, you query the correct database."
I was using some other database and it was caching and using that DB name rather than the new one I changed to.
I encountered the same issue - my Database was somehow, not getting picked up. So I manually added the database and test the connection and now it works fine.
For SSIS - Specially it is observed if any table name is coming as "Invalid object name" then Check as -
First - Check table exist through SSMS and if not then SSMS> Edit > IntelliSense > Refresh Local Cache
Second - While making DB connection via "Connection manager" or already exist then - check table name comes in drop down of "Name of the table or View"
I tried several of the above suggestions but what worked for me in the end was the good old close and re-open of SSDT!
I just had the same issue.
Both SSIS and SSMS refused to find the table [Stage].[Customer], although it definetly existed (and had existed for quite some time).
Dropping and re-creating the table did no good. Also I noticed that SSMS's intellisense did not pick up that the table had been re-created (yes, after ctrl+shift+R)
What helped in the end was using
CREATE TABLE [Stage].[Customer] ([Id] INT)
in SSMS
This caused an error because the table already existed. Since then both SSMS and SSIS are working as expected. No idea what caused this error, but it is been difficult to track down.
Same issue.
I could see the corresponding tables in the drop-down in several of my OLE DB Destinations, but it would not let me see the mappings, giving the following error:
"Exception from HRESULT: 0xC0202040... SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005."
What did not work:
Restarted Visual Studio
Several solution cleans/rebuilds
Restarted the computer
What did work:
Closed Visual Studio
Cleared files in %temp% folder
Details
When clearing my %temp% files (those that would delete), one folder (VsHub) would not delete, but I was able to delete some of the files that it contained. When I started Visual Studio again and opened the sequence that contained those OLE DB Destinations, it was obvious that it was re-evaluating the XML code and the error went away.
Hope this helps someone.

SSIS stopped working when loading into azure dwh

Hope someone can help here.
my SSIS packages (straightforward fetch rows from Azure SQL db ---> load into azure dwh) have suddenly stopped working, after running smoothly for 2 months.
The insert (specilifally OLE DB component) now fails with error message
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 11.0" Hresult: 0x80004005
Description: "The source and target columns must be in the same order in the INSERT BULK statement."
Packages are developed with SSDT for VS 2013. No recoding or redeployment of azure dwh , just this error appeared out of the blue one day.
/Dmitri.
I quote Rick He:
The issue could be that your database has case insensitive collation and distribution column name specified in the table DDL is "different" from column name in column definition in terms of lower/upper cases.
For example, your original table DDL could be like:
create table tableA (colABC int) with (distribution=hash(colabc))
In this case your BCP(SqlBulkCopy) might stop working recently. This is a product issue. The latest GA release has this issue, and the team is trying to fix this issue now.
Workaround for now: Create a new table to make sure column names are exact the same. Take above example:
create table tableA (colABC int) with (distribution=hash(colABC))

Cannot read the next data row for the dataset DataSet1. (rsErrorReadingNextDataRow)

I am working in Microsoft Visual Studio to create my RDL's. I have a sub report which refuses to run when we put it up on SSRS. This report runs fine inside of Visual studio in preview mode even when pointed at a copy of the prod database (still takes 30 min to run but it completes). The report only returns 1 row with counts of a large amount of data for a summary.
The full error text is:
An error has occurred during report processing. (rsProcessingAborted)
o Cannot read the next data row for the dataset DataSet1. (rsErrorReadingNextDataRow)
A severe error occurred on the current command. The results, if any, should be discarded. Operation cancelled by user.
This report used to work but the query was not correctly pulling the information. I had to change the query and expand what it was pulling from the database. Is there any way this could be caused by not enough memory being given to SSRS? We are using SSRS 2008 r2.
Turns out my problem was solved by putting in the recommended indexes provided by SQL Query Analyzer. After the indexes were created the query ran in ~4 min no problems.

SSAS 2005 query error 'The operation has been cancelled'

Context: SSAS 2005. I run a MDX query in SSMS, the query will throw error 'The operation has been cancelled.' whenever the execution time reaches 50 seconds (or 49 seconds, 48 seconds some times). I have already set ServerTimeOut to 0 and restarted the SSAS server. Any idea? I googled a bit and I am sure there is no processing when the query is running. In SQL Profiler I can only see an error event with the same information as in the SSMS. The log file has nothing recorded regarding this. But I do see the memory going up all the way until the query fails. Any idea?
Update
Ok it turns out I didn't set a relationship between a dimension and a measure group. I am not 100% clear about the issue but not it's sure it's not related to server properties nor processing while executing the query.

Unable to import data into SQL Server from Progress DB, issue with data type conversion?

I'm trying to import data from a Progress database into a MS SQL 2005 Server database.
On SQL Server, I'm right clicking on my schema name and going Tasks > Import Data... and running through the wizard.
I have an ODBC Connection to progress setup, no issues there, I also test my queries using ODBC Explorer first to ensure I have no syntax issues.
A statement that I'm using is as follows:
SELECT "MYTABLE"."FIRST-NAME",
"MYTABLE"."LAST-NAME",
"MYTABLE"."D-O-B"
FROM PUB."MYTABLE"
This works fine in ODBC Explorer, but when I try to use this in SSIS I get the following error
Executing (Error)
Messages
Error 0xc02090f5: Data Flow Task: The component "Source - Query" (1) was unable to process the data.
(SQL Server Import and Export Wizard)
Error 0xc0047038: Data Flow Task: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "Source - Query" (1) returned error code 0xC02090F5. 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.
(SQL Server Import and Export Wizard)
Error 0xc0047021: Data Flow Task: SSIS Error Code DTS_E_THREADFAILED. Thread "SourceThread0" has exited with error code 0xC0047038. There may be error messages posted before this with more information on why the thread has exited.
(SQL Server Import and Export Wizard)
Error 0xc0047039: Data Flow Task: SSIS Error Code DTS_E_THREADCANCELLED. Thread "WorkThread0" received a shutdown signal and is terminating. The user requested a shutdown, or an error in another thread is causing the pipeline to shutdown. There may be error messages posted before this with more information on why the thread was cancelled.
(SQL Server Import and Export Wizard)
Error 0xc0047021: Data Flow Task: SSIS Error Code DTS_E_THREADFAILED. Thread "WorkThread0" has exited with error code 0xC0047039. There may be error messages posted before this with more information on why the thread has exited.
(SQL Server Import and Export Wizard)
My first thought was maybe an issue between the Date data types between Progress and MSSQL, so I have tried TO_CHAR in my statement (tested in ODBC Explorer first) but that didn't resolve it, I've tried everything I can think of including
Using TO_CHAR in the Progress
Select statement
During the data mappings in SSIS; try using Datetime, smalldatetime, nvarchar
etc..
Using TO_CHAR and NVL
Increasing the size of all destination columns to 200 (no columns need more than 50 at current so this is more than enough)
Even removing that Date field from the select statement still produces the same error
Is there anything I have missed? Is it possible that the source data could be incorrect and not supported in SQL Server?
I have found some posts on MSDN suggestion that there could be an issue with data type conversion and there may also be an issue with the overflow of data in Progress columns
This seems to be an intermittent issue, I have other data import jobs from Progress that use dates and there are no issues (and yes, I have cross-referenced all settings to ensure I haven't missed something)
My only option seems to be to move data from Progress > Access (or some other DB) > MS SQL
The Progress DB stores all data as variable length. This often causes problems with databases that expect data to be fixed length. The solution is to run the "dbtool" utility.
dbtool is in the Progress "bin" directory. You want option #2 "SQL Width Scan w/Fix Option".
When in doubt:
Progress --> CSV file --> SSIS --> SQL
Server
I've had good luck using a SQL Linked Server object to connect the Progress Database, via the Microsoft OLE DB Provider for ODBC Drivers. You need to use the OpenQuery object to query the linked server, which looks like:
select MyField, MyOtherField from OpenQuery ([MyLinkedServer],'select MyField, MyOtherField from PUB.My_ProgressTable where dtLastUpdated > {d ''2009-01-31''}')
For the ODBC DSN setting the Default Isolation Level on the Advanced Tab to 'READ UNCOMMITTED'
This is using SQL 2005 against a Progress 10.1B db on a Linux server. Not the most elegant or efficient solution perhaps, but it's been pretty reliable.
Same issue here (INFORMIX 3.81 32 BIT driver via ODBC)
Reason: SSIS fails at empty strings: ''. Maybe it can`t differs it from NULL.
Resolution: instead of:
select col from xxx
put:
select case when col = '' then NULL else col end col from xxx
works for me.