Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MSSQL i Log transakcji

0 views
Skip to first unread message

Replay

unread,
May 2, 2006, 2:34:03 AM5/2/06
to
Witam!

Dzisiaj dostalem takie info od MS SQL-a:
The log file for database '<dbname>' is full
Back up the transaction log for the database to free up some log space..

A wiec odpalilem komende:

backup log <dbname> with truncate_only

pomoglo - bazka dziala ale log dalej zajebisty?
jak zmniejsztc rozmiar loga??

--
Replay

Replay

unread,
May 2, 2006, 2:42:26 AM5/2/06
to
Replay napisał(a):


odpalilem jeszcze dbcc shrinkdatabase(<dbname>, 0) - pomoglo log zmalal

pytanie tylko czy jest mozliwosc przy tego typu operacji utracic dane?

Maciej.

dap

unread,
May 2, 2006, 2:43:34 AM5/2/06
to

Sa dwie opcje (przynajmniej tak bylo w 2000):
-dajesz w opcjach bazy danych autoshrink
-jest komenda bodaj shrink_log i nia recznie zmniejszasz log.
(Nie pamietam skladni, ale - W SQL Query Analyzier piszesz shrink i
naciszkasz shift-F1 a wtedy wyskakuje help do tego slowa i jest juz z
gorki :)).

dap

dap

unread,
May 2, 2006, 2:46:03 AM5/2/06
to

> odpalilem jeszcze dbcc shrinkdatabase(<dbname>, 0) - pomoglo log zmalal
>
> pytanie tylko czy jest mozliwosc przy tego typu operacji utracic dane?

Teoretycznie nie, ale lepiej zrob wczesniej backup.

dap
--
polanski.biz
xoops.pl

Replay

unread,
May 2, 2006, 8:41:40 AM5/2/06
to
po zrobieniu tego:

backup log <dbname> with truncate_only

nie moge znalezc nigdzie backupu logu?
gdzie on to zrzuca jezeli nie ma podanego jawnie miejsca docelowego?


Maciej.

dap

unread,
May 2, 2006, 1:15:19 PM5/2/06
to

Kurcze nie wiem :) Ja zawsze robilem przez GUI, z EM do urzadzenia z
backupem. W razie czegos mozna bylo zobaczyc jakie pliki sa w tym
urzadzeniu.

dap

MaGazynieR

unread,
May 3, 2006, 4:42:16 AM5/3/06
to

Hle hle ... tak to jest jak sie nie chce do manuala zajrzec
naprawde BOL jest niezly ... warto czasem tam zajrzec

BOL => shrinking transaction logs
"Shrinking a log is dependent on first truncating the log. Log truncation
does not reduce the size of a physical log file, it reduces the size of the
logical log and marks as inactive the virtual logs that do not hold any part
of the logical log. A log shrink operation removes enough inactive virtual
logs to reduce the log file to the requested size."

BOL => BACKUP, BACKUP (described)
"NO_LOG | TRUNCATE_ONLY
Removes the inactive part of the log without making a backup copy of it and
truncates the log. This option frees space. Specifying a backup device is
unnecessary because the log backup is not saved. NO_LOG and TRUNCATE_ONLY
are synonyms."

Siemanko
--
MaGazynieR
news (at) magazynier . net

0 new messages