Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / DB Engine / SQL Server / July 2008

Tip: Looking for answers? Try searching our database.

does 'backup log... truncate_only' post all transactions to the mdb

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Roger - 09 Jul 2008 10:26 GMT
backup log db with truncate_only
DBCC SHRINKFILE (db_log, 100) WITH NO_INFOMSGS
backup database db to disk = 'd:\backup\db.bak' with init

does the 'backup log' statement flush all transactions to the db
database ?
and is does the same happens whether it's a 'truncate_only' or 'to a
disk file' ?

assuming no further activity, does the 'backup database' statement
cause all my data to be backed up ?

is it prudent to schedule "backup log db to disk = 'd:\backup\db.trn'
with init" throughout the day, say every hour ?

if so, how can I programatically name the disk file, ie db_1.trn,
db_2.trn, etc ?
or do I just overwrite db_trn ?
Uri Dimant - 09 Jul 2008 12:22 GMT
Roger
> backup log db with truncate_only
> DBCC SHRINKFILE (db_log, 100) WITH NO_INFOMSGS
> backup database db to disk = 'd:\backup\db.bak' with init

Read Tibor's article , I'd just add that  when you backup log file sql
server just writes all committed transactions to the disk to make virtual
logs ( log file  contains /built virtual logs) to be reused ( keep physical
size fo the log)

http://www.karaszi.com/SQLServer/info_restore_no_truncate.asp
http://www.karaszi.com/SQLServer/info_dont_shrink.asp

> is it prudent to schedule "backup log db to disk = 'd:\backup\db.trn'
> with init" throughout the day, say every hour ?

I usually do backup log files with not init option as the .bak contains
fileid to be refernce in restore

> if so, how can I programatically name the disk file, ie db_1.trn,
> db_2.trn, etc ?
> or do I just overwrite db_trn ?

Again Tibor has pretty good examples on his site

> backup log db with truncate_only
> DBCC SHRINKFILE (db_log, 100) WITH NO_INFOMSGS
[quoted text clipped - 14 lines]
> db_2.trn, etc ?
> or do I just overwrite db_trn ?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.