Sign In Help
Schneider Electric
HelpSign In
Schneider Electric Exchange
  • Home
  • Collaborate
  • Develop
  • Shop
Home Collaborate Develop Shop Log in or Register Help

Invite a Co-worker

Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel

Invitation Sent

Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
  • Home
  • Collaborate
  • Exchange Community
  • :
  • Knowledge Center
  • :
  • Building Automation Knowledge Base
  • :
  • SQL Express 2005 automatic database backup
Community Menu
  • Forums
    • By Topic
        • EcoStruxure IT
          • EcoStruxure IT forum
        • Industrial Automation
          • Industry Automation and Control Forum
          • Alliance System Integrators Forum
          • Machine Solutions in the Digital Transformation
          • EcoStruxure Automation Expert / IEC 61499 Forum
          • Industrial Edge Computing Forum
          • Level and Pressure Instrumentation Forum
          • Modicon User Group
          • PLC Club Indonesia
          • SEE Automation Club Forum
          • Fabrika ve Makina Otomasyonu Çözümleri
          • Форум по промышленной автоматизации СНГ
        • SCADA & Telemetry Solutions
          • Geo SCADA Expert Forum
          • SCADA and Telemetry Devices Forum
        • Power Distribution IEC
          • Power Distribution and Digital
          • Power Standards & Regulations
          • Paneelbouw & Energie Distributie
        • Power Distribution Softwares
          • EcoStruxure Power Design Forum
          • SEE Electrical Building+ Forum
          • LayoutFAST User Group Forum
        • Wireless Information Network Solutions
          • Instrument Area Network
          • Remote Monitoring
          • Tank Level Monitoring
          • Remote Data Collection
        • Solutions for your Business
          • Solutions for Food & Beverage Forum
          • Solutions for Healthcare Forum
    • By Segment
        • Food & Beverage
          • Solutions for Food & Beverage Forum
        • Healthcare
          • Solutions for Healthcare Forum
      • EcoStruxure IT
        • EcoStruxure IT forum
      • Industrial Automation
        • Industry Automation and Control Forum
        • Alliance System Integrators Forum
        • Machine Solutions in the Digital Transformation
        • EcoStruxure Automation Expert / IEC 61499 Forum
        • Industrial Edge Computing Forum
        • Level and Pressure Instrumentation Forum
        • Modicon User Group
        • PLC Club Indonesia
        • SEE Automation Club Forum
        • Fabrika ve Makina Otomasyonu Çözümleri
        • Форум по промышленной автоматизации СНГ
      • SCADA & Telemetry Solutions
        • Geo SCADA Expert Forum
        • SCADA and Telemetry Devices Forum
      • Power Distribution IEC
        • Power Distribution and Digital
        • Power Standards & Regulations
        • Paneelbouw & Energie Distributie
      • Power Distribution Softwares
        • EcoStruxure Power Design Forum
        • SEE Electrical Building+ Forum
        • LayoutFAST User Group Forum
      • Wireless Information Network Solutions
        • Instrument Area Network
        • Remote Monitoring
        • Tank Level Monitoring
        • Remote Data Collection
      • Solutions for your Business
        • Solutions for Food & Beverage Forum
        • Solutions for Healthcare Forum
      • Food & Beverage
        • Solutions for Food & Beverage Forum
      • Healthcare
        • Solutions for Healthcare Forum
  • Blogs
    • By Topic
        • Industrial Automation
          • Industrial Edge Computing Blog
          • Industry 4.0 Blog
          • Industrie du Futur France
        • SCADA & Telemetry Solutions
          • SCADA and Telemetry Blog
        • Power Distribution IEC
          • Power Events & Webinars
          • Power Foundations Blog
        • Power Distribution NEMA
          • NEMA Power Foundations Blog
        • Power Distribution Softwares
          • EcoStruxure Power Design Blog
          • SEE Electrical Building+ Blog
        • Solutions for your Business
          • Solutions for Food & Beverage Blog
          • Solutions for Healthcare Blog
          • Solutions for Retail Blog
        • Community experts & publishers
          • Publishers Community
    • By Segment
        • Food & Beverage
          • Solutions for Food & Beverage Blog
        • Healthcare
          • Solutions for Healthcare Blog
        • Retail
          • Solutions for Retail Blog
      • Industrial Automation
        • Industrial Edge Computing Blog
        • Industry 4.0 Blog
        • Industrie du Futur France
      • SCADA & Telemetry Solutions
        • SCADA and Telemetry Blog
      • Power Distribution IEC
        • Power Events & Webinars
        • Power Foundations Blog
      • Power Distribution NEMA
        • NEMA Power Foundations Blog
      • Power Distribution Softwares
        • EcoStruxure Power Design Blog
        • SEE Electrical Building+ Blog
      • Solutions for your Business
        • Solutions for Food & Beverage Blog
        • Solutions for Healthcare Blog
        • Solutions for Retail Blog
      • Community experts & publishers
        • Publishers Community
      • Food & Beverage
        • Solutions for Food & Beverage Blog
      • Healthcare
        • Solutions for Healthcare Blog
      • Retail
        • Solutions for Retail Blog
  • Ideas
        • Industrial Automation
          • Modicon Ideas & new features
        • SCADA & Telemetry Solutions
          • Geo SCADA Expert Ideas
          • SCADA and Telemetry Devices Ideas
  • Knowledge Center
    • Building Automation Knowledge Base
    • Industrial Automation Knowledge Base
    • Industrial Automation How-to videos
    • SCADA & Telemetry Solutions Knowledge Base
    • Digital E-books
    • Success Stories Corner
    • Power Talks
  • Events & Webinars
    • Innovation Talks
    • Innovation Summit
    • Let's Exchange Series
    • Technology Partners
  • Support
    • Ask Exchange
    • Leaderboard
    • Our Community Guidelines
    • Community User Guide
    • How-To & Best Practices
    • More
