Saturday, February 25, 2012

Move database to a different drive

Hi,
Someone installed all the data base on the C: drive, Which is now running
out of space. I need to move them to the D: drive.
I found this http://support.microsoft.com/defaul...kb;en-us;224071
but it unclear if i need to move just my created database or all of the
database.
I really need a step by step instructions if possable - its a windows 2000
box running sql 2000.
thanks
leeyou can detach \ reattach (See SQL Books On Line)
OR you can do a Backup and RESTORE with "MOVE"
Again, see SQL Books On Line
Greg Jackson
PDX, Oregon|||Move whatever databases you need based on space usage requirements. The
article is pretty self-explanatory. You may move one or all of your user
databases.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Lee" <Lee@.discussions.microsoft.com> wrote in message
news:2E6E3840-CBB0-4FBE-BC92-E0B45A3ED4E8@.microsoft.com...
> Hi,
> Someone installed all the data base on the C: drive, Which is now running
> out of space. I need to move them to the D: drive.
> I found this
http://support.microsoft.com/defaul...kb;en-us;224071
> but it unclear if i need to move just my created database or all of the
> database.
> I really need a step by step instructions if possable - its a windows 2000
> box running sql 2000.
> thanks
> lee|||Hi,
1.First,detach your database using
EXEC sp_detach_db '<<dbname>>', 'true'
2. Move your mdf file & ldf file from c: drive to other partition where you
have space. it is recommended to have mdf & ldf on different folder.
3. Once you copied in to appropriate drives then attach your database using
EXEC sp_attach_db @.dbname = N'<<dbname>>',
@.filename1 = N'<<D:\destinationfolder\dbdata.mdf',
@.filename2 = N'<<E:\destinationfolder\dblog.ldf'
after running this scripts you should see your database running fine as
normal.
Best of luck!
S.Lakshminarayanan.
Message posted via http://www.droptable.com

No comments:

Post a Comment