This project is read-only.

SQL Express 2008 - ExpressMaint - Windows 2008 no error or backups

Sep 29, 2009 at 12:22 PM

Hi guys,

Great tool, however I'm having an issue on Windows 2008 where the backup won't work when being ran as a scheduled task. It runs perfectly fine under admin normally if I click the batch file myself, however setting the task to run with admin and higher privilages doesn't seem to do anything.

I've opened processmonitor to see what read and writes it is doing but I get nothing. However when I use the same PID in process monitor when running the batch file manually it shows me all activity.

Annoyingly it keeps thinking it has run the batch file successfully because no error is given from expressmaint.

What's going wrong? I can't work it out.

Sep 29, 2009 at 4:34 PM

In the task properties have you checked "Run with highest priviliges" on the main tab? Is a log file produced? I'll fire up a VM and investigate

Sep 29, 2009 at 9:26 PM

Hi Jasper,

Yes I have the task set to run in highest privilages and I have the batch file outputting everything to a text file and I get nothing back from that either.

It really is giving me nothing to work from but clearly not creating the backups.

I'm running the task with the same user as the one I log in with that can run the batch file normally with no issues, so I can't see it is a security issue on the file system.

I ran process monitor to see what the file access was doing, when I ran the batch file manually I had all sorts of access just as expected. However when running the task nothing comes up in process monitor, which leads me to presume it isn't even getting to accessing any files at all?



Sep 30, 2009 at 7:59 AM

Can you give syntax of your batch file? I'm using ExpressMaint also on Windows 2008 Server and it works for me fine. I hade a problem with compact but i've solved it by "Run with highest priviliges". What kind of account are You using in task sheduler? Is this an admin acccount?

Sep 30, 2009 at 9:34 AM

Hi Mrozkarol,

My batch file is using the following syntax:

echo Backing up User DBs
DEL output.txt
expressmaint -S (local)\SQLEXPRESS -D ALL_USER -T DB -R D:\SQLBackups\reports -RU WEEKS -RV 1 -B D:\SQLBackups -BU DAYS -BV 7 -V >output.txt
echo Done

The scheduled task itself is indeed running with highest priority as an admin user. here is a screenshot of the scheduled task showign the priority being set.

Thanks for your help guys.

Sep 30, 2009 at 10:08 AM

Hi Jmaharman,

First thing,  I Have a question: How did You installed SQL Server 2008? Did You select Mixed or only Windows Authentication Mode? I'm not sure, if expressmaint can work without given it a SQL account and it's password. I think You should try to use "-U your_sql_admin_account -P sql_admin_password" switches. Second thing, I don't know if this utility can produce log files with standard switch ">>" or ">".

My batch file looks like this:

echo START %date% %time% >> D:\Backup\WAPRO\WAPRO\daily_backup_log.txt
D:\WA-PRO\expressmaint -S GSTM-SRV01\SQL1 -U user -P user_password
compact /C /S:D:\Backup\WAPRO\WAPRO *.bak >> D:\Backup\WAPRO\WAPRO\compact_log.txt
echo END %date% %time% >> D:\Backup\WAPRO\WAPRO\daily_backup_log.txt

Sep 30, 2009 at 11:36 AM

Mixed mode, just as default I try not to setup users with passwords because I find windows authentication mode easier and securer for most uses.

I've just tried your batch file, literally just changing paths and usernames and it did exactly the same thing. If I run it manually everything works perfectly, if I run it through the scheduled tasks manager it does nothing.

In any older version of windows you can see the batch files that are running when started via scheduled tasks, however in 2008 I can't. Does anyone know of a setting so that I can? That may help shed some light on the issue...




Sep 30, 2009 at 11:42 AM

Hi guys,

I don't think this is an expressmaint issue at all, I've tried to run the batch file with only echo to log and it still doesn't work. I'll keep you posted, if you do have any ideas what may stop me from running a bat file from a scheduled task then please let me know.



Sep 30, 2009 at 12:19 PM

Well even though it had the full path to the batch file it was not running it without the start folder. Once I added that in and tried to run everything it was fine.

Rediculous really, it should give some sort of feedback that it doesn't run the file at all, which should surely be a failed run.

Thanks for your time guys, it turned out I did need a sql user to run the script anyway so your time wasn't completely wasted.



Sep 30, 2009 at 12:22 PM

I'm happy i could help You and it finally works for You.

Nov 3, 2009 at 7:17 AM

hi all,

I seem to be having the same problem where it runs and nothing appears to happen. I also moved it from a win2k3 to a win2k8 server which is when it stopped working. Here's the settings i have on the task:

run whether user is logged on or not
run with highest privileges
Configure for windows vista, win server 2008

Start a program
Program/script: C:\storage\ExpressMaint.exe
add arguments:  -S localhost\sqlexpress -D ALL_USER -T DB -B c:\backup -B d:\backup   -BU days -BV 7 -R d:\backup -RU days -RV 7
start in: c:\storage 

This should basically create subfolders for each user db and keep 7 days worth of backups. It works on the win2k3 server but not on the win2k8 server.

Any ideas whats wrong?


Nov 3, 2009 at 11:06 PM
Edited Nov 3, 2009 at 11:23 PM

Got some additional information now. i tried running it from a command prompt and it crashes as soon as I try to run it with the error that it cant find Microsoft.Sqlserver.SMO, version =

Does expressmaint need specifically the 2005 version of this? Because this is a win2k8 server with sql 2008 on it - i tried installing the 2008 SMO package but it's already installed. I haven't tried installing the 2005 version yet since i wasn't sure if there would be any issues installing it on a server with 2008 already on i t.

and it looks like this post answers my question:

Still have one question though. The post on that blog entry says to install the service pack 2 update 5, but links to service pack 2 update 9 BUT it looks like the newest update is service pack 3 update 4:

So should i install that rather then the sp2 updates?

I tried running expressmaint now (without the update package) and it doesn't crash now but it doesn't work either. Instead of my backup files I get a text file with the message:

Failed to connect to server localhost\sqlexpress.
This SQL Server version (10.0) is not supported.
Expressmaint finished unsuccessfully at 11/3/2009 5:13:34 PM with Return Code(-3)

And now i have it working finally - didn't realize there was a build specific for 2008 now


Jan 17, 2013 at 12:25 PM
Edited Jan 17, 2013 at 1:02 PM


How can i fix error?

This SQL Server version (10.0) is not supported.
Expressmaint finished unsuccessfully 

PM with Return Code(-3)


Is there any version solution? - My sql is 2008.

OS is Windows server 2008 r2