Dump by batch files

KALACHNIKOV Kalach 1 Reputation point
2022-09-06T12:06:08.78+00:00

Hello,

I have a recent problem that I can't solve...

Via batch files (2 per day) I want to dump a database.

The files work well because when I run them my dumps are well created but on the other hand when I want to use the scheduled tasks it does not work, and I cannot find the problem (we had another server with the same version of windows and the same options in scheduled tasks and it worked).

If anyone could give me a hand I would greatly appreciate it.

Cordially

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,297 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. MotoX80 32,326 Reputation points
    2022-09-06T14:34:07.693+00:00

    Configure the scheduled task to execute a .bat file and capture both stdout and stderr to a log file. Add in "dir" commands to verify that the account that the task executes with can see the directories that it is processing.

    https://learn.microsoft.com/en-us/answers/questions/971208/windows-task-scheduler-shows-error-0xe0434352.html

    0 comments No comments

  2. Limitless Technology 39,436 Reputation points
    2022-09-07T07:25:20.543+00:00

    Hello there,

    As this issue is with One server alone it seems like a permission-related error. Some tasks will only run when a certain user is logged on, depending on a task's security options. If a scheduled task does not run when you expect it to run, ensure that the task's security options are set correctly.

    A scheduled task, by default, runs within the security context of the user who scheduled the task and only runs if that user is logged on when the task is triggered. To modify this, change the settings in the Security options section of the General tab when a task's properties are displayed.

    Task Security Context

    https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc722152(v=ws.11)?redirectedfrom=MSDN

    -----------------------------------------------------------------------------------------------------------------------------

    --If the reply is helpful, please Upvote and Accept it as an answer–

    0 comments No comments

  3. KALACHNIKOV Kalach 1 Reputation point
    2022-09-13T07:59:11.013+00:00

    Hello,

    Thanks for yours answers, I use the administrator for tasks whis maximal permission, and tasks can run even though the user is not log...

    240422-tache.png

    I will watch for stdout and stderr.

    0 comments No comments