question

sujithkumarmatharasi-0343 avatar image
0 Votes"
sujithkumarmatharasi-0343 asked Monalv-msft commented

Cannot update. Database or object is read only SSIS

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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

sujithkumarmatharasi-0343 avatar image
0 Votes"
sujithkumarmatharasi-0343 answered Monalv-msft commented

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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @sujithkumarmatharasi-0343 ,

I am glad to hear that you have found the solution.

Welcome to contact us if you have any new issue.

Best regards,
Mona

0 Votes 0 ·
Monalv-msft avatar image
1 Vote"
Monalv-msft answered Monalv-msft edited

Hi @sujithkumarmatharasi-0343 ,

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.





5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.