Re: Datenbank verkleinern

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hallo Christian,
direkt hintereinander:

BACKUP LOG dbname WITH TRUNCATE_ONLY
GO
DBCC SHRINKFILE(dbname_log, 2)
GO

ließ aber bitte vorher diesen KB-Artikel!

http://support.microsoft.com/kb/272318/de

.... wenn das nicht funktioniert dann:

Nutzung vom Log anschauen:
DBCC SQLPERF(LOGSPACE);
GO

mit den Werten die Log-File größe ausrechnen und dann:

USE DBNAME
GO
-- Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE DBNAME
SET RECOVERY SIMPLE;
GO
-- Shrink the truncated log file to XXX MB.
DBCC SHRINKFILE (DBName_Log, XXX);
GO
-- Reset the database recovery model.
ALTER DATABASE DBNAME
SET RECOVERY FULL;
GO




--
Ich wünsche Dir einen schönen Tag,

CU
tosc
http://www.insidesql.org
http://www.insidesql.org/blogs/tosc
"Christian Mauerer" <info1@xxxxxxxxxxxxx> schrieb im Newsbeitrag news:%237TaNQavJHA.4648@xxxxxxxxxxxxxxxxxxxxxxx
Hallo,

ich habe eine Datenbank, bei welcher die LDF-Datei 10 GB groß ist.
Und die MDF-Datei hat 200 MB.

Wie kann ich nun die LDF-Datei verkleinern?

Ich habe schon folgendes versucht:
DBCC SHRINKFILE
DBCC SHRINKDATABASE

Doch die LDF-Datei bleibt bei den 10 GB.

Danke.

Gruß Christian



.



Relevant Pages

  • Re: Transaktionslog wird nicht kleiner
    ... -- Truncate the log by changing the database recovery model to SIMPLE. ... ALTER DATABASE DBNAME ...
    (microsoft.public.de.sqlserver)
  • Re: Datenbank verkleinern
    ... BACKUP LOG dbname WITH TRUNCATE_ONLY ... -- Truncate the log by changing the database recovery model to SIMPLE. ...
    (microsoft.public.de.sqlserver)
  • Re: Transaktionslog wird nicht kleiner
    ... -- Truncate the log by changing the database recovery model to SIMPLE. ... ALTER DATABASE DBNAME ...
    (microsoft.public.de.sqlserver)
  • Re: Datenbank verkleinern
    ... BACKUP LOG dbname WITH TRUNCATE_ONLY ... -- Truncate the log by changing the database recovery model to SIMPLE. ...
    (microsoft.public.de.sqlserver)
  • Re: NTDS ISAM DataBase Corruption
    ... Did you tried the recover the corrupted Active Directory process that a gave ... This is brand new IBM Server. ... using symantec livestate recovery. ... Active Directory database is unavailable because it is damaged, ...
    (microsoft.public.windows.server.active_directory)