SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Changing Datafile from a Filgroup to another
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jhnegrao
Yak Posting Veteran

Brazil
81 Posts

Posted - 03/15/2007 :  15:27:19  Show Profile  Reply with Quote
Anybody knows, if change a specific datafile already created and has been used from a Filegroup to another using ALTER DATABASE sintaxe?

Best Regards

Juliano Horta

jhnegrao
Yak Posting Veteran

Brazil
81 Posts

Posted - 03/16/2007 :  11:01:02  Show Profile  Reply with Quote
Are there any other way to change it? Is it possible?

Thanks
Go to Top of Page

nosepicker
Constraint Violating Yak Guru

USA
366 Posts

Posted - 03/20/2007 :  20:52:12  Show Profile  Reply with Quote
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?
Go to Top of Page

jhnegrao
Yak Posting Veteran

Brazil
81 Posts

Posted - 03/20/2007 :  23:21:16  Show Profile  Reply with Quote
Hello, I'm sorry!

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?


Go to Top of Page

MohammedU
Posting Yak Master

USA
145 Posts

Posted - 03/21/2007 :  01:17:59  Show Profile  Reply with Quote
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...


MohammedU
Go to Top of Page

jhnegrao
Yak Posting Veteran

Brazil
81 Posts

Posted - 03/21/2007 :  09:11:06  Show Profile  Reply with Quote
Hello,

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.

I will do that.

Thanks
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000