2 Qs: DB Shrink and Agent step

From: AY (AY_xu_at_yahoo.com)
Date: 10/07/04


Date: Thu, 07 Oct 2004 00:42:43 -0700

Environment: SQL Server 2000

Q1: shrinking transaction log
db size 800 MB, db_log size 7 GB, db recovery model set to "Full". Steps
to shrinking:
1. backup log file with successfully, command: backup log db to
disk_devie
2. truncate log file, command: backup log db with TRUNCATE_ONLY
Result: db_log size still 7 GB, not shrink. Why?

Q2: SQL Server Agent only runs step 1
I created one job with two steps, step 1: backup db to local file
system, step 2: copy db file to network share using xp_cmdshell. All
step commands run successfully from Query Analyzer. Error log output to
a file.
Result: step 1 runs successfully. step 2 not run, even no error
messengers write to log file.

TIA for any help.
Zuoyin from Shanghai/China

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Relevant Pages

  • Re: Unable to attach the database
    ... BUT NEVER DELETE A LOG FILE! ... If you have a clean backup of the database, ... good understanding of SQL Server and how to work from this situation. ...
    (comp.databases.ms-sqlserver)
  • Re: Transaction Log Failure
    ... A maintenance plan can not create a log file, ... then bring up sql server. ... > maintenance plan that would create a transaction log file every hour. ... > 2004-12-14 21:00:43.51 backup BACKUP failed to complete the command ...
    (microsoft.public.sqlserver.server)
  • Re: Huge log file - 500 MB Data, 7 GB Log file
    ... Just make sure that you do regular t-log backups or that you set the ... Shrinking the Transaction Log in SQL Server 2000 with DBCC SHRINKFILE ... Log File Grows too big ...
    (microsoft.public.sqlserver.server)
  • Re: suitable plan for Log backup
    ... transactions since the last log backup... ... To reduce the risk backup the log ... I support the Professional Association of SQL Server and it's community of SQL Server professionals. ... after backup the size of log file does not decrease. ...
    (microsoft.public.sqlserver.server)
  • Re: SQL Server Transaction Log
    ... BACKUP LOG databasename WITH TRUNCATE_ONLY ... SQL Server MVP ... > truncate_only option but no change in the log file size. ...
    (microsoft.public.sqlserver.server)

Loading