Monday, March 12, 2012
move 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.
move server
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.
Friday, March 9, 2012
Move LDF -Has anyone seen this happen?
We have a SQL 2000 (sp3) server with a database that I set up to have the
MDF on D: and the LDF on E:. All was going along fine for several months and
one day the server rebooted. The SQL log says something like "Service is
shutting down due to server shutdown."
When it came back up the LDF File was on D: (in the same folder as the MDF).
The original LDF was gone from E:
The SQL Log doesn't ever say anything like "Recreating LDF in default
location." or any anything else that would explain what happened.
I assume the change happened during the reboot (actually I didn't notice it
until a week and a half later). I am relatively sure no human did anything
that caused the log file to move.
So has anyone seen this happen before.?
TIA
-Dick"DickChristoph" <dchristo101@.yahoo.com> wrote in message
news:hRBbb.19675$pU4.6621@.twister.rdc-kc.rr.com...
> Hi
> We have a SQL 2000 (sp3) server with a database that I set up to have the
> MDF on D: and the LDF on E:. All was going along fine for several months
and
> one day the server rebooted. The SQL log says something like "Service is
> shutting down due to server shutdown."
> When it came back up the LDF File was on D: (in the same folder as the
MDF).
> The original LDF was gone from E:
> The SQL Log doesn't ever say anything like "Recreating LDF in default
> location." or any anything else that would explain what happened.
> I assume the change happened during the reboot (actually I didn't notice
it
> until a week and a half later). I am relatively sure no human did anything
> that caused the log file to move.
> So has anyone seen this happen before.?
Nope.
I can't think of a way it would happen w/o human intervention.
You can check the ERRORLOG files for sp_detachdb (I think they show up
there).
You should have the last 4 and the current one.
> TIA
> -Dick
>
>