How to store scripts folders on OneDrive

This is a detailed step-by-step walkthrough on how to move a database scripts folder to OneDrive and keep it up-to-date with the help of dbForge Schema Compare for SQL Server.

Workflow

Set up OneDrive on Windows

Note

OneDrive comes preinstalled on Windows 10 and Windows 11.

1. Open it from the Start menu.

2. Enter the email address associated with your OneDrive account and click Sign in.

Enter the email

3. Enter your password and click Sign in again.

Enter the password

Take note that OneDrive may require additional verification and send a special security code to your associated email. If that happens, go to your email, get the security code, enter it, and move on.

4. Specify a location for your OneDrive folder.

Specify a location

5. If you set up OneDrive on your machine previously, you might already have an existing OneDrive folder. In that case, you can simply click Use this folder.

Use this folder

6. Go through several additional pages that can be skipped; afterwards, all of your OneDrive files and folders will appear in File Explorer.

File Explorer

7. Now you are ready to use OneDrive as a storage for your scripts folder.

Create a scripts folder and store it on OneDrive

You have two ways to create a new scripts folder in dbForge Schema Compare for SQL Server:

  • Create a scripts folder via Create Scripts Folder or Snapshot

  • Create a scripts folder by synchronizing a SQL Server database with an empty folder

Create a scripts folder via Create Scripts Folder or Snapshot

1. Go to the Database menu > Tasks > Create Scripts Folder or Snapshot. In the Create Scripts Folder or Snapshot dialog that opens, specify the type of the source object, the required connection, database name, output type (Scripts Folder), and the path to OneDrive for your scripts folder to be saved to.

Create Scripts Folder or Snapshot

2. Optional: Go to Scripts Folder Structure and specify the structure for your scripts folder and file name templates.

Scripts Folder Structure

3. After everything is configured, click Create, and all database objects will be created and stored in your new scripts folder on OneDrive.

Create a scripts folder by synchronizing a SQL Server database with an empty folder

1. Click New Schema Comparison on the menu to open the wizard.

2. In Source, select the Database type, then select the required connection and database. In Target, select the Scripts Folder type and set a path to an empty folder on your OneDrive in the Database scripts folder field.

New Schema Comparison

3. Click Compare. After the comparison is completed, you will be able to specify the objects that will be added to the scripts folder (or simply keep all of them selected).

Comparison

4. Open the synchronization wizard from the Comparison menu > Synchronize (or, alternatively, by selecting the required objects in the grid and selecting Synchronize from the shortcut menu).

5. Select Update the scripts folder and click Synchronize.

Synchronization

Compare and synchronize a scripts folder stored on OneDrive with a live database

In our scenario, we have a live development database and we want to sync our scripts folder that resides in the cloud with that database. The logic behind this is to regularly run schema and data comparison between the database and the scripts folder, and in case any differences are found — deploy them.

You can automate the process of schema comparison and synchronization by using the command line. Automation of data comparison and synchronization is also possible.

Note

To learn more about moving your scripts folders to OneDrive, refer to our blog post Using OneDrive to Store Scripts Folders for dbForge Schema Compare.

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Schema Compare for SQL Server.
All Features

All features

Get acquainted with the rich features and capabilities of the Schema Compare in less than 5 minutes.
Request a demo

Request a demo

If you consider employing the Schema Compare for your business, request a demo to see it in action.
Ready to start using dbForge Schema Compare for SQL Server?