Hello,
I have a production database that has multiple filegroups and I want to make a backup of this, and restore it to a different server for our development database. I am able to do this, but I want to merge all filegroups into the primary filegroup.
I have done a regular restore, then used the shrinkfile with the emptyfile option and was successful with getting one of the filegroups merged. When I try that on the 2nd file group, I am getting an error that there is not enough space in the file group to complete the emptyfile command.
Is there a way to backup the production database, and then just restore it to development and merge all filegroups during the restore process?
Or am I doing something wrong when trying to merge them manually? I have checked and I do have enough disk space to accomplish this task, so I am not out of disk space.
I also found somebody that suggested making sure there was enough space in the primary filegroup, and to turn off the autogrow option, but again, no luck.
I have searched and searched on this, and it appears that the shrinkfile should work, but nobody has an answer to the space error, although I do not seem to be the only one getting this error.
Any ideas or help would be greatly appreciated.
Thanks in advance.
I have a production database that has multiple filegroups and I want to make a backup of this, and restore it to a different server for our development database. I am able to do this, but I want to merge all filegroups into the primary filegroup.
I have done a regular restore, then used the shrinkfile with the emptyfile option and was successful with getting one of the filegroups merged. When I try that on the 2nd file group, I am getting an error that there is not enough space in the file group to complete the emptyfile command.
Is there a way to backup the production database, and then just restore it to development and merge all filegroups during the restore process?
Or am I doing something wrong when trying to merge them manually? I have checked and I do have enough disk space to accomplish this task, so I am not out of disk space.
I also found somebody that suggested making sure there was enough space in the primary filegroup, and to turn off the autogrow option, but again, no luck.
I have searched and searched on this, and it appears that the shrinkfile should work, but nobody has an answer to the space error, although I do not seem to be the only one getting this error.
Any ideas or help would be greatly appreciated.
Thanks in advance.