Solved

SQL 2008 R2 Express Backup run using Task Scheduler

Posted on 2013-05-13
4
500 Views
Last Modified: 2013-05-14
Hello all,

Am trying to automate backup of SQL 2008 R2 Express database.  I have the backup script saved to a file and it runs fine.  I created it by right clicking on the database, Tasks, Back Up, set the location, name, verify, then saved the script to file.   There are only two databases - master and the one I'm trying to backup.  However, I'm having a problem getting the syntax right to automate it using Task Scheduler.

Under the action arguments I have tried all the following with no success...

-S .\EXPRESS -i C:\SQLBU\BUScript.sql
-S .\MSSQLSERVER -i C:\SQLBU\BUScript.sql
-S  \MSSQLSERVER -i C:\SQLBU\BUScript.sql
-S (local)\MSSQLSERVER -i C:\SQLBU\BUScript.sql

The SQMCMD command prompt shows, then disappears, the task stays running, but no backup occurs.

I have this working fine in my test environment, but it actually has a "named instance".  The one I'm trying to backup is using the default Services (MSSQLSERVER).  

Any suggestions?

Thank you!
0
Comment
Question by:normajm400
4 Comments
 
LVL 10

Expert Comment

by:rjanowsky
ID: 39163619
Have a look at this SQLCMD Default Instance or Named Instance thread at a Microsoft SQL-Server forum. I think, that might explain it.
0
 
LVL 35

Expert Comment

by:David Todd
ID: 39163640
Hi,

Try
-S <yourservername> -I C:\SQLBU\BUScript.sql

Default means that there is no instance name, although you will see the MSSQLSERVER used in some contexts.

Regards
  David
0
 
LVL 1

Accepted Solution

by:
micen earned 500 total points
ID: 39164042
Hi.

This works on my express SQL's:

SQlCMD -S Localhost -i C:\SQLBU\BUScript.sql

Regards

Micael
0
 

Author Closing Comment

by:normajm400
ID: 39166152
Perfect!! Thank you very much.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

This is basically a blog post I wrote recently. I've found that SARGability is poorly understood, and since many people don't read blogs, I figured I'd post it here as an article. SARGable is an adjective in SQL that means that an item can be fou…
Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now