If I understand you correctly, you cannot move data from one datafile to another with just the alter database command. What are you trying to ultimately accomplish? Are you trying to move the data to another drive?
My english was terrible. I would like to change a Datafile from primary filegroup to a user created filegroup. Is it possible?
Best Regards
quote:Originally posted by nosepicker
If I understand you correctly, you cannot move data from one datafile to another with just the alter database command. What are you trying to ultimately accomplish? Are you trying to move the data to another drive?
I don't think you can move the files from one filegroup to another but you can move the data to different filegroup and delete the file...
1. Add new file to the non primary filegroup (user filegroup) 2. Move the objects to non primary filegroup (user filegroup) 3. Run the dbcc shrinkfile command with EMPTY option 4. Delete the file from primary file group...
Thank you very much! I thought we had another possibility instead of create a new one file in a non default filegroup and that we could just change this file from a filegroup to other one.