Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6821127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:30:29+00:00 2026-05-26T21:30:29+00:00

I have a small SQL database that is on my development PC only. I’d

  • 0

I have a small SQL database that is on my development PC only. I’d like to make frequent backup copies of it to a thumb drive. If I could have it do it automatically on a schedule when the thumb drive is detected, that’d be even better. What’s a good way to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T21:30:29+00:00Added an answer on May 26, 2026 at 9:30 pm

    This is what I did to get the database and other folders to automatically sync to my USB drive every time I plug it in:

    1. Install SyncToy made by Microsoft.
      • Add a folder pair to copy from the DB folder to the USB drive.
      • Filter files to only the files you want to copy.
    2. Create a batch program with the content below called SyncMe.bat and save it on your USB drive
    3. Open Event Viewer from the Control Panel.
    4. Navigate to Applications and Services Logs > Microsoft > Windows DriverFrameworks-UserMode > Operational
    5. Clear the log to make it easier to find the right events.
    6. Plug in the USB drive.
    7. Refresh the log, find the latest event that is specific to that USB drive, right-click, and Attach Task To This Event.
    8. Add an action that runs the SyncMe.bat program you created

    SyncMe.bat contents (update to reflect your paths and file names):

    @echo off
    
    if exist "G:\SyncMe.bat" goto fileexists
    
    goto nofile
    
    :fileexists
    "C:\Program Files\Microsoft SQL Server\100\Tools\Binn\OSQL.EXE" -S computername\instancename -E -n -Q "master..sp_detach_db 'DatabaseName'"
    "C:\Program Files\SyncToy 2.1\SyncToyCmd.exe" -R
    "C:\Program Files\Microsoft SQL Server\100\Tools\Binn\OSQL.EXE" -S computername\instancename -E -n -Q "master..sp_attach_db 'DatabaseName', 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.InstanceName\MSSQL\DATA\DatabaseName.mdf','C:\Program Files\Microsoft SQL Server\MSSQL10_50.InstanceName\MSSQL\DATA\LogName_log.ldf'"
    goto end
    
    :nofile
    echo SyncMe.bat not found on G:\
    goto end
    
    :end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a somewhat small database in SQL Server Express 2005 that I really
I have a small SQL Server database that I need to copy on command
I have a large (~ 40gb ) SQL Server 2008 database that I would
I have a relatively small Table in a SQL database in my Android app
I have a GridView that gets populated with data from a SQL database, very
I have a client that runs a small business. They need a custom database
I have a small SQL CE 4.0 database with several tables, mapped using Entity
I have a small database in Access that works well except for the following
I have a client/server application that depends on MS SQL database for backend storage,
I have a small application which has around 38 tables in the Database (SQL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.