SOLVED

Is it possible to add an index to a read-only database?

Occasional Contributor

I was given a read-only (daily log shipped) copy of our production database (updated daily) to do some special reporting and the report needs to be optimized with a new index. However because the database is read-only I cannot add an index. From the information I have been given they are telling me to add that index to the production database and it will port over. Since this is a production database, I can't so easily do a change like that without getting approvals from the vendor and dba etc. which could be a long time. Can I make that database writeable and add the index with a job perhaps and set it back? Any other workarounds or thoughts would be greatly appreciated!!

1 Reply
best response confirmed by peter_s (Occasional Contributor)
Solution
Simply it is not possible to make indexes on read-only database.
Because it is read-only as it named, a writable operation is not a selectable option.

simple work-around is that you restore one more database for a report and use it for other report too, of-course reported data is only point-in-time of recovered time.

and for original daily log-shipped database just don't touch it unless you can't make maintenance time for creating index.