- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2023 10:00 AM
Hey everyone,
I have set up three data sources of type JDBC. I have scheduled three data imports daily at 12am Pacific. Using data sources, I am pulling data from the Azure SQL database from three tables separately.
The problem I am facing is getting this error in the Import log: Could not complete cursor operation because the table schema changed after the cursor was declared. This error only occurs for just one table not for the other two tables while pulling data using data sources.
When this error occurs, the data pulling from Azure stops, and around 3.5 million records are pulled, while there are a total of 4.9 million records in the Azure SQL Database table. This error is also not consistent as it does not occur daily but randomly on some days.
The SQL statement I am running in the data source:
SELECT * FROM <TABLE_NAME>
Kindly help me in solving this error.
Thanks,
Hamza
Solved! Go to Solution.
- 1,392 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 10:27 AM
Hey everyone, I have found a solution to my problem. It's an issue from the Azure Side.
The connection between ServiceNow and Azure SQL Database timeout.
So to counter this, I am running the two data sources at midnight Pacific. The third data source executes at around 12:50 am Pacific.
I am also limiting the data import based on the orders sent in the last 6 months instead of all the orders. Which I achieved through running this specific query:
SELECT * FROM <TABLE_NAME> where ORDER_DATE >= Dateadd(Month, Datediff(Month, 0, DATEADD(m, -6,
current_timestamp)), 0)
This solved my problem. Hopefully, if someone else faces this similar problem, they can solve through this approach.
Regards,
Hamza
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 10:27 AM
Hey everyone, I have found a solution to my problem. It's an issue from the Azure Side.
The connection between ServiceNow and Azure SQL Database timeout.
So to counter this, I am running the two data sources at midnight Pacific. The third data source executes at around 12:50 am Pacific.
I am also limiting the data import based on the orders sent in the last 6 months instead of all the orders. Which I achieved through running this specific query:
SELECT * FROM <TABLE_NAME> where ORDER_DATE >= Dateadd(Month, Datediff(Month, 0, DATEADD(m, -6,
current_timestamp)), 0)
This solved my problem. Hopefully, if someone else faces this similar problem, they can solve through this approach.
Regards,
Hamza