I have to move SQL Server along with three live databases from 'C' drive which runs out of space to 'E' drive (same server).
I will appreciate any guidance you could provide.
Thank you,
Alan.
Alan,
No need to move the database. Just move the Data and Log files.
Right click on each database and in ALL Tasks detach all of them, then
simply move the .mdf and .ldf files to e:. Then use ATTACH database to
attach them again.
Harman Sahni
Database Administrator
Fareportal Inc.
"Alan" <anonymous@.discussions.microsoft.com> wrote in message
news:F59F19C4-EF00-434C-8A5F-DA8514FC4AD0@.microsoft.com...
> I have to move SQL Server along with three live databases from 'C' drive
which runs out of space to 'E' drive (same server).
> I will appreciate any guidance you could provide.
> Thank you,
> Alan.
Showing posts with label live. Show all posts
Showing posts with label live. Show all posts
Monday, March 12, 2012
move server
I have to move SQL Server along with three live databases from 'C' drive whi
ch runs out of space to 'E' drive (same server).
I will appreciate any guidance you could provide.
Thank you,
Alan.Hi,
I will suggest you to move the MDF and LDF files of these 3 databases to E
drive. Let the SQL server program files be there in C drive.If you need to
move the sql server programs then you need to reinstall SQL server.
How to Move the databases from C drive to E Drive
1. detach the databases
SP_DETACH_DB <dbname1>
go
SP_DETACH_DB <dbname2>
go
SP_DETACH_DB <dbname3>
2. Create a new folder in E drive
3. Move the MDF and LDF files of the database detached in step 1
4. Use attach database command to attach it back to sql server
SP_ATTACH_DB
'dbname1','e:\mssql\data\dbname1.mdf','e:\mssql\data\dbname1.ldf'
go
SP_ATTACH_DB
'dbname2','e:\mssql\data\dbname2.mdf','e:\mssql\data\dbname2.ldf'
go
SP_ATTACH_DB
'dbname3','e:\mssql\data\dbname3.mdf','e:\mssql\data\dbname3.ldf'
Note
Replace the database names and physical file names based on ur requirement.
Thanks
Hari
MCDBA
"Alan" <anonymous@.discussions.microsoft.com> wrote in message
news:F59F19C4-EF00-434C-8A5F-DA8514FC4AD0@.microsoft.com...
> I have to move SQL Server along with three live databases from 'C' drive
which runs out of space to 'E' drive (same server).
> I will appreciate any guidance you could provide.
> Thank you,
> Alan.|||Alan,
No need to move the database. Just move the Data and Log files.
Right click on each database and in ALL Tasks detach all of them, then
simply move the .mdf and .ldf files to e:. Then use ATTACH database to
attach them again.
Harman Sahni
Database Administrator
Fareportal Inc.
"Alan" <anonymous@.discussions.microsoft.com> wrote in message
news:F59F19C4-EF00-434C-8A5F-DA8514FC4AD0@.microsoft.com...
> I have to move SQL Server along with three live databases from 'C' drive
which runs out of space to 'E' drive (same server).
> I will appreciate any guidance you could provide.
> Thank you,
> Alan.
ch runs out of space to 'E' drive (same server).
I will appreciate any guidance you could provide.
Thank you,
Alan.Hi,
I will suggest you to move the MDF and LDF files of these 3 databases to E
drive. Let the SQL server program files be there in C drive.If you need to
move the sql server programs then you need to reinstall SQL server.
How to Move the databases from C drive to E Drive
1. detach the databases
SP_DETACH_DB <dbname1>
go
SP_DETACH_DB <dbname2>
go
SP_DETACH_DB <dbname3>
2. Create a new folder in E drive
3. Move the MDF and LDF files of the database detached in step 1
4. Use attach database command to attach it back to sql server
SP_ATTACH_DB
'dbname1','e:\mssql\data\dbname1.mdf','e:\mssql\data\dbname1.ldf'
go
SP_ATTACH_DB
'dbname2','e:\mssql\data\dbname2.mdf','e:\mssql\data\dbname2.ldf'
go
SP_ATTACH_DB
'dbname3','e:\mssql\data\dbname3.mdf','e:\mssql\data\dbname3.ldf'
Note
Replace the database names and physical file names based on ur requirement.
Thanks
Hari
MCDBA
"Alan" <anonymous@.discussions.microsoft.com> wrote in message
news:F59F19C4-EF00-434C-8A5F-DA8514FC4AD0@.microsoft.com...
> I have to move SQL Server along with three live databases from 'C' drive
which runs out of space to 'E' drive (same server).
> I will appreciate any guidance you could provide.
> Thank you,
> Alan.|||Alan,
No need to move the database. Just move the Data and Log files.
Right click on each database and in ALL Tasks detach all of them, then
simply move the .mdf and .ldf files to e:. Then use ATTACH database to
attach them again.
Harman Sahni
Database Administrator
Fareportal Inc.
"Alan" <anonymous@.discussions.microsoft.com> wrote in message
news:F59F19C4-EF00-434C-8A5F-DA8514FC4AD0@.microsoft.com...
> I have to move SQL Server along with three live databases from 'C' drive
which runs out of space to 'E' drive (same server).
> I will appreciate any guidance you could provide.
> Thank you,
> Alan.
Subscribe to:
Posts (Atom)