Showing posts with label copied. Show all posts
Showing posts with label copied. Show all posts

Monday, March 12, 2012

Log file and Restore

I did a backup of a database on server X.
Created the Database on server Y
I copied the backup of server X to server Y and did a restore.
The database is about 50M
The Log file is over 30G.
If I truncate the Log file the Database wont open.
Any Ideas '
Thanks in advanceYou can truncate log with 'backup log ... with
truncate_only' then shrink the log file. And truncate logs
on source server before db full backup can reduce log size.
>--Original Message--
>I did a backup of a database on server X.
>Created the Database on server Y
>I copied the backup of server X to server Y and did a
restore.
>The database is about 50M
>The Log file is over 30G.
>If I truncate the Log file the Database wont open.
>Any Ideas '
>Thanks in advance
>
>
>
>
>.
>|||It sounds as though you do not need or care about the transaction log. =If that is the case you can simply
BACKUP LOG NameOfYourDatabase WITH NO_LOG
GO
DBCC SHRINKFILE ('TheLogFileNameOfYourDatabase', TRUNCATEONLY)
GO
Books Online will contain more information on these topics.
-- Keith
"Jim Campau" <Jim_Campau@.bausch.com> wrote in message =news:eOhDFnbkDHA.2328@.TK2MSFTNGP10.phx.gbl...
> I did a backup of a database on server X.
> Created the Database on server Y
> I copied the backup of server X to server Y and did a restore.
> > The database is about 50M
> The Log file is over 30G.
> If I truncate the Log file the Database wont open.
> > Any Ideas '
> > Thanks in advance
> > > > > > > >