Home > Archive > MS SQL Server > April 2005 > Database stored in .ldf file









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Database stored in .ldf file
Rick A

2005-04-29, 1:23 pm

Problem:

Contractor migrated Great Plains databases to new server (Win2000, SQL2000).

Databases are set up in reverse. Data is stored in .ldf, and log files are
stored in .mdf. Log file(.mdf) out of control and needs to be shrunk. (Know
how to do this)

Can I shrink the logs even though they're in .mdf named files?

Is it ok to leave them alone in the reversed naming convention state?

Can I detach the databases, create a new .mdf, restore the database(.ldf)
from backup to the new .mdf file? If so, do I need to restore the log file
also, or can I start a new one from scratch?

Thanks for the help.








Tibor Karaszi

2005-04-29, 8:23 pm

Name is totally irrelevant to SQL Server, as well as extension. If you feel it is OK, you can keep
the names. One option is to backup, detach (for safety - keep the files somewhere else), and with
restore use the MOVE option to specify new file names. Or possibly only detach, rename files and
attach specifying new correct file names (do this from QA not EM - QA gives you full control over
the parameters used to sp_attach_db procedure).

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www. solidqualitylearning
.com/



"Rick A" <Rick A@discussions.microsoft.com> wrote in message
news:326AE016-3AAE-47B0-B216- E8EA16549B6A@microso
ft.com...
> Problem:
>
> Contractor migrated Great Plains databases to new server (Win2000, SQL2000).
>
> Databases are set up in reverse. Data is stored in .ldf, and log files are
> stored in .mdf. Log file(.mdf) out of control and needs to be shrunk. (Know
> how to do this)
>
> Can I shrink the logs even though they're in .mdf named files?
>
> Is it ok to leave them alone in the reversed naming convention state?
>
> Can I detach the databases, create a new .mdf, restore the database(.ldf)
> from backup to the new .mdf file? If so, do I need to restore the log file
> also, or can I start a new one from scratch?
>
> Thanks for the help.
>
>
>
>
>
>
>
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com