Cannot update. Database or object is read only SSIS

sujith kumar matharasi 351 Reputation points
2021-04-01T18:45:44.003+00:00

Hi ,

I have an SSIS Package which loads the data from Excel file into OLE DB Destination(SQL Server).If I run the package regularly by just selecting the file as a source and it runs fine however my requirement is to grab a latest file everyday and load it.

I create a script task which runs fine and gets the latest file out of it, I have 2 variables to store the folder name & file name in it and when I try to change the excel source connection to run dynamically from the variables I get the following error:

"Cannot update. Database or object is read only"

I am not sure why this error occurs, I have a similar package which runs from picking up a file from the same location and load into the same server which runs fine however its just this one that fails.

I tried changing the Excel connection string to add : IMEX=1 which throws another error saying "Could not find installable ISAM"

Can someone please let me know if there is something I am missing here which is causing this issue?

Thanks

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,703 questions
0 comments No comments
{count} votes

Accepted answer
  1. sujith kumar matharasi 351 Reputation points
    2021-04-02T12:13:46.473+00:00

    I just changed the Delay Validation = True for the package and it ran fine, I guess the issue it was trying to validate everytime and failing so once I changed it it started running fine.


1 additional answer

Sort by: Most helpful
  1. Monalv-MSFT 5,926 Reputation points
    2021-04-02T02:51:20.31+00:00

    Hi @sujith kumar matharasi ,

    Please set ReadOnly=0 in the Excel Connection String.

    Hope the following links will be helpful:
    1.Specify ReadOnly using Microsoft Excel ODBC Driver
    2.Working with Excel Files with the Script Task

    Best regards,
    Mona

    ----------

    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.