Cancel the job using the Process Info under Current
Activity.
Have a look and see if there are any error messages being
generated in the SQL Server Logs, then try again.
Peter
"Never ascribe to malice, that which can be explained by
incompetence."
Napoleon
>--Original Message--
>Hi,
>I run a scheduled transaction log job back up serval
database's log
>everyday, it was fine before, however, today, one of jobs
seems can not stop
>running. Checked no deadlock process, checked log file in
disk, only two
>database can not finish. using dbcc opentran, no active
tran. change those
>two database to another job, same thing happening, What
could I do?
>Any help would be appreciated.
>Cheers
>Yifei
>
>.
>
Hi Peter,
Thank you for reply, I do cancel the job and restart it again, the problem
still exist.
Actually I restart sql server, it's been fixed.
But, it looks strange.
Yifei
"Peter The Spate" <anonymous@.discussions.microsoft.com> wrote in message
news:18a901c51b1f$feb702f0$a601280a@.phx.gbl...[vbcol=seagreen]
> Cancel the job using the Process Info under Current
> Activity.
> Have a look and see if there are any error messages being
> generated in the SQL Server Logs, then try again.
> Peter
> "Never ascribe to malice, that which can be explained by
> incompetence."
> Napoleon
>
> database's log
> seems can not stop
> disk, only two
> tran. change those
> could I do?
Showing posts with label transaction. Show all posts
Showing posts with label transaction. Show all posts
Friday, March 23, 2012
Scheduled transaction log backup never finish
Cancel the job using the Process Info under Current
Activity.
Have a look and see if there are any error messages being
generated in the SQL Server Logs, then try again.
Peter
"Never ascribe to malice, that which can be explained by
incompetence."
Napoleon
>--Original Message--
>Hi,
>I run a scheduled transaction log job back up serval
database's log
>everyday, it was fine before, however, today, one of jobs
seems can not stop
>running. Checked no deadlock process, checked log file in
disk, only two
>database can not finish. using dbcc opentran, no active
tran. change those
>two database to another job, same thing happening, What
could I do?
>Any help would be appreciated.
>Cheers
>Yifei
>
>.
>Hi Peter,
Thank you for reply, I do cancel the job and restart it again, the problem
still exist.
Actually I restart sql server, it's been fixed.
But, it looks strange.
Yifei
"Peter The Spate" <anonymous@.discussions.microsoft.com> wrote in message
news:18a901c51b1f$feb702f0$a601280a@.phx.gbl...[vbcol=seagreen]
> Cancel the job using the Process Info under Current
> Activity.
> Have a look and see if there are any error messages being
> generated in the SQL Server Logs, then try again.
> Peter
> "Never ascribe to malice, that which can be explained by
> incompetence."
> Napoleon
>
>
> database's log
> seems can not stop
> disk, only two
> tran. change those
> could I do?
Activity.
Have a look and see if there are any error messages being
generated in the SQL Server Logs, then try again.
Peter
"Never ascribe to malice, that which can be explained by
incompetence."
Napoleon
>--Original Message--
>Hi,
>I run a scheduled transaction log job back up serval
database's log
>everyday, it was fine before, however, today, one of jobs
seems can not stop
>running. Checked no deadlock process, checked log file in
disk, only two
>database can not finish. using dbcc opentran, no active
tran. change those
>two database to another job, same thing happening, What
could I do?
>Any help would be appreciated.
>Cheers
>Yifei
>
>.
>Hi Peter,
Thank you for reply, I do cancel the job and restart it again, the problem
still exist.
Actually I restart sql server, it's been fixed.
But, it looks strange.
Yifei
"Peter The Spate" <anonymous@.discussions.microsoft.com> wrote in message
news:18a901c51b1f$feb702f0$a601280a@.phx.gbl...[vbcol=seagreen]
> Cancel the job using the Process Info under Current
> Activity.
> Have a look and see if there are any error messages being
> generated in the SQL Server Logs, then try again.
> Peter
> "Never ascribe to malice, that which can be explained by
> incompetence."
> Napoleon
>
>
> database's log
> seems can not stop
> disk, only two
> tran. change those
> could I do?
Scheduled transaction log backup never finish
Hi,
I run a scheduled transaction log job back up serval database's log
everyday, it was fine before, however, today, one of jobs seems can not stop
running. Checked no deadlock process, checked log file in disk, only two
database can not finish. using dbcc opentran, no active tran. change those
two database to another job, same thing happening, What could I do?
Any help would be appreciated.
Cheers
YifeiCancel the job using the Process Info under Current
Activity.
Have a look and see if there are any error messages being
generated in the SQL Server Logs, then try again.
Peter
"Never ascribe to malice, that which can be explained by
incompetence."
Napoleon
>--Original Message--
>Hi,
>I run a scheduled transaction log job back up serval
database's log
>everyday, it was fine before, however, today, one of jobs
seems can not stop
>running. Checked no deadlock process, checked log file in
disk, only two
>database can not finish. using dbcc opentran, no active
tran. change those
>two database to another job, same thing happening, What
could I do?
>Any help would be appreciated.
>Cheers
>Yifei
>
>.
>|||Hi Peter,
Thank you for reply, I do cancel the job and restart it again, the problem
still exist.
Actually I restart sql server, it's been fixed.
But, it looks strange.
Yifei
"Peter The Spate" <anonymous@.discussions.microsoft.com> wrote in message
news:18a901c51b1f$feb702f0$a601280a@.phx.gbl...
> Cancel the job using the Process Info under Current
> Activity.
> Have a look and see if there are any error messages being
> generated in the SQL Server Logs, then try again.
> Peter
> "Never ascribe to malice, that which can be explained by
> incompetence."
> Napoleon
>
> >--Original Message--
> >Hi,
> >
> >I run a scheduled transaction log job back up serval
> database's log
> >everyday, it was fine before, however, today, one of jobs
> seems can not stop
> >running. Checked no deadlock process, checked log file in
> disk, only two
> >database can not finish. using dbcc opentran, no active
> tran. change those
> >two database to another job, same thing happening, What
> could I do?
> >
> >Any help would be appreciated.
> >
> >Cheers
> >
> >Yifei
> >
> >
> >
> >.
> >
I run a scheduled transaction log job back up serval database's log
everyday, it was fine before, however, today, one of jobs seems can not stop
running. Checked no deadlock process, checked log file in disk, only two
database can not finish. using dbcc opentran, no active tran. change those
two database to another job, same thing happening, What could I do?
Any help would be appreciated.
Cheers
YifeiCancel the job using the Process Info under Current
Activity.
Have a look and see if there are any error messages being
generated in the SQL Server Logs, then try again.
Peter
"Never ascribe to malice, that which can be explained by
incompetence."
Napoleon
>--Original Message--
>Hi,
>I run a scheduled transaction log job back up serval
database's log
>everyday, it was fine before, however, today, one of jobs
seems can not stop
>running. Checked no deadlock process, checked log file in
disk, only two
>database can not finish. using dbcc opentran, no active
tran. change those
>two database to another job, same thing happening, What
could I do?
>Any help would be appreciated.
>Cheers
>Yifei
>
>.
>|||Hi Peter,
Thank you for reply, I do cancel the job and restart it again, the problem
still exist.
Actually I restart sql server, it's been fixed.
But, it looks strange.
Yifei
"Peter The Spate" <anonymous@.discussions.microsoft.com> wrote in message
news:18a901c51b1f$feb702f0$a601280a@.phx.gbl...
> Cancel the job using the Process Info under Current
> Activity.
> Have a look and see if there are any error messages being
> generated in the SQL Server Logs, then try again.
> Peter
> "Never ascribe to malice, that which can be explained by
> incompetence."
> Napoleon
>
> >--Original Message--
> >Hi,
> >
> >I run a scheduled transaction log job back up serval
> database's log
> >everyday, it was fine before, however, today, one of jobs
> seems can not stop
> >running. Checked no deadlock process, checked log file in
> disk, only two
> >database can not finish. using dbcc opentran, no active
> tran. change those
> >two database to another job, same thing happening, What
> could I do?
> >
> >Any help would be appreciated.
> >
> >Cheers
> >
> >Yifei
> >
> >
> >
> >.
> >
Scheduled transaction log backup Failed
Hi Greeting,
Sql sever7
OS winNT
We have scheduled transaction log backup for user database to run every one hour. Now the transaction has failed. it gives out put
[12] Database oas: Delete Old Backup Files...
Unable to delete file E:\mssql7\tlogs\oas\oas_tlog_200608111300.TRN. 0 file(s) deleted.
When we try to delete the file manully, we get alert message "can not delelte the file as it is in use."
Please suggest how to solve this.
Awating for reply
Thanks in Advance
AdilSome other process is holding on to the file and won't let go. NetBackup is notorious for that sort of thing, as are other applications. You can:
1. Reboot the server
2. Kill the process holding on to the file.
There is a nice little windows utility called ProcessExplorer (http://www.sysinternals.com/Utilities/ProcessExplorer.html)
that will let you find the process holding the handle (file) and then kill the process.sql
Sql sever7
OS winNT
We have scheduled transaction log backup for user database to run every one hour. Now the transaction has failed. it gives out put
[12] Database oas: Delete Old Backup Files...
Unable to delete file E:\mssql7\tlogs\oas\oas_tlog_200608111300.TRN. 0 file(s) deleted.
When we try to delete the file manully, we get alert message "can not delelte the file as it is in use."
Please suggest how to solve this.
Awating for reply
Thanks in Advance
AdilSome other process is holding on to the file and won't let go. NetBackup is notorious for that sort of thing, as are other applications. You can:
1. Reboot the server
2. Kill the process holding on to the file.
There is a nice little windows utility called ProcessExplorer (http://www.sysinternals.com/Utilities/ProcessExplorer.html)
that will let you find the process holding the handle (file) and then kill the process.sql
Scheduled Tasks on Windows 2000/2003
I'm trying to use scheduled tasks to copy over transaction logs from one server to another.
Can I schedule a task to run hourly? I have it set to repeat the task every hour, but it's not working. It does it once and then the next run date is tomorrow.
Please let me know if I'm missing something.
Thanks
Susan
Figured it out..
I had the repeat task selected, but had the duration at an hour and a half.
Once I modified the duration to 24 hours it worked great!!
Thanks
Susan
Friday, March 9, 2012
Scheduled Backup Jobs Failing Sporadically
I have 2 types of SQL Server backup jobs that keep failing
sporadically. There are nightly full backups that fail and
there are hourly Transaction Log backups that fail
sporadically as well.
The nightly backups are scheduled for 2:00 a.m. I've just
changed the times and staggered them seconds apart. The
hourly Tlog backups run every hour during the day time.
The only error message I can find is:
Executed as user: KYEANTD\SQLAdmin. sqlmaint.exe failed.
[SQLSTATE 42000] (Error 22029). The step failed.Executed
as user: KYEANTD\SQLAdmin. sqlmaint.exe failed. [SQLSTATE
42000] (Error 22029). The step failed.
When a job fails I run it manually and the backup works.
These failures are only occuring on SQL Server 2000 SP3You need to specify a report file for your maint plan and look for error messages in that.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Kelly" <anonymous@.discussions.microsoft.com> wrote in message
news:046401c3c4e4$5e556c30$a301280a@.phx.gbl...
> I have 2 types of SQL Server backup jobs that keep failing
> sporadically. There are nightly full backups that fail and
> there are hourly Transaction Log backups that fail
> sporadically as well.
> The nightly backups are scheduled for 2:00 a.m. I've just
> changed the times and staggered them seconds apart. The
> hourly Tlog backups run every hour during the day time.
> The only error message I can find is:
> Executed as user: KYEANTD\SQLAdmin. sqlmaint.exe failed.
> [SQLSTATE 42000] (Error 22029). The step failed.Executed
> as user: KYEANTD\SQLAdmin. sqlmaint.exe failed. [SQLSTATE
> 42000] (Error 22029). The step failed.
> When a job fails I run it manually and the backup works.
> These failures are only occuring on SQL Server 2000 SP3|||I've found this error message:
Microsoft (R) SQLMaint Utility (Unicode), Version
[Microsoft SQL-DMO (ODBC SQLState: HYT00)] Error 0:
[Microsoft][ODBC SQL Server Driver]Timeout expired
>--Original Message--
>I have 2 types of SQL Server backup jobs that keep
failing
>sporadically. There are nightly full backups that fail
and
>there are hourly Transaction Log backups that fail
>sporadically as well.
>The nightly backups are scheduled for 2:00 a.m. I've just
>changed the times and staggered them seconds apart. The
>hourly Tlog backups run every hour during the day time.
>The only error message I can find is:
>Executed as user: KYEANTD\SQLAdmin. sqlmaint.exe failed.
>[SQLSTATE 42000] (Error 22029). The step failed.Executed
>as user: KYEANTD\SQLAdmin. sqlmaint.exe failed. [SQLSTATE
>42000] (Error 22029). The step failed.
>When a job fails I run it manually and the backup works.
>These failures are only occuring on SQL Server 2000 SP3
>.
>|||In the past I have found that SQLState42000 usually ment
the server was waiting on resources.
>--Original Message--
>I have 2 types of SQL Server backup jobs that keep
failing
>sporadically. There are nightly full backups that fail
and
>there are hourly Transaction Log backups that fail
>sporadically as well.
>The nightly backups are scheduled for 2:00 a.m. I've just
>changed the times and staggered them seconds apart. The
>hourly Tlog backups run every hour during the day time.
>The only error message I can find is:
>Executed as user: KYEANTD\SQLAdmin. sqlmaint.exe failed.
>[SQLSTATE 42000] (Error 22029). The step failed.Executed
>as user: KYEANTD\SQLAdmin. sqlmaint.exe failed. [SQLSTATE
>42000] (Error 22029). The step failed.
>When a job fails I run it manually and the backup works.
>These failures are only occuring on SQL Server 2000 SP3
>.
>|||Seems like sqlmaint.exe get a timeout during some operation. I can't say why that is, if it is a
long running backup (how big db, do you do backup to network) or some other operation...
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
<anonymous@.discussions.microsoft.com> wrote in message
news:087701c3c57a$f6760ec0$a401280a@.phx.gbl...
> I've found this error message:
> Microsoft (R) SQLMaint Utility (Unicode), Version
> [Microsoft SQL-DMO (ODBC SQLState: HYT00)] Error 0:
> [Microsoft][ODBC SQL Server Driver]Timeout expired
>
> >--Original Message--
> >I have 2 types of SQL Server backup jobs that keep
> failing
> >sporadically. There are nightly full backups that fail
> and
> >there are hourly Transaction Log backups that fail
> >sporadically as well.
> >
> >The nightly backups are scheduled for 2:00 a.m. I've just
> >changed the times and staggered them seconds apart. The
> >hourly Tlog backups run every hour during the day time.
> >The only error message I can find is:
> >
> >Executed as user: KYEANTD\SQLAdmin. sqlmaint.exe failed.
> >[SQLSTATE 42000] (Error 22029). The step failed.Executed
> >as user: KYEANTD\SQLAdmin. sqlmaint.exe failed. [SQLSTATE
> >42000] (Error 22029). The step failed.
> >
> >When a job fails I run it manually and the backup works.
> >These failures are only occuring on SQL Server 2000 SP3
> >.
> >
sporadically. There are nightly full backups that fail and
there are hourly Transaction Log backups that fail
sporadically as well.
The nightly backups are scheduled for 2:00 a.m. I've just
changed the times and staggered them seconds apart. The
hourly Tlog backups run every hour during the day time.
The only error message I can find is:
Executed as user: KYEANTD\SQLAdmin. sqlmaint.exe failed.
[SQLSTATE 42000] (Error 22029). The step failed.Executed
as user: KYEANTD\SQLAdmin. sqlmaint.exe failed. [SQLSTATE
42000] (Error 22029). The step failed.
When a job fails I run it manually and the backup works.
These failures are only occuring on SQL Server 2000 SP3You need to specify a report file for your maint plan and look for error messages in that.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Kelly" <anonymous@.discussions.microsoft.com> wrote in message
news:046401c3c4e4$5e556c30$a301280a@.phx.gbl...
> I have 2 types of SQL Server backup jobs that keep failing
> sporadically. There are nightly full backups that fail and
> there are hourly Transaction Log backups that fail
> sporadically as well.
> The nightly backups are scheduled for 2:00 a.m. I've just
> changed the times and staggered them seconds apart. The
> hourly Tlog backups run every hour during the day time.
> The only error message I can find is:
> Executed as user: KYEANTD\SQLAdmin. sqlmaint.exe failed.
> [SQLSTATE 42000] (Error 22029). The step failed.Executed
> as user: KYEANTD\SQLAdmin. sqlmaint.exe failed. [SQLSTATE
> 42000] (Error 22029). The step failed.
> When a job fails I run it manually and the backup works.
> These failures are only occuring on SQL Server 2000 SP3|||I've found this error message:
Microsoft (R) SQLMaint Utility (Unicode), Version
[Microsoft SQL-DMO (ODBC SQLState: HYT00)] Error 0:
[Microsoft][ODBC SQL Server Driver]Timeout expired
>--Original Message--
>I have 2 types of SQL Server backup jobs that keep
failing
>sporadically. There are nightly full backups that fail
and
>there are hourly Transaction Log backups that fail
>sporadically as well.
>The nightly backups are scheduled for 2:00 a.m. I've just
>changed the times and staggered them seconds apart. The
>hourly Tlog backups run every hour during the day time.
>The only error message I can find is:
>Executed as user: KYEANTD\SQLAdmin. sqlmaint.exe failed.
>[SQLSTATE 42000] (Error 22029). The step failed.Executed
>as user: KYEANTD\SQLAdmin. sqlmaint.exe failed. [SQLSTATE
>42000] (Error 22029). The step failed.
>When a job fails I run it manually and the backup works.
>These failures are only occuring on SQL Server 2000 SP3
>.
>|||In the past I have found that SQLState42000 usually ment
the server was waiting on resources.
>--Original Message--
>I have 2 types of SQL Server backup jobs that keep
failing
>sporadically. There are nightly full backups that fail
and
>there are hourly Transaction Log backups that fail
>sporadically as well.
>The nightly backups are scheduled for 2:00 a.m. I've just
>changed the times and staggered them seconds apart. The
>hourly Tlog backups run every hour during the day time.
>The only error message I can find is:
>Executed as user: KYEANTD\SQLAdmin. sqlmaint.exe failed.
>[SQLSTATE 42000] (Error 22029). The step failed.Executed
>as user: KYEANTD\SQLAdmin. sqlmaint.exe failed. [SQLSTATE
>42000] (Error 22029). The step failed.
>When a job fails I run it manually and the backup works.
>These failures are only occuring on SQL Server 2000 SP3
>.
>|||Seems like sqlmaint.exe get a timeout during some operation. I can't say why that is, if it is a
long running backup (how big db, do you do backup to network) or some other operation...
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
<anonymous@.discussions.microsoft.com> wrote in message
news:087701c3c57a$f6760ec0$a401280a@.phx.gbl...
> I've found this error message:
> Microsoft (R) SQLMaint Utility (Unicode), Version
> [Microsoft SQL-DMO (ODBC SQLState: HYT00)] Error 0:
> [Microsoft][ODBC SQL Server Driver]Timeout expired
>
> >--Original Message--
> >I have 2 types of SQL Server backup jobs that keep
> failing
> >sporadically. There are nightly full backups that fail
> and
> >there are hourly Transaction Log backups that fail
> >sporadically as well.
> >
> >The nightly backups are scheduled for 2:00 a.m. I've just
> >changed the times and staggered them seconds apart. The
> >hourly Tlog backups run every hour during the day time.
> >The only error message I can find is:
> >
> >Executed as user: KYEANTD\SQLAdmin. sqlmaint.exe failed.
> >[SQLSTATE 42000] (Error 22029). The step failed.Executed
> >as user: KYEANTD\SQLAdmin. sqlmaint.exe failed. [SQLSTATE
> >42000] (Error 22029). The step failed.
> >
> >When a job fails I run it manually and the backup works.
> >These failures are only occuring on SQL Server 2000 SP3
> >.
> >
Wednesday, March 7, 2012
Schedule job, SP and DTS transaction problem
Hi all,
I have a DTS to export a CSV and a SP to call the DTS and schedule the SP to
execute.
My problem is that the DTS have been blocked by the schedule job.
Here are those program:
DTS sql:
exec sp_GetResultForExportCSV
SP:
CREATE PROCEDURE sp_DayEnd
AS
-- insert ...
-- update ...
-- call DTS
EXEC('master.dbo.xp_cmdShell ''DTSRun /~Z0xE6FEF651097....'',
no_output')
Return
Schedule sql:
Begin tran
exec sp_DayEnd
commit tran
If i remove the begin tran, the schedule run successfully. But is it not
possible to have begin tran?
And I have tried the transaction setting of the DTS properties(transaction
on/off, read uncommitted, etc...), all doesn't work with 'Begin tran'. The
DTS always block when running the DTS sql (exec sp_GetResultForExportCSV). I
think the SP and xp_cmdShell DTSRun is not executed within the same
transaction, is it the limitation?
Thanks in advance!
MartinHi,
why you do the Begin and Commit in Schedule sql? not in sp_DayEnd.
I guess since the insert and update have not been commited yet and they
are requiring exclusive lock on the reords, in the same SP, you are trying t
o
export data from the tables that are being locked. That may be the reason
why the master..xp_cmdshell is waiting for the lock to be relase which
actually will never happen. I suggest you to put the following in sp_dayEnd
Begin Tran
Insert...
Update...
Commit Tran
Exec 'master..xp_cmdshell xxxxxxxxxxxxxxxxxxxxxxxx'
HTH
Ed
"Atenza" wrote:
> Hi all,
> I have a DTS to export a CSV and a SP to call the DTS and schedule the SP
to
> execute.
> My problem is that the DTS have been blocked by the schedule job.
> Here are those program:
> DTS sql:
> exec sp_GetResultForExportCSV
>
> SP:
> CREATE PROCEDURE sp_DayEnd
> AS
> -- insert ...
> -- update ...
> -- call DTS
> EXEC('master.dbo.xp_cmdShell ''DTSRun /~Z0xE6FEF651097....'',
> no_output')
> Return
>
> Schedule sql:
> Begin tran
> exec sp_DayEnd
> commit tran
>
> If i remove the begin tran, the schedule run successfully. But is it not
> possible to have begin tran?
> And I have tried the transaction setting of the DTS properties(transaction
> on/off, read uncommitted, etc...), all doesn't work with 'Begin tran'. The
> DTS always block when running the DTS sql (exec sp_GetResultForExportCSV).
I
> think the SP and xp_cmdShell DTSRun is not executed within the same
> transaction, is it the limitation?
> Thanks in advance!
> Martin
>
>
I have a DTS to export a CSV and a SP to call the DTS and schedule the SP to
execute.
My problem is that the DTS have been blocked by the schedule job.
Here are those program:
DTS sql:
exec sp_GetResultForExportCSV
SP:
CREATE PROCEDURE sp_DayEnd
AS
-- insert ...
-- update ...
-- call DTS
EXEC('master.dbo.xp_cmdShell ''DTSRun /~Z0xE6FEF651097....'',
no_output')
Return
Schedule sql:
Begin tran
exec sp_DayEnd
commit tran
If i remove the begin tran, the schedule run successfully. But is it not
possible to have begin tran?
And I have tried the transaction setting of the DTS properties(transaction
on/off, read uncommitted, etc...), all doesn't work with 'Begin tran'. The
DTS always block when running the DTS sql (exec sp_GetResultForExportCSV). I
think the SP and xp_cmdShell DTSRun is not executed within the same
transaction, is it the limitation?
Thanks in advance!
MartinHi,
why you do the Begin and Commit in Schedule sql? not in sp_DayEnd.
I guess since the insert and update have not been commited yet and they
are requiring exclusive lock on the reords, in the same SP, you are trying t
o
export data from the tables that are being locked. That may be the reason
why the master..xp_cmdshell is waiting for the lock to be relase which
actually will never happen. I suggest you to put the following in sp_dayEnd
Begin Tran
Insert...
Update...
Commit Tran
Exec 'master..xp_cmdshell xxxxxxxxxxxxxxxxxxxxxxxx'
HTH
Ed
"Atenza" wrote:
> Hi all,
> I have a DTS to export a CSV and a SP to call the DTS and schedule the SP
to
> execute.
> My problem is that the DTS have been blocked by the schedule job.
> Here are those program:
> DTS sql:
> exec sp_GetResultForExportCSV
>
> SP:
> CREATE PROCEDURE sp_DayEnd
> AS
> -- insert ...
> -- update ...
> -- call DTS
> EXEC('master.dbo.xp_cmdShell ''DTSRun /~Z0xE6FEF651097....'',
> no_output')
> Return
>
> Schedule sql:
> Begin tran
> exec sp_DayEnd
> commit tran
>
> If i remove the begin tran, the schedule run successfully. But is it not
> possible to have begin tran?
> And I have tried the transaction setting of the DTS properties(transaction
> on/off, read uncommitted, etc...), all doesn't work with 'Begin tran'. The
> DTS always block when running the DTS sql (exec sp_GetResultForExportCSV).
I
> think the SP and xp_cmdShell DTSRun is not executed within the same
> transaction, is it the limitation?
> Thanks in advance!
> Martin
>
>
Saturday, February 25, 2012
Schedule for Backing up logs
How does one determine a reasonable interval for backing up transaction
logs? For example, we have one small db that is only 1.8GB and the
transaction log is consistently around 1GB even after backup. I suppose I'd
need to add the "truncate" option to make it shrink? We only get really
busy about 1/2 of the week but right now our DBA backs up tlogs once daily
with a full backup weekly. Is this really sufficient?"Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
news:%23j7aO2VaGHA.608@.TK2MSFTNGP02.phx.gbl...
> How does one determine a reasonable interval for backing up transaction
> logs? For example, we have one small db that is only 1.8GB and the
> transaction log is consistently around 1GB even after backup. I suppose
> I'd need to add the "truncate" option to make it shrink? We only get
> really busy about 1/2 of the week but right now our DBA backs up tlogs
> once daily with a full backup weekly. Is this really sufficient?
In case of a disaster is recovering to the beginning of the day acceptable?
In case of a disaster, is the recovery time to restore the weekly full and 5
days of transaction logs acceptable?
David|||Well, that's easy....HELL no and no...
Thanks that was quite simple. Doh
"David Browne" <davidbaxterbrowne no potted meat@.hotmail.com> wrote in
message news:u7N064VaGHA.4936@.TK2MSFTNGP05.phx.gbl...
> "Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
> news:%23j7aO2VaGHA.608@.TK2MSFTNGP02.phx.gbl...
>> How does one determine a reasonable interval for backing up transaction
>> logs? For example, we have one small db that is only 1.8GB and the
>> transaction log is consistently around 1GB even after backup. I suppose
>> I'd need to add the "truncate" option to make it shrink? We only get
>> really busy about 1/2 of the week but right now our DBA backs up tlogs
>> once daily with a full backup weekly. Is this really sufficient?
> In case of a disaster is recovering to the beginning of the day
> acceptable?
> In case of a disaster, is the recovery time to restore the weekly full and
> 5 days of transaction logs acceptable?
> David
>|||"Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
news:%23j7aO2VaGHA.608@.TK2MSFTNGP02.phx.gbl...
> How does one determine a reasonable interval for backing up transaction
> logs? For example, we have one small db that is only 1.8GB and the
> transaction log is consistently around 1GB even after backup. I suppose
I'd
> need to add the "truncate" option to make it shrink?
No, you would need to do a DBCC shrinkfile.
I would highly suggest not to. If your log keeps growing to 1 gb between
backups, that's basically what you need. Leave it at that.
If you keep shrinking it, you run the risk of getting disk level
fragmentation.
> We only get really
> busy about 1/2 of the week but right now our DBA backs up tlogs once daily
> with a full backup weekly. Is this really sufficient?
Depends, what's your disaster recovery plan call for? Can you live with
losing a day's worth of data?
I have one system where we do transaction log backups every 20 minutes,
another we just keep the db in simple mode. Depends on your needs/desires.
>|||This is a multi-part message in MIME format.
--000900060703070102060205
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Well, what's an acceptable data loss window? Whatever it is, that
becomes your new tlog backup frequency. For example, if losing the last
30 minute's worth of data is acceptable (no data loss is desirable but
you've got to be realistic about it) then do transaction log backups
every 30 minutes. That will almost certainly keep the size of the log
file down (or rather it will use less of the log file and so if you're
tight on disk space it'd be OK to shrink it down to cater for about 30
minutes worth of transactions).
If the recovery time of restoring a full backup & up to 5 daily tlogs is
unacceptable then you may want to think about slipping in regular
differentials. For example, if you do a full weekly backup, a daily
differential and half-hourly log backups then the recovery time would be
the time it takes to restore the last full backup, the most recent
differential and every log backup done since then (which would be up to
48 log backups, but they're be much smaller than your current log
backups because they're only 30 minutes worth of changes rather than 24
hours worth of changes). The differentials will make it possible to
essentially skip ahead to a much more recent recovery point without
having to apply all the log backups since the full backup, which will
speed up the recovery time. If that's still too long, then maybe you
should do nightly full backups with the half-hourly log backups (and
maybe even slip in a differential every couple hours).
It's basically just a case of juggling the DB, diff & log backups to
cover your maximum acceptable data loss window and maximum acceptable
recovery time. The more often you do log backups the smaller those log
backups will be and hence the less physical log file you'll need to
store those transactions between log backups.
--
*mike hodgson*
http://sqlnerd.blogspot.com
Tim Greenwood wrote:
>Well, that's easy....HELL no and no...
>Thanks that was quite simple. Doh
>"David Browne" <davidbaxterbrowne no potted meat@.hotmail.com> wrote in
>message news:u7N064VaGHA.4936@.TK2MSFTNGP05.phx.gbl...
>
>>"Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
>>news:%23j7aO2VaGHA.608@.TK2MSFTNGP02.phx.gbl...
>>
>>How does one determine a reasonable interval for backing up transaction
>>logs? For example, we have one small db that is only 1.8GB and the
>>transaction log is consistently around 1GB even after backup. I suppose
>>I'd need to add the "truncate" option to make it shrink? We only get
>>really busy about 1/2 of the week but right now our DBA backs up tlogs
>>once daily with a full backup weekly. Is this really sufficient?
>>
>>In case of a disaster is recovering to the beginning of the day
>>acceptable?
>>In case of a disaster, is the recovery time to restore the weekly full and
>>5 days of transaction logs acceptable?
>>David
>>
>
>
--000900060703070102060205
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>Well, what's an acceptable data loss window? Whatever it is, that
becomes your new tlog backup frequency. For example, if losing the
last 30 minute's worth of data is acceptable (no data loss is desirable
but you've got to be realistic about it) then do transaction log
backups every 30 minutes. That will almost certainly keep the size of
the log file down (or rather it will use less of the log file and so if
you're tight on disk space it'd be OK to shrink it down to cater for
about 30 minutes worth of transactions).<br>
<br>
If the recovery time of restoring a full backup & up to 5 daily
tlogs is unacceptable then you may want to think about slipping in
regular differentials. For example, if you do a full weekly backup, a
daily differential and half-hourly log backups then the recovery time
would be the time it takes to restore the last full backup, the most
recent differential and every log backup done since then (which would
be up to 48 log backups, but they're be much smaller than your current
log backups because they're only 30 minutes worth of changes rather
than 24 hours worth of changes). The differentials will make it
possible to essentially skip ahead to a much more recent recovery point
without having to apply all the log backups since the full backup,
which will speed up the recovery time. If that's still too long, then
maybe you should do nightly full backups with the half-hourly log
backups (and maybe even slip in a differential every couple hours).<br>
<br>
It's basically just a case of juggling the DB, diff & log backups
to cover your maximum acceptable data loss window and maximum
acceptable recovery time. The more often you do log backups the
smaller those log backups will be and hence the less physical log file
you'll need to store those transactions between log backups.<br>
</tt>
<div class="moz-signature">
<title></title>
<meta http-equiv="Content-Type" content="text/html; ">
<p><span lang="en-au"><font face="Tahoma" size="2">--<br>
</font></span> <b><span lang="en-au"><font face="Tahoma" size="2">mike
hodgson</font></span></b><span lang="en-au"><br>
<font face="Tahoma" size="2"><a href="http://links.10026.com/?link=http://sqlnerd.blogspot.com</a></font></span>">http://sqlnerd.blogspot.com">http://sqlnerd.blogspot.com</a></font></span>
</p>
</div>
<br>
<br>
Tim Greenwood wrote:
<blockquote cite="mid%2310nr4WaGHA.4780@.TK2MSFTNGP02.phx.gbl"
type="cite">
<pre wrap="">Well, that's easy....HELL no and no...
Thanks that was quite simple. Doh
"David Browne" <davidbaxterbrowne no potted <a class="moz-txt-link-abbreviated" href="http://links.10026.com/?link=mailto:meat@.hotmail.com">meat@.hotmail.com</a>> wrote in
message <a class="moz-txt-link-freetext" href="http://links.10026.com/?link=news:u7N064VaGHA.4936@.TK2MSFTNGP05.phx.gbl">news:u7N064VaGHA.4936@.TK2MSFTNGP05.phx.gbl</a>...
</pre>
<blockquote type="cite">
<pre wrap="">"Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
<a class="moz-txt-link-freetext" href="http://links.10026.com/?link=news:%23j7aO2VaGHA.608@.TK2MSFTNGP02.phx.gbl">news:%23j7aO2VaGHA.608@.TK2MSFTNGP02.phx.gbl</a>...
</pre>
<blockquote type="cite">
<pre wrap="">How does one determine a reasonable interval for backing up transaction
logs? For example, we have one small db that is only 1.8GB and the
transaction log is consistently around 1GB even after backup. I suppose
I'd need to add the "truncate" option to make it shrink? We only get
really busy about 1/2 of the week but right now our DBA backs up tlogs
once daily with a full backup weekly. Is this really sufficient?
</pre>
</blockquote>
<pre wrap="">In case of a disaster is recovering to the beginning of the day
acceptable?
In case of a disaster, is the recovery time to restore the weekly full and
5 days of transaction logs acceptable?
David
</pre>
</blockquote>
<pre wrap=""><!-->
</pre>
</blockquote>
</body>
</html>
--000900060703070102060205--
logs? For example, we have one small db that is only 1.8GB and the
transaction log is consistently around 1GB even after backup. I suppose I'd
need to add the "truncate" option to make it shrink? We only get really
busy about 1/2 of the week but right now our DBA backs up tlogs once daily
with a full backup weekly. Is this really sufficient?"Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
news:%23j7aO2VaGHA.608@.TK2MSFTNGP02.phx.gbl...
> How does one determine a reasonable interval for backing up transaction
> logs? For example, we have one small db that is only 1.8GB and the
> transaction log is consistently around 1GB even after backup. I suppose
> I'd need to add the "truncate" option to make it shrink? We only get
> really busy about 1/2 of the week but right now our DBA backs up tlogs
> once daily with a full backup weekly. Is this really sufficient?
In case of a disaster is recovering to the beginning of the day acceptable?
In case of a disaster, is the recovery time to restore the weekly full and 5
days of transaction logs acceptable?
David|||Well, that's easy....HELL no and no...
Thanks that was quite simple. Doh
"David Browne" <davidbaxterbrowne no potted meat@.hotmail.com> wrote in
message news:u7N064VaGHA.4936@.TK2MSFTNGP05.phx.gbl...
> "Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
> news:%23j7aO2VaGHA.608@.TK2MSFTNGP02.phx.gbl...
>> How does one determine a reasonable interval for backing up transaction
>> logs? For example, we have one small db that is only 1.8GB and the
>> transaction log is consistently around 1GB even after backup. I suppose
>> I'd need to add the "truncate" option to make it shrink? We only get
>> really busy about 1/2 of the week but right now our DBA backs up tlogs
>> once daily with a full backup weekly. Is this really sufficient?
> In case of a disaster is recovering to the beginning of the day
> acceptable?
> In case of a disaster, is the recovery time to restore the weekly full and
> 5 days of transaction logs acceptable?
> David
>|||"Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
news:%23j7aO2VaGHA.608@.TK2MSFTNGP02.phx.gbl...
> How does one determine a reasonable interval for backing up transaction
> logs? For example, we have one small db that is only 1.8GB and the
> transaction log is consistently around 1GB even after backup. I suppose
I'd
> need to add the "truncate" option to make it shrink?
No, you would need to do a DBCC shrinkfile.
I would highly suggest not to. If your log keeps growing to 1 gb between
backups, that's basically what you need. Leave it at that.
If you keep shrinking it, you run the risk of getting disk level
fragmentation.
> We only get really
> busy about 1/2 of the week but right now our DBA backs up tlogs once daily
> with a full backup weekly. Is this really sufficient?
Depends, what's your disaster recovery plan call for? Can you live with
losing a day's worth of data?
I have one system where we do transaction log backups every 20 minutes,
another we just keep the db in simple mode. Depends on your needs/desires.
>|||This is a multi-part message in MIME format.
--000900060703070102060205
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Well, what's an acceptable data loss window? Whatever it is, that
becomes your new tlog backup frequency. For example, if losing the last
30 minute's worth of data is acceptable (no data loss is desirable but
you've got to be realistic about it) then do transaction log backups
every 30 minutes. That will almost certainly keep the size of the log
file down (or rather it will use less of the log file and so if you're
tight on disk space it'd be OK to shrink it down to cater for about 30
minutes worth of transactions).
If the recovery time of restoring a full backup & up to 5 daily tlogs is
unacceptable then you may want to think about slipping in regular
differentials. For example, if you do a full weekly backup, a daily
differential and half-hourly log backups then the recovery time would be
the time it takes to restore the last full backup, the most recent
differential and every log backup done since then (which would be up to
48 log backups, but they're be much smaller than your current log
backups because they're only 30 minutes worth of changes rather than 24
hours worth of changes). The differentials will make it possible to
essentially skip ahead to a much more recent recovery point without
having to apply all the log backups since the full backup, which will
speed up the recovery time. If that's still too long, then maybe you
should do nightly full backups with the half-hourly log backups (and
maybe even slip in a differential every couple hours).
It's basically just a case of juggling the DB, diff & log backups to
cover your maximum acceptable data loss window and maximum acceptable
recovery time. The more often you do log backups the smaller those log
backups will be and hence the less physical log file you'll need to
store those transactions between log backups.
--
*mike hodgson*
http://sqlnerd.blogspot.com
Tim Greenwood wrote:
>Well, that's easy....HELL no and no...
>Thanks that was quite simple. Doh
>"David Browne" <davidbaxterbrowne no potted meat@.hotmail.com> wrote in
>message news:u7N064VaGHA.4936@.TK2MSFTNGP05.phx.gbl...
>
>>"Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
>>news:%23j7aO2VaGHA.608@.TK2MSFTNGP02.phx.gbl...
>>
>>How does one determine a reasonable interval for backing up transaction
>>logs? For example, we have one small db that is only 1.8GB and the
>>transaction log is consistently around 1GB even after backup. I suppose
>>I'd need to add the "truncate" option to make it shrink? We only get
>>really busy about 1/2 of the week but right now our DBA backs up tlogs
>>once daily with a full backup weekly. Is this really sufficient?
>>
>>In case of a disaster is recovering to the beginning of the day
>>acceptable?
>>In case of a disaster, is the recovery time to restore the weekly full and
>>5 days of transaction logs acceptable?
>>David
>>
>
>
--000900060703070102060205
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>Well, what's an acceptable data loss window? Whatever it is, that
becomes your new tlog backup frequency. For example, if losing the
last 30 minute's worth of data is acceptable (no data loss is desirable
but you've got to be realistic about it) then do transaction log
backups every 30 minutes. That will almost certainly keep the size of
the log file down (or rather it will use less of the log file and so if
you're tight on disk space it'd be OK to shrink it down to cater for
about 30 minutes worth of transactions).<br>
<br>
If the recovery time of restoring a full backup & up to 5 daily
tlogs is unacceptable then you may want to think about slipping in
regular differentials. For example, if you do a full weekly backup, a
daily differential and half-hourly log backups then the recovery time
would be the time it takes to restore the last full backup, the most
recent differential and every log backup done since then (which would
be up to 48 log backups, but they're be much smaller than your current
log backups because they're only 30 minutes worth of changes rather
than 24 hours worth of changes). The differentials will make it
possible to essentially skip ahead to a much more recent recovery point
without having to apply all the log backups since the full backup,
which will speed up the recovery time. If that's still too long, then
maybe you should do nightly full backups with the half-hourly log
backups (and maybe even slip in a differential every couple hours).<br>
<br>
It's basically just a case of juggling the DB, diff & log backups
to cover your maximum acceptable data loss window and maximum
acceptable recovery time. The more often you do log backups the
smaller those log backups will be and hence the less physical log file
you'll need to store those transactions between log backups.<br>
</tt>
<div class="moz-signature">
<title></title>
<meta http-equiv="Content-Type" content="text/html; ">
<p><span lang="en-au"><font face="Tahoma" size="2">--<br>
</font></span> <b><span lang="en-au"><font face="Tahoma" size="2">mike
hodgson</font></span></b><span lang="en-au"><br>
<font face="Tahoma" size="2"><a href="http://links.10026.com/?link=http://sqlnerd.blogspot.com</a></font></span>">http://sqlnerd.blogspot.com">http://sqlnerd.blogspot.com</a></font></span>
</p>
</div>
<br>
<br>
Tim Greenwood wrote:
<blockquote cite="mid%2310nr4WaGHA.4780@.TK2MSFTNGP02.phx.gbl"
type="cite">
<pre wrap="">Well, that's easy....HELL no and no...
Thanks that was quite simple. Doh
"David Browne" <davidbaxterbrowne no potted <a class="moz-txt-link-abbreviated" href="http://links.10026.com/?link=mailto:meat@.hotmail.com">meat@.hotmail.com</a>> wrote in
message <a class="moz-txt-link-freetext" href="http://links.10026.com/?link=news:u7N064VaGHA.4936@.TK2MSFTNGP05.phx.gbl">news:u7N064VaGHA.4936@.TK2MSFTNGP05.phx.gbl</a>...
</pre>
<blockquote type="cite">
<pre wrap="">"Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
<a class="moz-txt-link-freetext" href="http://links.10026.com/?link=news:%23j7aO2VaGHA.608@.TK2MSFTNGP02.phx.gbl">news:%23j7aO2VaGHA.608@.TK2MSFTNGP02.phx.gbl</a>...
</pre>
<blockquote type="cite">
<pre wrap="">How does one determine a reasonable interval for backing up transaction
logs? For example, we have one small db that is only 1.8GB and the
transaction log is consistently around 1GB even after backup. I suppose
I'd need to add the "truncate" option to make it shrink? We only get
really busy about 1/2 of the week but right now our DBA backs up tlogs
once daily with a full backup weekly. Is this really sufficient?
</pre>
</blockquote>
<pre wrap="">In case of a disaster is recovering to the beginning of the day
acceptable?
In case of a disaster, is the recovery time to restore the weekly full and
5 days of transaction logs acceptable?
David
</pre>
</blockquote>
<pre wrap=""><!-->
</pre>
</blockquote>
</body>
</html>
--000900060703070102060205--
Subscribe to:
Posts (Atom)