Using Command Line To Create Database Snapshots

You can automate creation of target database snapshots using the command line.

Note

The command line functionality is available only in certain editions of dbForge Studio for Oracle. For the detailed information on features availability in the dbForge Studio editions, please refer to the Editions list on our site.

To create a snapshot of target database through the command line, do the following:

  1. Open Command Prompt by pressing Win+R, and typing cmd in the Open line.

    Note

    To run the Command Line in Windows 10:

    From the Desktop Mode

    • Move the mouse cursor to the exact lower left corner until the desktop shortcuts menu appears.
    • Right-click to see the shortcut menu and then click Run.

    From the Charms Bar

    • Move your mouse to the upper right corner until the Charms Bar appears.
    • Select Apps from the list and type run in the search box.
    • Click Run from the search results.

    Use Windows + R Shortcut Keys

    • In desktop mode, press the Windows + R keys, to show the Run command line.
    • In the window that opens, type cmd and press Enter.
  2. Type a path to the dbforgeoracle.com file, located in dbForge Studio for Oracle installation folder on your PC, and press the SPACE bar.

"C:\Program Files\Devart\dbForge Studio for Oracle\dbforgeoracle.com"

Note

The path to the executable file will differ depending on how you have installed the Studio - as a standalone tool or as part of the dbForge Edge bundle. Make sure that you have specified a correct path. If you have installed the Studio as part of dbForge Edge, change the path accordingly:

C:\Program Files\Devart\dbForge Edge\dbForge Studio for Oracle>dbforgeoracle.com
  1. Specify the action you want to perform:
"C:\Program Files\Devart\dbForge Studio for Oracle\dbforgeoracle.com" /snapshot
  1. Specify the connection string and schemas:
"C:\Program Files\Devart\dbForge Studio for Oracle>dbforgeoracle.com /snapshot /connection:"User Id=yourusername;Server=ORCL;Unicode=True" /s:"SH,SH"
  1. Press ENTER to run the process.

Tip: To see a quick help on the switches available for the /snapshot operation, type the following:

"C:\Program Files\Devart\dbForge Studio for Oracle\dbforgeoracle.com" /snapshot /?

Additional arguments:

You can edit the generated file to add some additional parameters, for example:

  • To write a comment, type:
/comment:<value>
  • To apply compression to your snapshot file, type:
/compress:[value]

To turn this option on, type Yes, Y, On, True, T.

To turn this option off, type No, N, Off, False, F.

  • To specify full connection string with additional parameters, type:
connection:<connection_string>

This argument is required.

  • To specify a file name and its path to save the created snapshot file, type:
/file:<file_path>

If the path is not specified, the snapshot will be saved to the current directory.

  • To specify server password, type:
/password:<pw> 

Define this argument to override the password specified in the connection string.

Command line used to make a snapshot of a schema may look like:

"C:\Program Files\Devart\dbForge Studio for Oracle\dbforgeoracle.com" /snapshot /connection:"User Id=yourusername;Server=ORCL;Unicode=True;" /password:yourpassword /schema:"HR" /file:"result.snap"

If you connect to the server in the Direct mode, the connection parameters will differ and the command line used to make a snapshot of a schema will look like:

"C:\Program Files\Devart\dbForge Studio for Oracle\dbforgeoracle.com" /snapshot /connection:"User Id=yourusername;Server=dbOracle;Connect Mode=SysDba;Unicode=True;Direct=True;Service Name=ORCL" /password:yourpassword /schema:"HR" /file:"result.snap" 

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Studio for Oracle.
All Features

All features

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

Request a demo

If you consider employing the Studio for your business, request a demo to see it in action.
Ready to start using dbForge Studio for Oracle?