PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > ms.sqlserver.server > DBCC Shrinkfile
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
DBCC Shrinkfile

Réponse
 
LinkBack Outils de la discussion
Vieux 16/06/2008, 19h28   #1
R C
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut DBCC Shrinkfile

hi,
i have a database that has a datafile of 40+GB and a log file of 51GB. i
don't need the log file. i tried to do a shrinkfile command and it doesn't
seem to make the file smaller. the command i'm running is:
dbcc shrinkfile ('MA_Log', 1000, TRUNCATEONLY)

please advise how to do this.

thanks,
  Réponse avec citation
Vieux 16/06/2008, 19h51   #2
Tracy McKibben (http://www.realsqlguy.com)
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: DBCC Shrinkfile

On Jun 16, 12:28pm, R C <R...@discussions.microsoft.com> wrote:
> hi,
> i have a database that has a datafile of 40+GB and a log file of 51GB. i
> don't need the log file. i tried to do a shrinkfile command and it doesn't
> seem to make the file smaller. the command i'm running is:
> dbcc shrinkfile ('MA_Log', 1000, TRUNCATEONLY)
>
> please advise how to do this.
>
> thanks,


You probably haven't backed up the log yet. Backing up the
transaction log "flushes out" all of the committed transactions,
freeing up space in the log file, which DBCC SHRINKFILE will then
remove. If you TRULY don't need (think hard about this) the recovery
capabilities that the transaction log provides, you can put the DB
into simple mode. This will automagically flush out the committed
transactions - it does NOT disable or turn off the log file, that's
not possible.
  Réponse avec citation
Vieux 16/06/2008, 22h08   #3
Linchi Shea
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut RE: DBCC Shrinkfile

Also, do a DBCC OPENTRAN inside that database to see if there is any
long-running open tran preventing you from reclaiming the log space.

Linchi

"R C" wrote:

> hi,
> i have a database that has a datafile of 40+GB and a log file of 51GB. i
> don't need the log file. i tried to do a shrinkfile command and it doesn't
> seem to make the file smaller. the command i'm running is:
> dbcc shrinkfile ('MA_Log', 1000, TRUNCATEONLY)
>
> please advise how to do this.
>
> thanks,

  Réponse avec citation
Vieux 17/06/2008, 08h23   #4
Tibor Karaszi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: DBCC Shrinkfile

In addition to the other posts: Some detail on file shrinking:
http://www.karaszi.com/SQLServer/info_dont_shrink.asp

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


"R C" <RC@discussions.microsoft.com> wrote in message
news:A4420B07-4925-4033-B6D4-E2F8520A8012@microsoft.com...
> hi,
> i have a database that has a datafile of 40+GB and a log file of 51GB. i
> don't need the log file. i tried to do a shrinkfile command and it doesn't
> seem to make the file smaller. the command i'm running is:
> dbcc shrinkfile ('MA_Log', 1000, TRUNCATEONLY)
>
> please advise how to do this.
>
> thanks,



  Réponse avec citation
Vieux 17/06/2008, 09h38   #5
vinu
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: DBCC Shrinkfile

Rc

If you don't need the transaction to be recorded, why not set database
recovery option to simple mode. the problem with simple mode is, if you need
to recover your database at any point you may not be able to do it. More
over the your transaction log file size is 11gb more than the datafile size,
which is not good, also this telle me that you never taken a trnsaction log
backup of the database. what i would do is, take trnsaction log back, and
then shrink the transaction log file,



vinu

"R C" <RC@discussions.microsoft.com> wrote in message
news:A4420B07-4925-4033-B6D4-E2F8520A8012@microsoft.com...
> hi,
> i have a database that has a datafile of 40+GB and a log file of 51GB. i
> don't need the log file. i tried to do a shrinkfile command and it
> doesn't
> seem to make the file smaller. the command i'm running is:
> dbcc shrinkfile ('MA_Log', 1000, TRUNCATEONLY)
>
> please advise how to do this.
>
> thanks,



  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 03h54.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,22910 seconds with 13 queries