Join Now
How can we help?
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
50952members
Join Now
244986posts
Join Now

SQL Express 2005 automatic database backup

Back to Building Automation Knowledge Base
Options
  • Article History
  • Subscribe to RSS Feed
  • Bookmark
  • Subscribe
  • Email to a Friend
  • Printer Friendly Page
  • Report Inappropriate Content
0 Likes
694 Views
Trying to translate this page to your language?
Select your language from the translate dropdown in the upper right. arrow
Translate to: English
  • (Français) French
  • (Deutsche) German
  • (Italiano) Italian
  • (Português) Portuguese
  • (Русский) Russian
  • (Español) Spanish

SQL Express 2005 automatic database backup

Picard Product_Support
‎2018-09-11 08:33 AM

Issue

One of many methods that can automatically backup SQL Express 2005 databases

Product Line

Andover Continuum

Environment

  • SQL Express
  • Continuum Cyberstation Standalone

Cause

Some customers are looking for a way to automatically have a database backed up on a schedule. Since the free limited version of SQL express that comes built into Continuum for smaller site setups does not come with a front end, backups of the database must be performed via windows command line utility.

There are commands available to run at the windows command line but this article will help with performing this operation automatically and on a schedule of your choice whether is be daily, weekly, monthly. This is accomplished by creating a  batch file and using the windows task scheduler. Help on using the task scheduler and also creation of batch files can be found on a simple Google search. In the resolution section below we give one example of how to set this up.

Resolution

  1. Open up notepad and paste in the sample query below. Please note that you may need to change the query a bit to adjust to your sites needs.
  2. Here is the query. Please note the bold and underlined text. You will need to put your machine name and also your SA password in the bold and underlined sections. Also notice where the words backup database continuumdb is in the query. Your database might be named something else, but you can find that out by viewing the database tab of the Continuum database initializations workstation editor. Lastly notice that the location of the backup and the name. In this example there is a directory named DBbackup that you'll need to create for this example or create your own directory and change the path in the query. The name of the backup file is called MyBackup.bak. You will need to change this name to something that is meaningful to your site.
    • The switches below are -S for the servername and in the case of type of command line query -S is your machine since it is the server locally.

    • The switch -U is username and we are using the System Admin account for SQL that was created when the instance was created.

    • The switch -P is password and in this example we are using the sa account so please put in the sa password that you created when first installing SQL express 2005.

    • The switch -Q means command line query and notice that everything in double quotes will be the query. Also notice the single quotes for the path that the database backup will be created at.

       

      sqlcmd -Sputyourmachinename\sqlexpress -Usa -PputyourSApassword  -Q "backup database continuumdb to disk='C:\DBbackup\MyBackup.bak' with init"

       

  3. Once the query and been corrected and pasted into notepad, save the file as something meaningful like DBbackup.bat notice that the notepad file is not saved as text but as a *.bat file which is a batch file that can be double clicked on to execute. It is advised to test this batch file now to make sure it works. Go to your backup directory and check to make sure you have a backup file.
  4. Now the only thing left to do is create a windows scheduled task.  In order to accomplish this you will need to
    1. Select Start/All Programs/Accessories/system tools
    2. Click on Task Scheduler (this path may vary depending on which windows OS you are running).
    3. Under the Actions menu item select Create basic task.
    4. Follow the prompts giving your newly created task a name, date to run, time to run
    5. Select program and browse to the location you have saved your DBbackup.bat file to.
    6. Once created it will run on the time and dates you have selected. You can also select your task in the Task scheduler and right click to run now for a test.

IMPORTANT NOTE:

Please keep in mind that automatically backing up the database using this method will continue to replace the old backup and create a new backup. it is highly suggested to always verify the backups and maintain enough disk space to complete these tasks.

Labels (1)
Labels:
  • Andover Continuum
Tags (1)
  • Find more articles tagged with:
  • 12022
Was this article helpful? Yes No
No ratings
Contributors
  • DavidFisher
    DavidFisher
  • Carl_Slack
    Carl_Slack
  • Sampath_Konda
    Sampath_Konda
  • Product_Support
    Product_Support
Support

Have a question? Please contact us with details, and we will respond.

Contact Us
FAQ

Look through existing questions to find popular answers.

Learn More
About

Want to know more about Exchange and its possibilities?

Learn More

Full access is just steps away!

Join Exchange for FREE and get unlimited access to our global community of experts.

Connect with Peers & Experts

Discuss challenges in energy and automation with 30,000+ experts and peers.

Get Support in Our Knowledge Base

Find answers in 10,000+ support articles to help solve your product and business challenges.

Ask Questions. Give Solutions

Find peer based solutions to your questions. Provide answers for fellow community members!

Register today for FREE

Register Now

Already have an account?Log in

About Us FAQ Terms & Conditions Privacy Notice Change your cookie settings
©2020, Schneider Electric