June 1, 2017 at 11:22 am
Hi,
I was wondering if it is possible to attach a Enterprise Edition database to a Developer Edition instance.
I took a SAN snapshot of the production database which is on Enterprise Edition and am attempting to bring up that snapshot to another server (development) that has Developer Edition. These are the errors I'm getting:
Msg 3415, Level 16, State 5, Line 1
Database 'DB_Dev' cannot be upgraded because it is read-only, has read-only files or the user does not have permissions to modify some of the files. Make the database or files writeable, and rerun recovery.
Msg 1813, Level 16, State 2, Line 1
Could not open new database 'DB_Dev'. CREATE DATABASE is aborted.
Honestly, I'm not sure if I'm having permissions issue or what, but then I thought "can I even attach an Enterprise database to a Developer instance"?
Thank you!
June 1, 2017 at 11:57 am
As long as the Developer edition instance is the same version or newer of SQL (IE the production instance is SQL 2012 and the Dev is SQL2014 is OK) they should attach fine.
Based on the error you're getting, I'd lean towards either you're missing one or more database files or the SQL Server service account on your dev instance doesn't have permissions to the locations the files are in.
June 1, 2017 at 12:07 pm
Thank you!
They're both the same product (SQL Server 2016), but the Developer Edition is running SP1 CU3 whereas the Enterprise Edition is a couple of CUs behind. So I guess that means that the database should attach fine.
So I guess it's a permissions thing. Argh. I'm so frustrated.
June 2, 2017 at 7:15 am
check the service account on the new server has sufficient ACLs to the database files
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
June 2, 2017 at 9:12 am
Is the database still online on the Enterprise Edition server? Is the database, or any of its filegroups, read-only?
John
June 2, 2017 at 11:38 am
Speak to the SAN admin?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
June 3, 2017 at 5:45 pm
Also check the file properties on both the data and log files to ensure they're not read-only. If they're read-only because of the SAN snapshot and you don't have permissions to change them, then Gail has the end-all: speak to the SAN admin.
You could also try restoring from a full backup taken from production.
June 5, 2017 at 4:35 am
dajonx - Friday, June 2, 2017 8:57 AMIs it my account? SQL Server service account? sa account?
The account sql server instance runs under will need ACLs on the folders and files
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
June 5, 2017 at 8:27 am
Haha! I'm the admin of all infrastructure stuff... If I asked myself, I would've said: ¯\_(?)_/¯
So I figured it out! It wasn't a permissions issue. It was a disk issue.
I originally typed this in diskpart:
attributes volume clear readonly
attributes volume clear hidden
But I needed to run this command as well:
attributes disk clear readonly
And now I am able to attach the database. I made sure that that one command was the resolution by redoing the whole snapshot/attach process without fiddling with permissions.
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply